stefpeschel / NetCoMi

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

nodeshape according to sample type #94

Closed chrissy005 closed 11 months ago

chrissy005 commented 1 year ago

Dear @stefpeschel ,

Thank you for this amazing package which makes its so easy to get network plots.

I was wondering if it is possible to color nodes based on taxonomic ranks and also assign nodeshapes according to sample type in the same plot as seen in https://joey711.github.io/phyloseq/plot_network-examples.html?

stefpeschel commented 12 months ago

Please have a look at the section "Network on genus level" in the readme. It explains how to color nodes according to their taxonomic rank. The plot function has an additional argument featVecShape which can be used equivalently to highlight features by different shapes. This must be a named vector that assigns a feature (sample type in your case) to each OTU/ASV/node.