phylopred

Predicting species interactions from phylogenetic distance under presence-only data.

phylopred models the probability that two species share a parasite (or other interaction) as a function of their phylogenetic distance, and predicts new hosts for a parasite from its known hosts:

Installation

remotes::install_github("alrobles/phylopred")

Documentation site: https://alrobles.github.io/phylopred/

Example

library(phylopred)

pairs <- prepare_pair_data(beetleTreeInteractions, phy_dist)
fit <- fit_phylopred_model(pairs)
summary(fit)

parasite <- names(sort(table(pairs$parasite), decreasing = TRUE))[1]
one <- pairs[pairs$parasite == parasite, ]
one$pred <- predict(fit$fit, newdata = one, type = "response")
m <- host_threshold_metric(one$pred, one$suscept)
plot(m)
roc <- phylo_partial_roc(one$pred, one$suscept, error_rate = 0.95)
plot(roc)

See the vignette caligus-vs-lepeophtheirus for a complete real-data case study with the cofid copepod-fish interaction database and the Fish Tree of Life.

Manuscript

The manuscript, supplementary material, and archived analysis results are maintained separately in the phylopred-paper repository.

References