Learn R Programming

apex (version 1.0.6)

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

Author

Klaus Schliep klaus.schliep@gmail.com

Thibaut Jombart t.jombart@imperial.ac.uk

Examples

Run this code
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

Run the code above in your browser using DataLab