estimLdPerChr | R Documentation |
Estimates linkage disequilibrium between pairs of SNPs belonging to the same chromosome when the observations are the genotypes of genotypes, not their gametes (i.e. the gametic phases are unknown). When ignoring kinship and population structure, the estimator of Rogers and Huff (Genetics, 2009) can be used. When kinship and/or population structure are controlled for, the estimator of Mangin et al (Heredity, 2012) is used via their LDcorSV package.
estimLdPerChr(
X,
snp.coords,
K = NULL,
pops = NULL,
only.pop = NULL,
use.ldcorsv = FALSE,
use.snpStats = FALSE,
as.cor = FALSE,
as.symmat = FALSE,
nb.cores = 1,
verbose = 1
)
X |
matrix of bi-allelic SNP genotypes encoded in allele doses in 0,1,2, with genotypes in rows and SNPs in columns; missing values should be encoded as NA |
snp.coords |
data.frame with SNP identifiers as row names, and two columns, "chr" and "pos" |
K |
matrix of "kinship" (additive genetic relationships) |
pops |
vector of characters indicating the population of each genotype |
only.pop |
identifier of a given population |
use.ldcorsv |
required if K and/or pops are not NULL; otherwise use the square of |
use.snpStats |
if TRUE, the |
as.cor |
if TRUE, the square root of the LD estimates is returned |
as.symmat |
if TRUE, LD values are returned as a symmetric matrix (not with |
nb.cores |
number of cores to estimate LD for each chromosome in parallel |
verbose |
verbosity level (0/1) |
data frame with at least three columns, "loc1", "loc2" and the LD values
Timothee Flutre
estimLd
, plotLd
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.