Skip to contents

This function processes a susieR model object to extract the SNPs and their corresponding Posterior Inclusion Probabilities (PIP) for each credible set. It also includes a list of other SNPs in the same credible set, ensuring that only the SNP with the highest PIP in each credible set receives a label in the label column.

Usage

susieR_cs_table(susieR_model, df)

Arguments

susieR_model

A susieR model object, which includes the following components:

  • sets A list containing credible sets, where each set is represented by indices of SNPs.

  • X_column_scale_factors A vector of SNP identifiers (e.g., SNP names).

  • pip A named vector of Posterior Inclusion Probability (PIP) values, indexed by SNP names.

df

A data frame containing SNP information, with the following columns:

  • SNP The SNP identifiers.

  • POS The position of each SNP.

  • P The p-value associated with each SNP.

Value

A tibble (data frame) containing the following columns:

  • SNP The SNP identifiers.

  • POS The position of each SNP.

  • P The p-value for each SNP.

  • PIP The Posterior Inclusion Probability for each SNP.

  • cs_snps A string listing the other SNPs in the same credible set (NA if only one SNP).

  • cs The credible set identifier, represented as a factor.

  • test A string indicating the test used for generating the table (always "susie").

  • label The SNP identifier for the SNP with the lowest P value within each credible set (NA for other SNPs).

Examples

if (FALSE) { # \dontrun{
result <- susieR_cs_table(susie_model, df)
print(result)
} # }