ChiLiubio / microeco

An R package for data analysis in microbial community ecology
GNU General Public License v3.0
181 stars 55 forks source link

Does cal_network() use relative abundance to make a network? #347

Closed WangWaud closed 2 months ago

WangWaud commented 2 months ago

Hi, there! Thanks for your effort about microeco. I have to say it's one of the most clear R packages I've ever used. Here's my question: When I use cal_network() to construct a co-occurrence network, does it use relative abundance or raw abundance? I couldn't find any information in the paper or tutorial. Honestly, I didn't use rarefy_samples before, and when constructing the networks, I want to use relative abundance.

Thanks again!

ChiLiubio commented 2 months ago

Hi. Generally, the raw abundance is the input data for trans_network class. So we donot mention it in the tutorial. Whether the relative abundance can be used depends on the method choice. It is ok if the pearson/spearman correlation is used, because total sum scaling does not affect this type of correlation. But for others (sparcc, SpiecEasi, WGCNA-related, FlashWeave, ...), the count data is necessary.

Best, Chi