Learn R Programming

Rtapas

We introduce Rtapas (v1.1.1), an R package to perform Random Tanglegram Partitions (Balbuena et al. 2020). Rtapas applies a given global-fit method to random partial tanglegrams of a fixed size to identify the associations, terminals, and nodes that maximize phylogenetic congruence. Incorporates ParaFit (Legendre et al. 2002), geodesic distances (GD) (Schardl et al. 2008) and PACo (Balbuena et al. 2013) as global-fit methods to implement Random TaPas. Rtapas further enhances the usability and implementation of Random TaPas by including functions (i) to facilitate the prior processing of association data between taxa, (ii) to estimate, in a set of probability trees, the statistic of a given global-fit method, (iii) to estimate the (in)congruence metrics of the individual host-symbiont associations, and (iv) to compute either conventional (G) or normalized (G*) (Raffinetti et al. 2015) characterizing the distribution of such metrics.

Installation

You can install the development version of Rtapas from GitHub with:

# install.packages("devtools")
devtools::install_github("mllaberia/Rtapas")

Example

This is a basic example which shows you how to solve a common problem:

library(Rtapas)
data(nuc_pc)
N = 1e+2  # we recommend using 1e+4.
n = n = round(sum(np_matrix)*0.2)
NPc <- max_cong(np_matrix, NUCtr, CPtr, n, N, method = "paco",
               symmetric = FALSE, ei.correct = "sqrt.D",
               percentile = 0.01, res.fq = FALSE,
               strat = "parallel", cl = 10)

tangle_gram(NUCtr, CPtr, np_matrix, NPc, colscale = "sequential", 
            colgrad = c("darkorchid4", "gold"), nbreaks = 50, node.tag = TRUE, 
            cexpt = 1.2, link.lwd = 1, link.lty = 1, fsize = 0.75, pts = FALSE,
            ftype ="i")

Copy Link

Version

Install

install.packages('Rtapas')

Monthly Downloads

215

Version

1.2

License

MIT + file LICENSE

Maintainer

Mar Llaberia-Robledillo

Last Published

June 13th, 2024

Functions in Rtapas (1.2)

paco_ss

Procrustes Approach to Cophylogeny (PACo) of the host and symbiont configurations
geo_D

Geodesic distance between trees
max_cong

Algortihm for maximizing congruence between two phylogenies
nuc_cp

Nuclear and chloroplast dataset of orchids
max_incong

Algortihm for maximizing incongruence between two phylogenies
gini_RSV

The Gini coefficient adjusted for negative attributes (Raffinetti, Siletti, & Vernizzi, 2015)
gini_ci

Plot the confidence intervals of Gini coefficient
assoc_mat

Create an host-symbiont association matrix
linkf_CI

Confidence intervals for the frequency of host-symbiont association
link_freq

Frequency of host-symbiont association
tangle_gram

Tanglegram of the host-symbiont frequencies
paraF

Test of host-symbiont coevolution
prob_statistic

Frequencies of the associations for the posterior probability trees
trimHS_maxC

Trims the H-S association matrix maximizing the congruence
amph_trem

amph_trem dataset
one2one_f

Maximum number of unique one-to-one association over a number of runs
trimHS_maxI

Trims the H-S association matrix maximizing the incongruence