Learn R Programming

⚠️There's a newer version (5.8) of this package.Take me there.

ape (version 5.3)

Analyses of Phylogenetics and Evolution

Description

Functions for reading, writing, plotting, and manipulating phylogenetic trees, analyses of comparative data in a phylogenetic framework, ancestral character analyses, analyses of diversification and macroevolution, computing distances from DNA sequences, reading and writing nucleotide sequences as well as importing from BioConductor, and several tools such as Mantel's test, generalized skyline plots, graphical exploration of phylogenetic data (alex, trex, kronoviz), estimation of absolute evolutionary rates and clock-like trees using mean path lengths and penalized likelihood, dating trees with non-contemporaneous sequences, translating DNA into AA sequences, and assessing sequence alignments. Phylogeny estimation can be done with the NJ, BIONJ, ME, MVR, SDM, and triangle methods, and several methods handling incomplete distance matrices (NJ*, BIONJ*, MVR*, and the corresponding triangle method). Some functions call external applications (PhyML, Clustal, T-Coffee, Muscle) whose results are returned into R.

Copy Link

Version

Install

install.packages('ape')

Monthly Downloads

94,730

Version

5.3

License

GPL (>= 2)

Last Published

March 17th, 2019

Functions in ape (5.3)

axisPhylo

Axis on Side of Phylogeny
dnds

dN/dS Ratio
alview

Print DNA or AA Sequence Alignement
all.equal.phylo

Global Comparison of two Phylogenies
dbd

Probability Density Under Birth--Death Models
comparePhylo

Compare Two "phylo" Objects
cophyloplot

Plots two phylogenetic trees face to face with links between the tips.
compar.ou

Ornstein--Uhlenbeck Model for Continuous Characters
corBlomberg

Blomberg et al.'s Correlation Structure
def

Definition of Vectors for Plotting or Annotating
add.scale.bar

Add a Scale Bar to a Phylogeny Plot
Moran.I

Moran's I Autocorrelation Index
alex

Alignment Explorer With Multiple Devices
ape-package

Analyses of Phylogenetics and Evolution
ape-internal

Internal Ape Functions
bd.ext

Extended Version of the Birth-Death Models to Estimate Speciation and Extinction Rates
base.freq

Base frequencies from DNA Sequences
branching.times

Branching Times of a Phylogenetic Tree
c.phylo

Building Lists of Trees
drop.tip

Remove Tips in a Phylogenetic Tree
balance

Balance of a Dichotomous Phylogenetic Tree
bird.families

Phylogeny of the Families of Birds From Sibley and Ahlquist
kronoviz

Plot Multiple Chronograms on the Same Scale
mantel.test

Mantel Test for Similarity of Two Matrices
is.ultrametric

Test if a Tree is Ultrametric
bird.orders

Phylogeny of the Orders of Birds From Sibley and Ahlquist
as.phylo

Conversion Among Tree and Network Objects
apetools

Tools to Explore Files
as.alignment

Conversion Among DNA Sequence Internal Formats
mat3

Three Matrices
additive

Incomplete Distance Matrix Filling
coalescent.intervals

Coalescent Intervals
all.equal.DNAbin

Compare DNA Sets
bd.time

Time-Dependent Birth-Death Models
collapse.singles

Collapse Single Nodes
as.bitsplits

Split Frequencies and Conversion Among Split Classes
compar.gee

Comparative Analysis with GEEs
phydataplot

Tree Annotation
print.phylo

Compact Display of a Phylogeny
pcoa

Principal Coordinate Analysis
as.phylo.formula

Conversion from Taxonomy Variables to Phylogenetic Trees
compar.lynch

Lynch's Comparative Method
binaryPGLMM

Phylogenetic Generalized Linear Mixed Model for Binary Data
checkAlignment

Check DNA Alignments
as.matching

Conversion Between Phylo and Matching Objects
carnivora

Carnivora body sizes and life history traits
rDNAbin

Random DNA Sequences
birthdeath

Estimation of Speciation and Extinction Rates With Birth-Death Models
read.gff

Read GFF Files
read.nexus

Read Tree File in Nexus Format
boot.phylo

Tree Bipartition and Bootstrapping Phylogenies
bind.tree

Binds Trees
checkLabel

Checking Labels
woodmouse

Cytochrome b Gene Sequences of Woodmice
chronopl

Molecular Dating With Penalized Likelihood
chronoMPL

Molecular Dating With Mean Path Lengths
checkValidPhylo

Check the Structure of a "phylo" Object
BIONJ

Tree Estimation Based on an Improved Version of the NJ Algorithm
chronos

Molecular Dating by Penalised Likelihood and Maximum Likelihood
consensus

Concensus Trees
write.dna

Write DNA Sequences in a File
cherry

Number of Cherries and Null Models of Trees
corPagel

Pagel's ``lambda'' Correlation Structure
chiroptera

Bat Phylogeny
delta.plot

Delta Plots
del.gaps

Delete Alignment Gaps in DNA Sequences
corphylo

Correlations among Multiple Traits with Phylogenetic Signal
cophenetic.phylo

Pairwise Distances from a Phylogenetic Tree
dist.dna

Pairwise Distances from DNA Sequences
corBrownian

Brownian Correlation Structure
compute.brlen

Branch Lengths Computation
howmanytrees

Calculate Numbers of Phylogenetic Trees
corClasses

Phylogenetic Correlation Structures
identify.phylo

Graphical Identification of Nodes and Tips
is.compatible

Check Compatibility of Splits
is.monophyletic

Is Group Monophyletic
makeLabel

Label Management
compute.brtime

