Description Usage Arguments Details Value References Examples
View source: R/specificity_scripts.R
Calculate phylogenetic specificity not relativized by null mdoels.
1 | phylogenetic.specificity(x, tree, abundance.weighted = TRUE, trim = TRUE)
|
x |
Data frame. Host by symbiont data frame with hosts populating rows and symbionts populating columns. |
tree |
Newick formatted host phylogenetic tree. Cophenetic distances will be calculated the function. |
abundance.weighted |
Logical. TRUE calculates abundance-weighted mean pairwise phylogenetic distance. FALSE calculates presence-absence mean pairwise phylogenetic distance. |
trim |
Logical. TRUE removes symbionts that occupy one host species. FALSE keeps all symbionts. |
Hosts are labeled by their species name with a period and number identifier (e.g., hostA.1) to differentiate host samples that are of the same species. This naming scheme is required because host specificity is quantified at the level of host species and not host samples. If this naming scheme does not apply to your experimental design, you should still add in identifiers (e.g., .1, .2, .3, etc.) after each host species or sample identifer.
Host specificity for a symbiont is evaluated across the entire host community. More positive values indicate a narrower symbiont niche and higher host specificity.Phylogenetic specificity is negated (multipled by -1) to make this consistent across all metrics.
A data frame with symbiont identifiers and phylogenetic specificity values.
Austen Apigo and Ryoko Oono. 2021. Novel metrics reveal plant abundance, but not plant evolutionary history, shape host specificity in foliar fungal symbionts. In review.
1 2 | # Calculate mean pairwise phylogenetic distance per symbiont
mpd <- phylogenetic.specificity(comm.matrix, tree = phylo.tree, abundance.weighted = TRUE, trim = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.