Process Credible Sets (CS) from Finemapping Results
Source:R/univariate_rss_diagnostics.R
extract_cs_info.RdThis function extracts and processes information for each Credible Set (CS) from finemapping results, typically obtained from a finemapping RDS file.
Value
A data frame with one row per CS, containing the following columns:
- cs_name
Name of the Credible Set
- variants_per_cs
Number of variants in the CS
- top_variant
ID of the variant with the highest PIP in the CS
- top_variant_index
Global index of the top variant
- top_pip
Highest Posterior Inclusion Probability (PIP) in the CS
- top_z
Z-score of the top variant
- p_value
P-value calculated from the top Z-score
- cs_corr
Pairwise correlations of other CSs in this RDS with the CS of the current row, delimited by '|', if there is more than one CS in this RDS file
Details
This function is designed to be used only when there is at least one Credible Set in the finemapping results usually for a given study and block. It processes each CS, extracting key information such as the top variant, its statistics, and correlation information between multiple CS if available.