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

allGenotypes

Genotype combinations


Description

Auxiliary functions computing possible genotype combinations in a pedigree. These are not normally intended for end users.

Usage

allGenotypes(n)

fast.grid(argslist, as.list = FALSE)

geno.grid.subset(x, partialmarker, ids, chrom, make.grid = T)

Arguments

n

a positive integer.

argslist

a list of vectors.

as.list

if TRUE, the output is a list, otherwise a matrix.

x

a linkdat object.

partialmarker

a marker object compatible with x.

ids

a numeric with ID labels of one or more pedigree members.

chrom

a character, either 'X' or 'AUTOSOMAL'. If missing, the 'chrom' attribute of partialmarker is used. If this is also missing, then 'AUTOSOMAL' is taken as the default value.

make.grid

a logical. If FALSE, a list is returned, otherwise fast.grid is applied to the list before returning it.

Value

allGenotypes returns a matrix with 2 columns and n + n*n(n-1)/2 rows containing all possible (unordered) genotypes at a biallelic locus with alleles 1,2,...{},n. fast.grid is basically a stripped down version of expand.grid.

Author(s)

Magnus Dehli Vigeland

Examples

m = allGenotypes(2)
stopifnot(m == rbind(c(1,1), c(2,2), 1:2))

paramlink

Parametric Linkage and Other Pedigree Analysis in R

v1.1-2
GPL (>= 2)
Authors
Magnus Dehli Vigeland [aut, cre], Thore Egeland [ctb], Guro Doerum [ctb]
Initial release
2018-01-05

We don't support your browser anymore

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