View source: R/bio_LD_matrix.R
ld_matrix_1000g_plink | R Documentation |
This function is a wrapper around a system call to plink 1.9 to generate LD statistics for a list of SNPs. It requires a set of .bed/.bim/.bam files as input, which can be provided in the same format as plink's –bfile parameter. Alternatively, you can provide a .tar (possibly compressed) file containing the .bed/.bim/.bam files, and this function will unpack it on-the-fly.
ld_matrix_1000g_plink( snps, genofile, mode = c("r", "r2"), plink = Sys.which("plink"), pop = "EUR", maf = 0.01, hwe = 1e-05, geno = 0.1, ld_window_kb = 10000, ld_window = 1e+05, num_threads = parallel::detectCores(), sys.path = NULL, ... )
snps |
List of variants |
genofile |
Location of the local plink file containing 1000G data. This can be one of the the .bed/.bim/.bam files, and the remaining filenames are assumed to have the same basename as the provided file. You can also provide a file basename in the same format as plink's –bfile parameter. Alternatively, a tar file (possibly compressed) containing the .bed/.bim/.bam files can be provided, and it will be temporarily unpacked/decompressed. NOTE: the .bam files are assume to list alleles in ALT/REF order. plink then assigns ALT to A1 and REF to A2 in plink, using the |
mode |
"r" or "r2". Whether to calculate r or r2. |
plink |
Path to plink v1.9 executabl. |
pop |
A 1000 Genomes Project population, default = "EUR" |
maf |
MAF cutoff for plink filtering. |
hwe |
HWE cutoff for plink filtering. |
geno |
geno cutoff plink filtering. |
ld_window_kb |
From PLINK: By default, when a limited window report is requested, every pair of variants with at least (10-1) variants between them, or more than 1000 kilobases apart, is ignored. You can change the first threshold with –ld-window, and the second threshold with –ld-window-kb. |
ld_window |
From PLINK: By default, when a limited window report is requested, every pair of variants with at least (10-1) variants between them, or more than 1000 kilobases apart, is ignored. You can change the first threshold with –ld-window, and the second threshold with –ld-window-kb. |
num_threads |
Number of threads for plink |
sys.path |
Optional path variable to (temporarily) append to R's PATH environment variable. Useful for automatically finding executables, such as plink, tar decompressors, etc. |
... |
Additional options to be sent to plink |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.