knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

geotax

This packages aims to model the probability that two host share a pathogen given a phylogenetic (or taxonomic) distance. Please link to the original paper

Installation

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

# install.packages("devtools")
devtools::install_github("alrobles/geotax")

Examples

geotax comes with basic tools. For example compute a taxonomic tree from a table with taxonomic ranks. In this example we load a taxonomic tree of species that has been record with bark beetles. We use the table provide in the paper.

We can also plot this tree and explore the distance matrix with the help of ape package

library(geotax)
library(dplyr) ## this is for clean the data if need it
data("tax_table")
clean_tree <- distinct(tax_table)

# clean the data
taxonomic_tree <- geotax::get_taxonomical_tree(clean_tree, power = 1)
plot(taxonomic_tree, type = "radial", show.tip.label = FALSE)
ape::cophenetic.phylo(taxonomic_tree)[1:5, 1:5]


alrobles/geotax documentation built on July 27, 2023, 4:37 a.m.