# Load the data
data(mycorrhizal_network)
network <- mycorrhizal_network[[1]] # interaction matrix
tree_orchids <- mycorrhizal_network[[2]] # phylogenetic tree (phylo object)
tree_fungi <- mycorrhizal_network[[3]] # phylogenetic tree (phylo object)
test <- FALSE
if(test){
# Clade-specific phylogenetic signal in species interactions in guild A
# (do closely related species interact with similar partners in sub-clades of guild A?)
results_clade_A <- phylosignal_sub_network(network, tree_A = tree_orchids, tree_B = tree_fungi,
method = "GUniFrac", correlation = "Pearson")
plot_phylosignal_sub_network(tree_A = tree_orchids, results_clade_A, network)
# Clade-specific phylogenetic signal in species interactions in guild B
# (do closely related species interact with similar partners in sub-clades of guild B?)
results_clade_B <- phylosignal_sub_network(t(network), tree_A = tree_fungi, tree_B = tree_orchids,
method = "GUniFrac", correlation = "Pearson")
plot_phylosignal_sub_network(tree_A = tree_fungi, results_clade_B, t(network))
}
Run the code above in your browser using DataLab