multidna function

multidna: class for multiple gene data

multidna: class for multiple gene data

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

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

Examples

## 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]])

Author(s)

Thibaut Jombart t.jombart@imperial.ac.uk

  • Maintainer: Klaus Schliep
  • License: GPL (>= 2)
  • Last published: 2024-01-31