Package: nodeSub 1.2.8

Thijs Janzen

nodeSub: Simulate DNA Alignments Using Node Substitutions

Simulate DNA sequences for the node substitution model. In the node substitution model, substitutions accumulate additionally during a speciation event, providing a potential mechanistic explanation for substitution rate variation. This package provides tools to simulate such a process, simulate a reference process with only substitutions along the branches, and provides tools to infer phylogenies from alignments. More information can be found in Janzen (2021) <doi:10.1093/sysbio/syab085>.

Authors:Thijs Janzen

nodeSub_1.2.8.tar.gz
nodeSub_1.2.8.zip(r-4.5)nodeSub_1.2.8.zip(r-4.4)nodeSub_1.2.8.zip(r-4.3)
nodeSub_1.2.8.tgz(r-4.4-x86_64)nodeSub_1.2.8.tgz(r-4.4-arm64)nodeSub_1.2.8.tgz(r-4.3-x86_64)nodeSub_1.2.8.tgz(r-4.3-arm64)
nodeSub_1.2.8.tar.gz(r-4.5-noble)nodeSub_1.2.8.tar.gz(r-4.4-noble)
nodeSub_1.2.8.tgz(r-4.4-emscripten)nodeSub_1.2.8.tgz(r-4.3-emscripten)
nodeSub.pdf |nodeSub.html
nodeSub/json (API)

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

Peer review:

Bug tracker:https://github.com/thijsjanzen/nodesub/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openjdk– OpenJDK Java runtime, using Hotspot JIT

On CRAN:

3.00 score 1 stars 3 scripts 200 downloads 18 exports 97 dependencies

Last updated 1 years agofrom:4602a937a0. Checks:OK: 2 WARNING: 7. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 05 2024
R-4.5-win-x86_64WARNINGNov 05 2024
R-4.5-linux-x86_64OKNov 05 2024
R-4.4-win-x86_64WARNINGNov 05 2024
R-4.4-mac-x86_64WARNINGNov 05 2024
R-4.4-mac-aarch64WARNINGNov 05 2024
R-4.3-win-x86_64WARNINGNov 05 2024
R-4.3-mac-x86_64WARNINGNov 05 2024
R-4.3-mac-aarch64WARNINGNov 05 2024

Exports:calc_expected_hidden_nodescalc_fractioncalc_required_node_timecalc_sum_statscount_hiddencreate_balanced_treecreate_equal_alignmentcreate_equal_alignment_explicitcreate_unbalanced_treeestimate_marginal_modelsinfer_phylogenyreduce_treesim_linkedsim_normalsim_normal_explicitsim_unlinkedsim_unlinked_explicitslow_matrix

Dependencies:ade4apeaskpassbeastierbeautierBHbitbit64clicliprclusterGenerationcodacodetoolscolorspacecombinatcpp11crayoncurlDDDDEoptimdeSolvedigestdoParalleldplyrexpmfansiforeachgeigergenericsgluegmphmshttrigraphiteratorsjsonlitelatticelifecyclemagrittrmapsMASSMatrixmimemnormtmvtnormncbitnlmenumDerivopenssloptimParallelpbapplyphangornphylobasephytoolspillarpixmappkgconfigplyrprettyunitsprogresspurrrquadprogR6rappdirsRcppRcppArmadilloRcppEigenreadrreshape2rJavarlangRmpfrrnclRNeXMLscatterplot3dsegmentedseqinrsessioninfospSparseMstringistringrsubplexsystestittibbletidyrtidyselecttracerertzdbutf8uuidvctrsvroomwithrXMLxml2

Readme and manuals

Help Manual

Help pageTopics
Package providing functions to simulate sequences under different DNA evolution modelsnodeSub-package nodeSub
Calculate the number of expected hidden nodes in a phylogenetic treecalc_expected_hidden_nodes
Calculate the expected fraction of substitutions at the nodes, relative to the fraction at the branchescalc_fraction
Calculate the required node time to obtain a desired fraction of substitutions at the nodecalc_required_node_time
calculate summary statistics of a phylogenetic tree, compared with a reference tree. The following statistics are calculated: the beta statistic, gamma statistic, crown age, mean branch length, number of tips, the nLTT statistic and the laplacian difference, given by RPANDA's JSDtree. Because JSDtree can sometimes cause issues, some additional checks are performed to ensure that is possible to run this function.calc_sum_stats
Function to calculate the number of hidden speciation events, e.g. speciation events that have lead to an extinct species. Thus, these hidden speciation events can only be detected in complete trees (as opposed to reconstructed trees).count_hidden
create a balanced tree out of branching timescreate_balanced_tree
function create an alignment with identical information contentcreate_equal_alignment
function create an alignment with identical information content, using the explicit method to simulate substitutionscreate_equal_alignment_explicit
create an unbalanced tree out of branching timescreate_unbalanced_tree
estimate the marginal likelihood of the relaxed and strict clock model for a provided alignmentestimate_marginal_models
calculate p matrixget_p_matrix
infer the time calibrated phylogeny associated with the provided alignment. This function uses the R package babette to infer the phylogeny using BEAST2.infer_phylogeny
Function to remove speciation events occuring after an extinction event. Extinct species are pruned randomly, such that only a single extinct species per branching event (if any extinct species) remains.reduce_tree
simulate a sequence assuming conditional substitutions on the node.sim_linked
Simulate sequences for a given evolutionary tree, using a standard model of sequence evolution along the branches. Code for this function was heavily inspired by the function 'simSeq' from the phangorn package.sim_normal
simulate a sequence assuming substitutions are only accumulated along the branches, using the explicit simulation method (e.g. reverse substitutions are modeled explicitly)sim_normal_explicit
Simulate a sequence assuming node substitutions are not shared amongst offspring, given two substitution matrices: one for substitutions occuring on the nodes, and one for substitutions occuring along the branches.sim_unlinked
Simulate a sequence assuming node substitutions are not shared amongst offspring, using the explicit simulation method (e.g. reverse substitutions are modeled explicitly)sim_unlinked_explicit
this function calculates the p matrix within R this is slower than the C++ implementation in 'get_p_matrix' but provides a way to debug and verifyslow_matrix