Skip to content

Commit

Permalink
added untracked files
Browse files Browse the repository at this point in the history
  • Loading branch information
Casey Dunn committed Apr 23, 2015
1 parent 166c9ac commit 59e561a
Show file tree
Hide file tree
Showing 14 changed files with 259 additions and 0 deletions.
Binary file added data/siphonophore_constraint.rda
Binary file not shown.
Binary file added data/siphonophore_ml.rda
Binary file not shown.
12 changes: 12 additions & 0 deletions inst/example.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Load libraries
library(ape)

# An example of how to produce a zero-constraint tree based on the Agalmatidae
# sensu stricto + Bargmannia constraint of Dunn et al. 2005
# (http://dx.doi.org/10.1080/10635150500354837)

data( siphonophore_ml )
data( siphonophore_constraint )

zc <- zero_constrained( siphonophore_ml, siphonophore_constraint )
plot( zc )
27 changes: 27 additions & 0 deletions man/are_bipartitions_incompatible.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{are_bipartitions_incompatible}
\alias{are_bipartitions_incompatible}
\title{Check if two bipartitions drawn from trees with the same tips are incompatible with eachother.
Each bipartition is defined as a vector of the names of the tips on one side of the
bipartition.}
\usage{
are_bipartitions_incompatible(bi1, bi2, phy)
}
\arguments{
\item{bi1}{The first bipartition.}

\item{bi2}{The second bipartition.}

\item{phy}{A phylo object describing a tree that includes all tips under investigation.
This is used to infer the other half of each bipartition.}
}
\value{
TRUE if bi1 is incompatible with bi2, otherwise FALSE.
}
\description{
Check if two bipartitions drawn from trees with the same tips are incompatible with eachother.
Each bipartition is defined as a vector of the names of the tips on one side of the
bipartition.
}

23 changes: 23 additions & 0 deletions man/bipartition_for_edge.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{bipartition_for_edge}
\alias{bipartition_for_edge}
\title{Get a bipartition, described as a vector of tip numbers, from a specified tree and
edge number.}
\usage{
bipartition_for_edge(phy, edge)
}
\arguments{
\item{phy}{A phylo object that specifies the tree.}

\item{edge}{The number of the edge that defines the bipartition.}
}
\value{
A vector of tip nodes (specified by numbers) that define one half of the
bipartition (the other half is the set of tip nodes that are not in this vector).
}
\description{
Get a bipartition, described as a vector of tip numbers, from a specified tree and
edge number.
}

23 changes: 23 additions & 0 deletions man/bipartition_for_edge_by_label.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{bipartition_for_edge_by_label}
\alias{bipartition_for_edge_by_label}
\title{Get a bipartition, described as a vector of tip labels, from a specified tree and
edge number.}
\usage{
bipartition_for_edge_by_label(edge, phy)
}
\arguments{
\item{edge}{The number of the edge that defines the bipartition.}

\item{phy}{A phylo object that specifies the tree.}
}
\value{
A vector of tip nodes (specified by labels) that define one half of the
bipartition (the other half is the set of tip nodes that are not in this vector).
}
\description{
Get a bipartition, described as a vector of tip labels, from a specified tree and
edge number.
}

23 changes: 23 additions & 0 deletions man/descendants.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{descendants}
\alias{descendants}
\title{Get all the descendants of a given node in a tree.}
\usage{
descendants(phy, a, keep_node = FALSE)
}
\arguments{
\item{phy}{A phylo object that specifies the tree.}

\item{a}{The number of a node in phy.}

\item{keep_node}{If FALSE, do not include a in the result.}
}
\value{
A vector of nodes (specified by number) that are descendants of a. Includes
internal and tip nodes.
}
\description{
Get all the descendants of a given node in a tree.
}

20 changes: 20 additions & 0 deletions man/get_bipartitions.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{get_bipartitions}
\alias{get_bipartitions}
\title{Get a list of all the bipartitions in a tree.}
\usage{
get_bipartitions(phy)
}
\arguments{
\item{phy}{A phylo object that specifies the tree.}
}
\value{
A list of bipartitions for the tree. The order of the list corresponds to the
edges in phy$edge. Bipartitions are specified as a vector of the tip labels that make
up one half of the bipartition.
}
\description{
Get a list of all the bipartitions in a tree.
}

