{
# Data preparation
data("Two_group")
set.seed(999)
# Analysis
network_results <- network_analysis(
taxobj = Two_group,
taxlevel = "Species",
n = 10,
threshold = 0.6
)
# Default mode
network_visual_obj <- network_visual(network_obj = network_results)
# View again
network_visual_re(network_visual_obj)
# More modules
network_visual_obj <- network_visual(
network_obj = network_results,
major_num = 10
)
# Specific tax
# Generate top 5 phyla for displaying
community <- community_plot(
taxobj = Two_group,
taxlevel = "Phylum",
n = 5,
palette = "Paired"
)
display_phyla <- names(community$filled_color)
network_visual_obj <- network_visual(
network_obj = network_results,
mode = "major_tax",
taxlevel = "Phylum",
select_tax = display_phyla,
palette = community$filled_color
)
# Another sample for specific tax
network_visual_obj <- network_visual(
network_obj = network_results,
mode = "major_tax",
taxlevel = "Phylum",
select_tax = "p__Proteobacteria"
)
}
Run the code above in your browser using DataLab