https://github.com/cran/ape
Raw File
Tip revision: 1330e272d62c723b8073c95b066950b294f59697 authored by Emmanuel Paradis on 20 October 2012, 00:00:00 UTC
version 3.0-6
Tip revision: 1330e27
njs.Rd
\name{njs}
\alias{njs}
\alias{bionjs}
\title{Tree Reconstruction from Incomplete Distances With NJ* or bio-NJ*}
\description{
  Reconstructs a phylogenetic tree from a distance matrix with possibly
  missing values.
}
\usage{
njs(X, fs = 15)
bionjs(X, fs = 15)
}
\arguments{
  \item{X}{a distance matrix.}
  \item{fs}{argument \emph{s} of the agglomerative criterion: it is
    coerced as an integer and must at least equal to one.}
}
\details{
  Missing values represented by either \code{NA} or any negative number.

  Basically, the Q* criterion is applied to all the pairs of leaves, and
  the \emph{s} highest scoring ones are chosen for further analysis by
  the agglomeration criteria that better handle missing distances (see
  references for details).
}
\value{
  an object of class \code{"phylo"}.
}
\references{
  \url{http://www.biomedcentral.com/1471-2105/9/166}
}
\author{Andrei Popescu \email{niteloserpopescu@gmail.com}}
\seealso{
  \code{\link{nj}}, \code{\link{bionj}}, \code{\link{triangMtds}}
}
\examples{
data(woodmouse)
d <- dist.dna(woodmouse)
dm <- d
dm[sample(length(dm), size = 3)] <- NA
dist.topo(njs(dm), nj(d)) # often 0
dm[sample(length(dm), size = 10)] <- NA
dist.topo(njs(dm), nj(d)) # sometimes 0
}
\keyword{models}
back to top