Package: phybase 1.1

Liang Liu

phybase: Basic functions for phylogenetic analysis

This package provides functions to read, write, manipulate, estimate, and summarize phylogenetic trees including species trees which contain not only the topology and branch lengths but also population sizes. The input/output functions can read tree files in which trees are presented in parenthetic format. The trees are read in as a string and then transformed to a matrix which describes the relationship of nodes and branch lengths. The nodes matrix provides an easy access for developers to further manipulate the tree, while the tree string provides interface with other phylogenetic R packages such as "ape". The input/output functions can also be used to change the format of tree files between NEXUS and PHYLIP. Some basic functions have already been established in the package for manipulating trees such as deleting and swapping nodes, rooting and unrooting trees, changing the root of the tree. The package also includes functions such as "consensus", "coaltime, "popsize", "treedist" for summarizing phylogenetic trees, calculating the coalescence time, population size, and tree distance. The function maxtree is built in the package to esimtate the species tree from multiple gene trees.

Authors:Liang Liu

phybase_1.1.tar.gz
phybase_1.1.zip(r-4.5)phybase_1.1.zip(r-4.4)phybase_1.1.zip(r-4.3)
phybase_1.1.tgz(r-4.4-x86_64)phybase_1.1.tgz(r-4.4-arm64)phybase_1.1.tgz(r-4.3-x86_64)phybase_1.1.tgz(r-4.3-arm64)
phybase_1.1.tar.gz(r-4.5-noble)phybase_1.1.tar.gz(r-4.4-noble)
phybase_1.1.tgz(r-4.4-emscripten)phybase_1.1.tgz(r-4.3-emscripten)
phybase.pdf |phybase.html
phybase/json (API)

# Install 'phybase' in R:
install.packages('phybase', repos = c('https://phylotastic.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Datasets:

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

1.88 score 75 scripts 18 downloads 69 exports 6 dependencies

Last updated 17 years agofrom:d8ea06b72e. Checks:OK: 1 NOTE: 8. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 05 2024
R-4.5-win-x86_64NOTENov 05 2024
R-4.5-linux-x86_64NOTENov 05 2024
R-4.4-win-x86_64NOTENov 05 2024
R-4.4-mac-x86_64NOTENov 05 2024
R-4.4-mac-aarch64NOTENov 05 2024
R-4.3-win-x86_64NOTENov 05 2024
R-4.3-mac-x86_64NOTENov 05 2024
R-4.3-mac-aarch64NOTENov 05 2024

Exports:ancandtimeancestorbootstrapbootstrap.mulgenechange.rootChangeBrlencoal.sptreecoaltimeconsensedel.nodeFindSpnodeDownGenenodegenetree.vectorgetcoaltimegetncoalis.clockis.rootedtreemaxtreemrca.2nodesmrca.nodesmutation_expname2nodenoclock2clocknode.heightnode2nameoffspring.nodesoffspring.nodes.stringoffspring.speciespair.distpair.dist.dnapair.dist.mulseqpartition.treeplottreepopsizepopulationMutationpostdist.treerank.nodesrannalandyangrdirichletread.dna.seqread.tree.nodesread.tree.stringroot.treerootoftreesctreesim.coaltreesim.coaltree.spsim.coaltree.sp.musim.dnasimnucleotidesimSeqfromSpsite.patternsortmatspecies.namespstructurestar.sptreesteac.sptreesubtreesubtree.lengthswap.nodestreedisttriplelogliketriplenumbertripleparatripleProbunroottreeupgmawrite.dnawrite.subtreewrite.tree.string

Dependencies:apedigestlatticeMatrixnlmeRcpp

Readme and manuals

Help Manual

Help pageTopics
Basic functions for Phylogenetic treesPhyBase
Get ancestors and their divergence timesancandtime
Find the ancestral nodes of a nodeancestor
Bootstrap sequencesbootstrap
Bootstrap sequences from multiple locibootstrap.mulgene
Change tree rootchange.root
Change the branch lengthChangeBrlen
Estimating species trees using average coalescence timescoal.sptree
Coalescence time of two nodescoaltime
Consensus treeconsense
Delete a node from the treedel.node
Internal functionFindSpnodeDownGenenode
Construct gene tree vectors from multiple locigenetree.vector
Get coalescence timesgetcoaltime
internal functiongetncoal
Is a clock tree or notis.clock
Is the tree rooted or notis.rootedtree
Maximum Treemaxtree
Find the most recent common ancestor of two nodesmrca.2nodes
Find the most recent common ancestor of multiple nodesmrca.nodes
Generate mutation rates for populations in the species treemutation_exp
Replace species names by their node numbersname2node
Convert a non-clocklike tree to a clocklike treenoclock2clock
Calculate node heightnode.height
Replace node numbers by species names in a tree stringnode2name
Find the offspring nodesoffspring.nodes
Find offspring nodes (internal use only)offspring.nodes.string
Find the species nodesoffspring.species
Calculate all pairwise distances among taxa in the treepair.dist
Calculate pairwise distances among DNA sequencespair.dist.dna
Calculate pairwise distances among speciespair.dist.mulseq
partition a treepartition.tree
Write a tree fileplottree
Population size of the most recent common ancestor of two nodespopsize
Change branch lengths of a gene tree in the non-clocklike species tree model (internal use only)populationMutation
Calculate posterior probabilities of treespostdist.tree
Node ranks (internal use only)rank.nodes
Rannala and Yang's formularannalandyang
Generate random numbers from the dirichlet distributionrdirichlet
Read sequences from filesread.dna.seq
Read tree nodesread.tree.nodes
Read tree strings from a tree fileread.tree.string
Root a treeroot.tree
An example of rooted treesrooted.tree
Root of a treerootoftree
Shallowest Coalescence Treesctree
Simulate a coalescence treesim.coaltree
simulate a gene tree from the species treesim.coaltree.sp
Simulate a gene tree from the non-clock species tree modelsim.coaltree.sp.mu
Simulate DNA sequences from substitution modelssim.dna
Intrinsic function used in sim.dnasimnucleotide
simulate DNA sequences from a species treesimSeqfromSp
Site patternssite.pattern
Sort a matrixsortmat
Species names in a tree stringspecies.name
Create a sequence-species relationshipspstructure
A species treesptree
Build a STAR treestar.sptree
Build a STEAC treesteac.sptree
Subtreesubtree
Calculate total branch length of a treesubtree.length
Swap two nodesswap.nodes
Distance between two treestreedist
Loglikehood of Triplestripleloglike
Internal functiontriplenumber
Internal functiontriplepara
Probability of a set of rooted triplestripleProb
An example of unrooted treesunrooted.tree
Unroot a treeunroottree
UPGMA treeupgma
Write sequences to a Nexus filewrite.dna
Write a sub-tree into a stringwrite.subtree
Write a tree filewrite.tree.string