multidna: multidna: class for multiple gene data

Description Slots Author(s) Examples

Description

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.

Slots

dna

a list of DNAbin matrices; empty slot should be NULL

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(s)

Thibaut Jombart t.jombart@imperial.ac.uk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## 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]])

apex documentation built on April 14, 2020, 5:32 p.m.