I am stuck at grepping the absolute abundnace of species, genus, family, class and phylum from the big merged table. Here is the detail.
1). I ran metaphlan 4.0.5 with
-t rel_ab_w_read_stats option to get the absolute abundance of the reads from my 200 samples.
I merged all the tables into one bigger table with
merge_metaphlan_tables_abs.pyscript that developer provided. New big table is now called
Next, I grepped only species abundance as below:
grep -E "s__|clade" merged_abs.txt | grep -v "t__" | sed 's/^.*s__//g' > merged_all_species.txt
That looked fine.
However, when I tried to grep genus, family, class and phylum abundance information from that big table and I only replaced corresponding letter in the above script
grep -E "s__|clade". So, for genus abundance, I used
grep -E "g__|clade"and kept the rest part of the script the same. Similarly, for phylum I used
grep -E "p__|clade"and so on…
Although species abundance table looks fine but all other tables have mixed up taxa like I get species information even after I ran script to merge tables at only class level.
Could you please help me solving this issue? I know I can run metaphlan at lets say class level by providing
'c' flag but then it gives me absolute abundance, however, I need absolute read abundance.
Many thanks in advance!