Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

invert_sdp

Calculate SNP genotype matrix from strain distribution patterns


Description

Calculate the matrix of SNP genotypes from a vector of strain distribution patterns (SDPs).

Usage

invert_sdp(sdp, n_strains)

Arguments

sdp

Vector of strain distribution patterns (integers between 1 and 2^n-2 where n is the number of strains.

n_strains

Number of strains

Value

Matrix of SNP genotypes, markers x strains, coded as 1 (AA) and 3 (BB). Markers with values other than 1 or 3 are omitted, and monomorphic markers, are omitted.

See Also

Examples

sdp <- c(m1=1, m2=12, m3=240)
invert_sdp(sdp, 8)

qtl2

Quantitative Trait Locus Mapping in Experimental Crosses

v0.24
GPL-3
Authors
Karl W Broman [aut, cre] (<https://orcid.org/0000-0002-4914-6671>), R Core Team [ctb]
Initial release
2020-12-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.