# 保留节点数≥30的模块和ID为10的模块co_net_modu2<-filter_n_module(co_net_modu,n_node_in_module=30,keep_id=10)plot(co_net_modu2,plot_module=T,mark_module=T,legend_position=c(-1.8,1.3,1.1,1.3))# change group layoutg_layout_circlepack(co_net_modu,group="module")->coorsplot(co_net_modu2,coors=coors,plot_module=T,mark_module=T,edge_legend=F)# extract some modules, delete =T will delete other modules.co_net_modu3<-filter_n_module(co_net_modu,n_node_in_module=30,keep_id=10,delete=T)plot(co_net_modu3,coors,plot_module=T)
co_net_modu4<-c_net_filter(co_net_modu,components==1)# re-do a module detectionco_net_modu4<-module_detect(co_net_modu4)g_layout_circlepack(co_net_modu4,group="module")->coorsplot(co_net_modu4,coors,plot_module=T)
# map the original abundance tablemodule_eigen(co_net_pos_modu,totu)->co_net_pos_modu# plot the expression patternp1<-module_expression(co_net_pos_modu,totu,r_threshold=0.6,facet_param=list(ncol=4),plot_eigen=T)+theme(axis.text.x=element_text(size=5,angle=90,vjust=0.5))# correlate to metadataenv<-metadata[,3:8]p2<-cor_plot(get_module_eigen(co_net_pos_modu),env)+coord_flip()p1/p2+patchwork::plot_layout(heights=c(2,1.4))
1
2
3
4
5
6
# summary some variable according to modules.p3<-summary_module(co_net_pos_modu,var="Phylum")+scale_fill_pc()p4<-summary_module(co_net_pos_modu,var="node_eigen_cor")+scale_color_pc(palette="col2")p3+p4
参考R. Guimerà, L. Amaral, Functional cartography of complex metabolic networks (2005), doi:10.1038/nature03288.,基于Zi-Pi指标,节点可分为四类拓扑角色:
外围节点(Peripherals):Zi<2.5且Pi<0.62
模块枢纽(Module hubs):Zi>2.5且Pi<0.62
连接节点(Connectors):Zi<2.5且Pi>0.62
网络枢纽(Network hubs):Zi>2.5且Pi>0.62
其中除了Peripherals的节点通常被视为网络的关键节点(keystone),参考
S. Liu, H. Yu, Y. Yu, J. Huang, et al., Ecological stability of microbial communities in Lake Donghu regulated by keystone taxa. Ecological Indicators. 136, 108695 (2022).
# color map to rolesco_net_modu6<-c_net_set(co_net_modu4,vertex_class="roles")plot(co_net_modu6,coors,mark_module=T,labels_num=0,group_legend_title="Roles")
Koutrouli M, Karatzas E, Paez-Espino D and Pavlopoulos GA (2020) A Guide to Conquer the Biological Network Era Using Graph Theory. Front. Bioeng. Biotechnol. 8:34. doi: 10.3389/fbioe.2020.00034
Y. Deng, Y. Jiang, Y. Yang, Z. He, et al., Molecular ecological network analyses. BMC bioinformatics (2012), doi:10.1186/1471-2105-13-113.
R. Guimerà, L. Amaral, Functional cartography of complex metabolic networks (2005), doi:10.1038/nature03288.
S. Liu, H. Yu, Y. Yu, J. Huang, et al., Ecological stability of microbial communities in Lake Donghu regulated by keystone taxa. Ecological Indicators. 136, 108695 (2022).