homozygous: For which markers is the profile homozygous/heterozygous?

Description Usage Arguments Value Examples

Description

For which markers is the profile homozygous/heterozygous?

Usage

1
homozygous(x, markers = get.markers(x))

Arguments

x

An integer matrix specifying either a single profile or a number of profiles.

markers

Character vector stating the markers to check. Defaults to all markers of x.

Value

logical matrix The value at column m in row i denotes whether profile i is homozygous/heterozygous for marker m.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
x <- t(c(1L,1L,1L,2L))
colnames(x) <- c("locus1.1","locus1.2","locus2.1","locus2.2")

homozygous(x,markers = "locus1") # TRUE
homozygous(x,markers = "locus2") # FALSE
homozygous(x) # t(c(TRUE,FALSE))
y <- t(c(1L,NA,1L,2L))
colnames(y) <- c("locus1.1","locus1.2","locus2.1","locus2.2")
homozygous(y,markers = "locus1") # NA
homozygous(y,markers = "locus2") # FALSE
homozygous(y)   # t(c(NA,FALSE))
heterozygous(y) # t(c(NA,TRUE))

DNAprofiles documentation built on Jan. 15, 2017, 9:27 p.m.