Hello, I want to create a network from correlation matrix of soil microbial data. I have seen in several published papers, most of them used igraph and hmisc packages for calculation of corelation matrix (Spearman’s correlation coefficient(ρ)>0.6 for +ve correlation and <0.6 as negative, and statistical significance (P<0.01)) and plotting network. Then, all of them used Gephi for network visualization.
The data I have is bacterial relative abundance of OTUs at different classification levels (from phylum to genus).
(Column 1) Bacteria|Actinobacteria|Actinobacteria|Acidimicrobiales|Iamiaceae (Rest of the columns are the relative abundance in different treatments).
For the network I want to plot, the nodes would be genera, the size of node should be based on number of connections/edges, the width of edge/line should be based on how strong the correlation is (Spearman’s correlation coefficient), and the color of edge/connecting line should be based on +ve and -ve correlation with other connecting genera. At last, the color of nodes should be the phylum they belongs and there should be a legend penal of colors representing phylum. Example is in attachment.
To start plotting the network, literature told me that I should have two files from the data (i.e. Edges file and nodes file). I am really confused how to prepare these two data files from the data I have. Some one please help me how to prepare data, and what should I do in igraph and hmisc packages and when to shift things in Gephi. Hope I asked my question in proper detail.
Suggestions are welcome
The below example is taken from manuscript Chao, Y., Liu, W., Chen, Y., Chen, W., Zhao, L., Ding, Q., Wang, S., Tang, Y.T., Zhang, T. and Qiu, R.L., 2016. Structure, variation, and co-occurrence of soil microbial communities in abandoned sites of a rare earth elements mine. Environmental science & technology , 50 (21), pp.11481-11490.