initialize-multiphyDat-method: multiphyDat constructor

Description Usage Arguments Author(s) See Also Examples

Description

New multiphyDat objects can be created using new("multiphyDat", ...) where "..." are arguments documented below. The main input is a list of phyDat matrices. The constructor ensures that all matrices will be reordered in the same way, and genes with missing individuals will be filled by sequences of gaps ("-").

Usage

1
2
3
4
## S4 method for signature 'multiphyDat'
initialize(.Object, seq = NULL,
  type = character(0), ind.info = NULL, gene.info = NULL,
  add.gaps = TRUE, quiet = FALSE, ...)

Arguments

.Object

the object skeleton, automatically generated when calling new.

seq

a list of phyDat matrices (1 per gene); rows should be labelled and indicate individuals, but different individuals and different orders can be used in different matrices.

type

a character string indicating the type of the sequences stored: "DNA" for DNA sequences, "AA" for amino-acids.

ind.info

an optional data.frame containing information on the individuals, where individuals are in rows.

gene.info

an optional data.frame containing information on the genes, where genes are in rows.

add.gaps

a logical indicating if gap-only sequences should be used where sequences are missing; defaults to TRUE.

quiet

a logical indicating if messages should be shown; defaults to FALSE.

...

further arguments to be passed to other methods

Author(s)

Klaus Schliep klaus.schliep@gmail.com

Thibaut Jombart t.jombart@imperial.ac.uk

See Also

Examples

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

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