calc_sdp: Calculate strain distribution pattern from SNP genotypes

Description Usage Arguments Value See Also Examples

View source: R/calc_sdp.R

Description

Calculate the strain distribution patterns (SDPs) from the strain genotypes at a set of SNPs.

Usage

1
calc_sdp(geno)

Arguments

geno

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.

Value

A vector of strain distribution patterns: integers between 1 and 2^n - 2 where n is the number of strains, whose binary representation indicates the strain genotypes.

See Also

invert_sdp(), sdp2char()

Examples

1
2
3
4
x <- rbind(m1=c(3, 1, 1, 1, 1, 1, 1, 1),
           m2=c(1, 3, 3, 1, 1, 1, 1, 1),
           m3=c(1, 1, 1, 1, 3, 3, 3, 3))
calc_sdp(x)

Example output

 m1  m2  m3 
  1   6 240 

qtl2 documentation built on Oct. 18, 2021, 1:06 a.m.