monophyly: Species monophyly over a tree

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Determines if the species given in sppVector form monophyletic groups on a given tree.

Usage

1
2
3
monophyly(phy, sppVector, pp = NA, singletonsMono = TRUE)
monophylyBoot(phy, sppVector, DNAbin, thresh = 0.7, reroot=TRUE, 
    pp = NA, singletonsMono = TRUE, reps = 1000, block = 3)

Arguments

phy

A tree of class ‘phylo’.

sppVector

Species vector. See sppVector

.

pp

Object of class ‘prop.part’. Assists in speeding up the function, if it has been called already. Default of NA, calling prop.part internally.

singletonsMono

Logical. Should singletons (i.e. only a single specimen representing that species) be treated as monophyletic? Default of TRUE. Possible values of FALSE and NA.

DNAbin

An object of class 'DNAbin'. Required for calculating bootstrap values.

thresh

Numeric between 0 and 1. Bootstrap threshold under which potentially monophyletic species are negated. Default of 0.7.

reroot

Logical. Should the bootstrap replicates be rerooted on the longest edge? Default of TRUE.

reps

Numeric. Number of bootstrap replications. Default of 1000.

block

The number of nucleotides that will be resampled together. Default of 3 to resample on the codon level.

Details

monophyly determines if each species is monophyletic. monophylyBoot incorporates a bootstrap test to determine the support for this monophyly. Species with a bootstrap support lower than "thresh" are recorded as FALSE.

Rerooting is done on the longest internal edge in the tree returned by nj(dist.dna(DNAbin)).

Value

monophyly returns a logical vector, stating if each species is monophyletic. Values correspond to the species order given by unique(sppVector).

monophylyBoot returns a list with the following elements:

results

A logical vector, stating if each species is monophyletic with a bootstrap support higher than the given threshold.

BSvalues

A numeric vector giving the bootstrap proportions for each node of phy.

Author(s)

Samuel Brown <s_d_j_brown@hotmail.com>

See Also

prop.part, root, boot.phylo.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#Random trees
set.seed(16)
tr <- rtree(15)
spp <- rep(LETTERS[1:5], rep(3,5))
monophyly(tr, spp)

tr2 <- tr
spp2 <- c(rep(LETTERS[1:4], rep(3,4)), LETTERS[5:7])
monophyly(tr2, spp2)

#Empirical data
## Not run: 
data(anoteropsis)
anoTree <- nj(dist.dna(anoteropsis))
anoSpp <- sapply(strsplit(dimnames(anoteropsis)[[1]], split="_"), 
    function(x) paste(x[1], x[2], sep="_"))

monophyly(anoTree, anoSpp)
monophyly(anoTree, anoSpp, singletonsMono=FALSE)
unique(anoSpp)

#To get score for each individual
anoMono <- monophyly(anoTree, anoSpp)
anoMono[match(anoSpp, unique(anoSpp))]

data(woodmouse)
woodTree <- nj(dist.dna(woodmouse))
woodSpp <- c("D", "C", "C", "A", "A", "E", "A", "F", "C", "F", "E", "D", "A", "A", "E")
unique(woodSpp)
monophyly(woodTree, woodSpp)
woodMono <- monophylyBoot(woodTree, woodSpp, woodmouse)
woodMono$results
woodMono$BSvalues

monophylyBoot(woodTree, woodSpp, woodmouse, reroot = FALSE)
monophylyBoot(woodTree, woodSpp, woodmouse, thresh = 0.9, reroot = FALSE)

## End(Not run)

spider documentation built on May 2, 2019, 5:16 p.m.