pruneSnpsLd: Prune SNPs based on LD

pruneSnpsLdR Documentation

Prune SNPs based on LD

Description

Prune SNPs based on their pairwise linkage disequilibriums via sliding windows using the "snpgdsLDpruning" function from the "SNPRelate" package..

Usage

pruneSnpsLd(
  X = NULL,
  snp.coords = NULL,
  gds = NULL,
  ld.threshold = 0.2,
  remove.monosnp = TRUE,
  maf = NaN,
  missing.rate = NaN,
  method = c("composite", "r", "dprime", "corr"),
  slide.max.bp = 5e+05,
  slide.max.n = NA,
  seed = NULL,
  nb.cores = 1,
  verbose = 1
)

Arguments

X

matrix of bi-allelic SNP genotypes encoded, for each SNP, in number of copies of its second allele, i.e. as allele doses in [0,2], with genotypes in rows and SNPs in columns; the "second" allele is arbitrary, it can correspond to the minor (least frequent) or the major (most frequent) allele; will be transformed into a "gds" object (see next argument); if some values were imputed, they will be automatically thresholded using convertImputedTo012 (required by the SNPRelate function)

snp.coords

data frame which row names are SNP identifiers, the first column should contain chromosomes as integers (otherwise chromNames2integers will be used), and the second column should contain positions; compulsory if the X argument is specified

gds

object of class "SNPGDSFileClass" from the SNPRelate package

ld.threshold

the LD threshold below which SNPs are discarded; will be passed to "snpgdsLDpruning"

remove.monosnp

will be passed to "snpgdsLDpruning"

maf

will be passed to "snpgdsLDpruning"

missing.rate

will be passed to "snpgdsLDpruning"

method

will be passed to "snpgdsLDpruning"

slide.max.bp

will be passed to "snpgdsLDpruning"

slide.max.n

will be passed to "snpgdsLDpruning"

seed

seed for the pseudo-random number generator

nb.cores

will be passed to "snpgdsLDpruning"

verbose

verbosity level (0/1)

Value

vector of SNP identifiers

Author(s)

Timothee Flutre

See Also

thinSnps, snpgdsLDpruning


timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.