13 changes: 13 additions & 0 deletions man/hutan.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/hutan.R
\docType{package}
\name{hutan}
\alias{hutan}
\alias{hutan-package}
\title{hutan: A collection of tools for phylogenetic tree manipulation.}
\description{
The hutan package provides functions for common phylogenetic tree
manipulation tasks, and uses these fascilitate some more specialized
tasks. It is named after the Indonesian word for forest.
}

23 changes: 23 additions & 0 deletions man/incompatible_edges.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{incompatible_edges}
\alias{incompatible_edges}
\title{Identify the edges in one phylo object that are incompatible with the edges in another
phylo object. Requires the same tip labels for each tree.}
\usage{
incompatible_edges(phy1, phy2)
}
\arguments{
\item{phy1}{The tree under consideration}

\item{phy2}{The tree to be compared to}
}
\value{
A boolean vector corresponding to the edges in phy1. Each element is FALSE if
the edge is compatible with phy2, or TRUE if incompatible.
}
\description{
Identify the edges in one phylo object that are incompatible with the edges in another
phylo object. Requires the same tip labels for each tree.
}

27 changes: 27 additions & 0 deletions man/is_incompatible_with_set.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{is_incompatible_with_set}
\alias{is_incompatible_with_set}
\title{Check if bipartition bi is incompatible with the bipartitions in bi_list.
Each bipartition is defined as a vector of the names of the tips on one side of the
bipartition.}
\usage{
is_incompatible_with_set(bi, bi_list, phy)
}
\arguments{
\item{bi}{The query bipartition.}

\item{bi_list}{A list of the bipartitions to be compared against.}

\item{phy}{A phylo object describing a tree that includes all tips under investigation.
This is used to infer the other half of each bipartition.}
}
\value{
TRUE if bi is incompatible with any bipartition in bi_list, otherwise FALSE.
}
\description{
Check if bipartition bi is incompatible with the bipartitions in bi_list.
Each bipartition is defined as a vector of the names of the tips on one side of the
bipartition.
}

21 changes: 21 additions & 0 deletions man/tip_descendants.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{tip_descendants}
\alias{tip_descendants}
\title{Get all the tips that are descendants of a given node in a tree.}
\usage{
tip_descendants(phy, a)
}
\arguments{
\item{phy}{A phylo object that specifies the tree.}

\item{a}{The number of a node in phy.}
}
\value{
A vector of tip nodes (specified by number) that are descendants of a. If a is
a tip, it is the sole element of this vector.
}
\description{
Get all the tips that are descendants of a given node in a tree.
}

18 changes: 18 additions & 0 deletions man/tips.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{tips}
\alias{tips}
\title{Get tips and labels of a phylo object.}
\usage{
tips(phy)
}
\arguments{
\item{phy}{A phylo object.}
}
\value{
A vector of all the tips, annotated with their names
}
\description{
Get tips and labels of a phylo object.
}

29 changes: 29 additions & 0 deletions man/zero_constrained.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{zero_constrained}
\alias{zero_constrained}
\title{Generates the "zero-constrained" tree described by Susko 2014
(http://dx.doi.org/10.1093/molbev/msu039)}
\usage{
zero_constrained(phy_resolved, phy_constraint, epsilon = 1e-06)
}
\arguments{
\item{phy_resolved}{A fully resolved phylogeny stored as a phylo object, e.g. an ML
tree.}

\item{phy_constraint}{A partially resolved constraint tree.}

\item{epsilon}{}
}
\value{
A phylo object containing a tree that is the same as phy_resolved, except that
the length of edges that are incompatible with phy_constraint are replaced with epsilon.
}
\description{
Generates the "zero-constrained" tree described by Susko 2014
(http://dx.doi.org/10.1093/molbev/msu039)
}
\examples{
zc <- zero_constrained( ml, constraint )
}

0 comments on commit 59e561a

Please sign in to comment.