Description Usage Arguments Value Examples
For which markers is the profile homozygous/heterozygous?
1 | homozygous(x, markers = get.markers(x))
|
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 |
logical matrix The value at column m
in row i
denotes whether profile i
is homozygous/heterozygous for marker m
.
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.