Rneighbor: R interface for neighbor

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

Description

This function is an R interface for neighbor in the PHYLIP package (Felsenstein 2013). neighbor can be used for neighbor-joining (Saitou & Nei 1987) and UPGMA (Sokal & Michener 1958) phylogeny inference.

Usage

1
Rneighbor(D, path=NULL , ...)

Arguments

D

a distance matrix as an object of class "matrix" or "dist". If a matrix, then D should be symmetrical with a diagonal of zeros.

path

path to the executable containing neighbor. If path = NULL, the R will search several commonly used directories for the correct executable file.

...

optional arguments to be passed to neighbor. See details for more information.

Details

Optional arguments include the following: quiet suppress some output to R console (defaults to quiet = FALSE); method - can be "NJ" or "nj" (for neighbor-joining), or "UPGMA" or "UPGMA" (for UPGMA); random.order add taxa to tree in random order (defaults to random.order = TRUE); outgroup outgroup if outgroup rooting of the estimated tree is desired (only works for method = "NJ", UPGMA trees are already rooted); and cleanup remove PHYLIP input & output files after the analysis is completed (defaults to cleanup = TRUE).

More information about the neighbor program in PHYLIP can be found here http://evolution.genetics.washington.edu/phylip/doc/neighbor.html.

Obviously, use of any of the functions of this package requires that PHYLIP (Felsenstein 1989, 2013) should first be installed. More information about installing PHYLIP can be found on the PHYLIP webpage: http://evolution.genetics.washington.edu/phylip.html.

Value

This function returns an object of class "phylo" that is the NJ or UPGMA tree.

Author(s)

Liam J. Revell, Scott A. Chamberlain

Maintainer: Liam J. Revell <liam.revell@umb.edu>

References

Saitou, N., Nei, M. (1987) The neighbor-joining method: A new method for reconstructing phylogenetic trees. Molecular Biology and Evolution, 4, 406-425.

Sokal, R., Michener, C. (1958) A statistical method for evaluating systematic relationships. University of Kansas Science Bulletin, 38, 1409-1438.

Felsenstein, J. (1989) PHYLIP–Phylogeny Inference Package (Version 3.2). Cladistics, 5, 164-166.

Felsenstein, J. (2013) PHYLIP (Phylogeny Inference Package) version 3.695. Distributed by the author. Department of Genome Sciences, University of Washington, Seattle.

See Also

Rdnadist

Examples

1
2
3
4
5
6
## Not run: 
data(primates)
D<-dist.dna(data(primates),model="JC")
tree<-Rneighbor(D)

## End(Not run)

Rphylip documentation built on May 2, 2019, 11:11 a.m.