| POLYFUN | R Documentation |
Uses echolocatoR wrapper for SUSIE instead of the POLYFUN_finemapper.
function which uses a python script provided with PolyFun.
POLYFUN(
dat,
LD_matrix,
locus_dir,
polyfun_path = NULL,
mode = c("precomputed", "parametric", "non-parametric"),
method = c("SUSIE", "FINEMAP"),
max_causal = 5,
compute_n = "ldsc",
credset_thresh = 0.95,
rescale_priors = TRUE,
case_control = TRUE,
conda_env = "echoR_mini",
force_new = FALSE,
nThread = 1,
verbose = TRUE,
...
)
dat |
Fine-mapping results data. |
LD_matrix |
Linkage Disequilibrium (LD) matrix to use for fine-mapping. |
locus_dir |
Locus-specific directory to store results in. |
polyfun_path |
[Optional] Path to PolyFun directory where all the
executables and reference data are stored.
Will be automatically installed if set to |
mode |
PolyFun can run in several different modes corresponding to how SNP-wise prior causal probabilities (i.e. priors) are computed:
|
method |
Method to conduct fine-mapping step with (using priors generated by PolyFun).
|
max_causal |
The maximum number of non-zero effects (and thus causal variants). |
compute_n |
How to compute per-SNP sample size (new column "N").
|
credset_thresh |
The minimum mean Posterior Probability (across all fine-mapping methods used) of SNPs to be included in the "mean.CS" column. |
rescale_priors |
If prior probabilities are supplied,
rescale them from 0-1 (i.e. |
case_control |
Whether the summary statistics come from a case-control
study (e.g. a GWAS of having Alzheimer's Disease or not) ( |
conda_env |
Conda environment to use. |
force_new |
If saved results already exist in the given
|
nThread |
Number of threads to parallelise across (when applicable). |
verbose |
Print messages. |
... |
Additional arguments passed to the chosen
fine-mapping |
The same input SNP-wise
dat but with the following additional columns:
"CS" : Credible Set of putative causal SNPs.
"PP" : Posterior (Inclusion) Probability of each SNP being causal, or belonging to the causal Credible Set.
"POLYFUN.h2" : The normalized heritability (h^2) used as prior probabilities during fine-mapping.
Other polyfun:
POLYFUN_compute_priors(),
POLYFUN_download_ref_files(),
POLYFUN_find_folder(),
POLYFUN_finemapper(),
POLYFUN_gather_annotations(),
POLYFUN_gather_ldscores(),
POLYFUN_help(),
POLYFUN_import_priors(),
POLYFUN_initialize(),
POLYFUN_munge_summ_stats(),
POLYFUN_prepare_snp_input(),
POLYFUN_run_ldsc()
locus_dir <- file.path(tempdir(),echodata::locus_dir)
dat <- echodata::BST1
LD_matrix <- echodata::BST1_LD_matrix
dat2 <- echofinemap::POLYFUN(locus_dir=locus_dir,
dat=dat,
LD_matrix = LD_matrix,
method="SUSIE")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.