View source: R/pathwas_ld_clump.R
pathwas_ld_clump | R Documentation |
Uses PLINK clumping method, where SNPs in LD within a particular window will be pruned. The SNP with the lowest p-value is retained.
pathwas_ld_clump(
dat = NULL,
clump_kb = 10000,
clump_r2 = 0.001,
clump_p = 0.99,
pop = "EUR",
access_token = NULL,
bfile = NULL,
plink_bin = NULL,
def_tmpDir = tempdir()
)
dat |
Dataframe. Must have a variant name column ('rsid') and pval column called 'pval'. If 'id' is present then clumping will be done per unique id. |
clump_kb |
Clumping kb window. Default is very strict, '10000' |
clump_r2 |
Clumping r2 threshold. Default is very strict, '0.001' |
clump_p |
Clumping sig level for index variants. Default = '1' (i.e. no threshold) |
pop |
Super-population to use as reference panel. Default = '"EUR"'. Options are '"EUR"', '"SAS"', '"EAS"', '"AFR"', '"AMR"'. ''legacy'' also available - which is a previously used verison of the EUR panel with a slightly different set of markers |
access_token |
Google OAuth2 access token. Used to authenticate level of access to data |
bfile |
If this is provided then will use the API. Default = 'NULL' |
plink_bin |
If 'NULL' and 'bfile' is not 'NULL' then will detect packaged plink binary for specific OS. Otherwise specify path to plink binary. Default = 'NULL' |
FOR PATHWAS PURPOSES: All functions here are copied directly from the ieugwasr package (https://github.com/MRCIEU/ieugwasr). They have been slightly edited to allow for definition of directory for storing temporary files. All other functionality remains unchanged.
ORIGINAL DESCRIPTION STARTS HERE: This function interacts with the OpenGWAS API, which houses LD reference panels for the 5 super-populations in the 1000 genomes reference panel. It includes only bi-allelic SNPs with MAF > 0.01, so it's quite possible that a variant you want to include in the clumping process will be absent. If it is absent, it will be automatically excluded from the results.
You can check if your variants are present in the LD reference panel using ['ld_reflookup()'].
This function does put load on the OpenGWAS servers, which makes life more difficult for other users. We have implemented a method and made available the LD reference panels to perform clumping locally, see ['ld_clump()'] and related vignettes for details.
Data frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.