apex (version 1.0.2)

multiphyDat-class: 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.

Arguments

Slots

seq
a list of phyDat objects; empty slot should be NULL
type
a character string indicating the type of the sequences stored: "DNA" for DNA sequences, "AA" for amino-acids.
labels
a vector of labels of individuals
n.ind
the number of individuals
n.seq
the total number of sequences (pooling all genes), including gap sequences
n.seq.miss
the total number of gap-only sequences
ind.info
a data.frame containing information on the individuals, where individuals are in rows; empty slot should be NULL
gene.info
a data.frame containing information on the genes, where genes are in rows; empty slot should be NULL

Examples

Run this code
data(Laurasiatherian)

## empty object
new("multiphyDat")

## simple conversion with nicely ordered output
## Not run: 
# genes <- list(gene1=subset(Laurasiatherian,,1:1600, FALSE),
#     gene2=subset(Laurasiatherian,,1601:3179, FALSE))
# x <- new("multiphyDat", genes)
# x
# ## End(Not run)

## trickier conversion with missing sequences / wrong order
genes <- list(gene1=subset(Laurasiatherian,1:40),
    gene2=subset(Laurasiatherian,8:47))
x <- new("multiphyDat", genes)
x

Run the code above in your browser using DataLab