stefpeschel / NetCoMi

Network construction, analysis, and comparison for microbial compositional data
GNU General Public License v3.0
146 stars 26 forks source link

About the counting of number of postive/negative corrrelations in network #41

Closed sciencesj closed 2 years ago

sciencesj commented 2 years ago

Dear Dr. Peschel,

The package is very useful for my analysis, and I would like to thank you.

I have a question regarding the counting of significant connections in network. Especially in the case of Pearson/Spearman correlation analysis based network analysis.

The list of netprops$centralities$degree1 shows each core's connection, but I am wondering if it is possible to count positive negative connections (for total and each OTUs).

Is it possible to check these numbers with NetCoMi? If so, could you explain how to perform this?

Sincerely,

stefpeschel commented 2 years ago

Hey, In the latest version on develop branch, the netConstruct() function now returns an edge list with estimated associations, dissimilarities and adjacencies.

The edge list contains only edges with weights different from zero (significant edges in your case). So, you can access the postive and negative edges by selecting those with positive and negative associations and you can also select edges of a specific taxon.

The 'develop' branch version can be installed via: devtools::install_github("stefpeschel/NetCoMi", ref = "develop")

Hope that helps. Best, Stefanie

sciencesj commented 2 years ago

Thank you very much for your answer. I have a question regarding the new version. In the lists of netConstruct(), which list could I check? Is it the $ edgelist1$ asso:?

stefpeschel commented 2 years ago

Yes. As written on the help page, edgelist1 gives you the edge list for group 1 and asso are the estimated associations (ranging from -1 to 1).

sciencesj commented 2 years ago

Thank you very much for your confirmation :-) I wish you have a great day!