jtamames / SqueezeMeta

A complete pipeline for metagenomic analysis
GNU General Public License v3.0
348 stars 81 forks source link

Species Abundance with different higher levels of Taxa names #697

Closed drbmanna closed 1 year ago

drbmanna commented 1 year ago

Dear Developers,

I hope this message finds you well. I want to thank you for the exceptional pipeline you have provided. It has greatly assisted me in conducting my metagenomics analysis.

Currently, I am utilising SQM Tools to combine the results of different runs. While working with the data, I have been able to extract abundance values for different levels of taxa individually, as shown in the following examples:

However, I am now interested in obtaining the abundance of a specific taxonomic level while including the names of all higher levels in the rows. Specifically, for species abundance, I would like to have the following format, including the corresponding abundance value of that species:

k_Bacteria;n_Terrabacteria group;p_Actinobacteria;c_Actinomycetia;o_Propionibacteriales;f_Nocardioidaceae;n_unclassified Nocardioidaceae;s_Nocardioidaceae bacterium

Is there any way to do so? Thank you once again for your invaluable support.

BM.

fpusan commented 1 year ago

Yes, it can be done. Try

sp= combi$taxa$species$abund
rownames(sp) = sp$misc$tax_names_long$species[rownames(sp)]
drbmanna commented 1 year ago

Thank you so much.