| multiphyDat-class {apex} | R Documentation |
multiphyDat: class for multiple gene data
Description
This formal (S4) class is identical to multidna, except that DNA sequences are stored using phyDat objects from the phangorn package.
Sequences are stored as a (possibly named) list, with each element of the list being a separate DNA alignment stored as a phyDat object.
The rows of the separate matrices all correspond to the same individuals, ordered identically.
Slots
seqa list of phyDat objects; empty slot should be NULL
typea character string indicating the type of the sequences stored: "DNA" for DNA sequences, "AA" for amino-acids.
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
Author(s)
Klaus Schliep klaus.schliep@gmail.com
Thibaut Jombart t.jombart@imperial.ac.uk
Examples
data(Laurasiatherian)
## empty object
new("multiphyDat")
## simple conversion with nicely ordered output
data(Laurasiatherian)
genes <- list(gene1=Laurasiatherian[, 1:1600],
gene2=Laurasiatherian[, 1601:3179])
x <- new("multiphyDat", genes)
x
## trickier conversion with missing sequences / wrong order
genes <- list(gene1=Laurasiatherian[1:40,],
gene2=Laurasiatherian[8:47,])
x <- new("multiphyDat", genes)
x