| multidna-class | R Documentation |
This formal (S4) class is used to store multiple DNA alignments. Sequences are stored as a (possibly named) list, with each element of the list being a separate DNA alignment stored as a DNAbin matrix. The rows of the separate matrices all correspond to the same individuals, ordered identically.
dnaa list of DNAbin matrices; empty slot should be NULL
labelsa vector of labels of individuals
n.indthe number of individuals
n.seqthe total number of sequences (pooling all genes), including gap sequences
n.seq.missthe total number of gap-only sequences
ind.infoa data.frame containing information on the individuals, where individuals are in rows; empty slot should be NULL
gene.infoa data.frame containing information on the genes, where genes are in rows; empty slot should be NULL
Thibaut Jombart t.jombart@imperial.ac.uk
## empty object
new("multidna")
## simple conversion with nicely ordered output
data(woodmouse)
genes <- list(gene1=woodmouse[,1:500], gene2=woodmouse[,501:965])
x <- new("multidna", genes)
x
image(woodmouse)
image(x@dna[[1]])
image(x@dna[[2]])
## trickier conversion with missing sequences / wrong order
genes <- list(gene1=woodmouse[,1:500], gene2=woodmouse[c(5:1,14:15),501:965])
x <- new("multidna", genes)
x
image(x@dna[[1]])
image(x@dna[[2]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.