Description Usage Arguments Value Examples
For each taxonomic rank, all taxa designated as MDM are removed from the original network (igraph) using names of the MDM found by the met_wo_unk function. A new network (igraph) for each rank is produced, where only taxa with known taxonomic classification are present.
1 | get_graph_wo_unk(orig_graph, met_wo_unk)
|
orig_graph |
Network (graph) of all taxa, including MDM |
met_wo_unk |
List of 7 otu tables, produced from met_wo_unk function, each corresponding to the taxa with known classification at that rank. Each OTU table shows the taxa ids and counts for these known taxa. |
Returns List of 7 igraph objects.
wo_unk_graph1 |
Network (igraph) of taxa with known Kingdom classification |
wo_unk_graph2 |
Network (igraph) of taxa with known Phylum classification |
wo_unk_graph3 |
Network (igraph) of taxa with known Class classification |
wo_unk_graph4 |
Network (igraph) of taxa with known Order classification' |
wo_unk_graph5 |
Network (igraph) of taxa with known Family classification |
wo_unk_graph6 |
Network (igraph) of taxa with known Genus classification |
wo_unk_graph7 |
Network (igraph) of taxa with known Species classification |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (orig_graph, met_wo_unk)
{
wo_unk_graph_l = list()
for (name in names(met_wo_unk)) {
print(name)
tax_level = name
wo_unk_graph <- igraph::delete_vertices(orig_graph, which(!names(V(orig_graph)) %in%
rownames(met_wo_unk[[tax_level]])))
print(wo_unk_graph)
wo_unk_graph_l[[name]] = wo_unk_graph
}
return(wo_unk_graph_l)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.