kinship: Create a kinship matrix.

kinship.probsR Documentation

Create a kinship matrix.

Description

Read in the genotypes and produce a kinship matrix based on either allele sharing or haplotype contributions.

Usage

  kinship.probs(probs, snps, bychr = FALSE)
  kinship.alleles(geno)

Arguments

probs

Three dimensional numeric array containing the founder haplotype contributions. Num.samples by num.founder by num.markers.

snps

Data.frame containing the marker locations. SNP ID, chromosome, Mb anc cM locations in columns 1 through 4, respectively.

bychr

Boolean that is true if the current chromosome should be excluded from the calculation of kinship for the current chromosome. See Details.

geno

Character matrix of allele calls.

Details

Allele based method: This simply calculates the mean allele sharing between two individuals. Intensity based method: FALSEor each pair of samples, at each marker, calculate the cosine of the angle between the two founder contribution vectors. Take the average across the genome.

When bychr = FALSE, we calculate one kinship matrix for all chromosomes. When bychr TRUE, we calculate a different kinship matrix for each chromosome. FALSEor each chromosome, we remove use only the SNPs on the remainging chromosomes to calculate the kinship matrix for that chromosome. This is motivated by the Cheng et.al. reference below.

Value

Numeric matrix, with rows and columns equal to the number of samples in the genotype file.

Author(s)

Daniel Gatti

References

Practical Considerations Regarding the Use of Genotype and Pedigree Data to Model Relatedness in the Context of Genome-Wide Association Studies. Cheng R, Parker CC, Abney M, Palmer AA. G3 (Bethesda). 2013 Oct 3;3(10):1861-1867. PMID: 23979941

See Also

extract.raw.data, filter.samples, batch.normalize, calc.genoprob

Examples

  ## Not run: 
    K = kinship.probs(probs)
  
## End(Not run)

dmgatti/DOQTL documentation built on April 7, 2024, 10:35 p.m.