stefpeschel / NetCoMi

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

Change node shape according to taxonomy #92

Closed nicolereynolds2 closed 9 months ago

nicolereynolds2 commented 1 year ago

Hello,

Thanks for the package, it has been great!

I would like to change the node shapes in my network according to phylum, but I have not been able to figure out how to extract the taxonomy from the phyloseq object as a vector.

If you have any suggestions, I would appreciate it, thanks.

stefpeschel commented 1 year ago

Hey, The taxonomy table can be accessed with phyloseq::tax_table(). From this matrix, you can select a column vector at the desired taxonomic level. Make sure you have agglomerated the data to the desired level in advance (see phyloseq::taxglom()). Best, Stefanie