Compute and Set Branching Times
clustal

Multiple Sequence Alignment with External Applications
makeNodeLabel

Makes Node Labels
dist.gene

Pairwise Distances from Genetic Data
gammaStat

Gamma-Statistic of Pybus and Harvey
correlogram.formula

Phylogenetic Correlogram
hivtree

Phylogenetic Tree of 193 HIV-1 Sequences
collapsed.intervals

Collapsed Coalescent Intervals
compar.cheverud

Cheverud's Comparative Method
corGrafen

Grafen's (1989) Correlation Structure
data.nex

NEXUS Data Example
label2table

Label Management
corMartins

Martins's (1997) Correlation Structure
dist.topo

Topological Distances Between Two Trees
diversi.time

Analysis of Diversification with Survival Models
diversity.contrast.test

Diversity Contrast Test
diversi.gof

Tests of Constant Diversification Rates
ladderize

Ladderize a Tree
edges

Draw Additional Edges on a Plotted Tree
image.DNAbin

Plot of DNA Sequence Alignement
evonet

Evolutionary Networks
njs

Tree Reconstruction from Incomplete Distances With NJ* or bio-NJ*
matexpo

Matrix Exponential
ewLasso

Incomplete distances and edge weights of unrooted topology
is.binary

Test for Binary Tree
mcmc.popsize

Reversible Jump MCMC to Infer Demographic History
FastME

Tree Estimation Based on the Minimum Evolution Algorithm
node.dating

node.dating
lmorigin

Multiple regression through the origin
mcconwaysims.test

McConway-Sims Test of Homogeneous Diversification
node.depth

Depth and Heights of Nodes and Tips
pic.ortho

Phylogenetically Independent Orthonormal Contrasts
plot.correlogram

Plot a Correlogram
rTraitMult

Multivariate Character Simulation
mrca

Find Most Recent Common Ancestors Between Pairs
mst

Minimum Spanning Tree
ltt.plot

Lineages Through Time Plot
read.GenBank

Read DNA Sequences from GenBank via Internet
mixedFontLabel

Mixed Font Labels for Plotting
nodelabels

Labelling the Nodes, Tips, and Edges of a Tree
nodepath

Find Paths of Nodes
phymltest

Fits a Bunch of Models with PhyML
mat5M3ID

Five Trees
pic

Phylogenetically Independent Contrasts
plot.varcomp

Plot Variance Components
parafit

Test of host-parasite coevolution
multi2di

Collapse and Resolve Multichotomies
rTraitCont

Continuous Character Simulation
reconstruct

Continuous Ancestral Character Estimation
mat5Mrand

Five Independent Trees
mvr

Minimum Variance Reduction
plotTreeTime

Plot Tree With Time Axis
read.nexus.data

Read Character Data In NEXUS Format
reorder.phylo

Internal Reordering of Trees
multiphylo

Manipulating Lists of Trees
rTraitDisc

Discrete Character Simulation
nj

Neighbor-Joining Tree Estimation
root

Roots Phylogenetic Trees
plot.phylo

Plot Phylogenies
plot.phylo.extra

Extra Fuctions to Plot and Annotate Phylogenies
read.caic

Read Tree File in CAIC Format
read.tree

Read Tree File in Parenthetic Format
speciesTree

Species Tree Estimation
subtreeplot

Zoom on a Portion of a Phylogeny by Successive Clicks
stree

Generates Systematic Regular Trees
subtrees

All subtrees of a Phylogenetic Tree
rtree

Generates Random Trees
rotate

Swapping Sister Clades
triangMtd

Tree Reconstruction Based on the Triangles Method
seg.sites

Find Segregating Sites in DNA Sequences
rtt

Root a Tree by Root-to-Tip Regression
skyline

Skyline Plot Estimate of Effective Population Size
treePop

Tree Popping
trex

Tree Explorer With Multiple Devices
read.dna

Read DNA Sequences in a File
summary.phylo

Print Summary of a Phylogeny
unique.multiPhylo

Revomes Duplicate Trees
updateLabel

Update Labels
varCompPhylip

Variance Components with Orthonormal Contrasts
write.tree

Write Tree File in Parenthetic Format
yule

Fits the Yule Model to a Phylogenetic Tree
yule.cov

Fits the Yule Model With Covariates
trans

Translation from DNA to Amino Acid Sequences
richness.yule.test

Test of Diversification-Shift With the Yule Process
yule.time

Fits the Time-Dependent Yule Model
rlineage

Tree Simulation Under the Time-Dependent Birth--Death Models
write.nexus

Write Tree File in Nexus Format
write.nexus.data

Write Character Data in NEXUS Format
vcv2phylo

Variance-Covariance Matrix to Tree
zoom

Zoom on a Portion of a Phylogeny
weight.taxo

Define Similarity Matrix
skylineplot

Drawing Skyline Plot Graphs
slowinskiguyer.test

Slowinski-Guyer Test of Homogeneous Diversification
varcomp

Compute Variance Component Estimates
vcv

Phylogenetic Variance-covariance or Correlation Matrix
where

Find Patterns in DNA Sequences
which.edge

Identifies Edges of a Tree
AAbin

Amino Acid Sequences
DNAbin2indel

Recode Blocks of Indels
Initialize.corPhyl

Initialize a `corPhyl' Structure Object
MPR

Most Parsimonious Reconstruction
DNAbin

Manipulate DNA Sequences in Bit-Level Format
SDM

Construction of Consensus Distance Matrix With SDM
LTT

Theoretical Lineage-Through Time Plots
ace

Ancestral Character Estimation
CADM.global

Congruence among distance matrices