compute_ld: Linkage disequilibrium computation

Description Usage Arguments Details Value Examples


This function computes linkage disequilibrium (LD) for a set of selected loci. The measure can be either r2, r2v, r2s, or r2vs. Function ld from package snpStats is used when computing r2, whereas r2 values corrected with kinship data (r2v), population structure (r2s), or both (r2vs) make use of function LD.Measures from package LDcorSV.


compute_ld(snp_data, measure, kinship = NULL, structure = NULL)



A list of SNP data comprising at least an element called Genotypes, a SnpMatrix object containing the genotype of individuals included in the analysis.


A character of length one. The r2 measure that was used for computing the linkage disequilibrium values in LD. Can be either "r2", "r2v", "r2s", "r2vs".


A square numeric matrix of kinship values with as many rows and columns as there are individuals included in the analysis. More specifically, kinship must have as many rows and columns as there are rows in snp_data$Genotypes.


A numeric matrix with as many rows as there are individuals in the analysis and as many columns as there are putative subpopulations in the dataset.


An error will be thrown if the function is asked to compute an r2 measure without all required inputs (kinship and/or structure data). If kinship and/or structure data are given as input but the computed measure makes no use of these data, they will be ignored with a warning.


A list with two components :



malemay/HaplotypeMiner documentation built on May 28, 2019, 2:48 p.m.