]> git.donarmstrong.com Git - ape.git/blob - man/njs.Rd
new code for reading FASTA files
[ape.git] / man / njs.Rd
1 \name{njs}
2 \alias{njs}
3 \alias{bionjs}
4 \title{Tree Reconstruction from Incomplete Distances With NJ* or bio-NJ*}
5 \description{
6   Reconstructs a phylogenetic tree from a distance matrix with possibly
7   missing values.
8 }
9 \usage{
10 njs(X, fs = 15)
11 bionjs(X, fs = 15)
12 }
13 \arguments{
14   \item{X}{a distance matrix.}
15   \item{fs}{argument \emph{s} of the agglomerative criterion: it is
16     coerced as an integer and must at least equal to one.}
17 }
18 \details{
19   Missing values represented by either \code{NA} or any negative number.
20
21   Basically, the Q* criterion is applied to all the pairs of leaves, and
22   the \emph{s} highest scoring ones are chosen for further analysis by
23   the agglomeration criteria that better handle missing distances (see
24   references for details).
25 }
26 \value{
27   an object of class \code{"phylo"}.
28 }
29 \references{
30   \url{http://www.biomedcentral.com/1471-2105/9/166}
31 }
32 \author{Andrei Popescu \email{niteloserpopescu@gmail.com}}
33 \seealso{
34   \code{\link{nj}}, \code{\link{bionj}}, \code{\link{triangMtds}}
35 }
36 \examples{
37 data(woodmouse)
38 d <- dist.dna(woodmouse)
39 dm <- d
40 dm[sample(length(dm), size = 3)] <- NA
41 dist.topo(njs(dm), nj(d)) # often 0
42 dm[sample(length(dm), size = 10)] <- NA
43 dist.topo(njs(dm), nj(d)) # sometimes 0
44 }
45 \keyword{models}