Merge_metaphlan_tables.py with absolute abundance

Hi all!
In case if someone will need it, here is the modified file that merges absolute abundances instead of relative abundances in metaphlan output (you should run metaphlan with ‘-t rel_ab_w_read_stats’ option).
merge_metaphlan_tables_abs.txt (3.6 KB)
Rename it as merge_metaphlan_tables_abs.py and make it executable. Usage is the same as for relative abundance merging.

6 Likes

Thank you very much. I needed this!

1 Like

This worked perfectly, thank you!

1 Like

Thank you very much for this, Tim!

1 Like

Thanks, Timyerg. This is really what I need!
May I know where should we upload this file?
I try to upload it to the files relevant to Metaphlan, but it seems that the command not been found.
Much appreciated it if you could give any suggestions,

You are welcome!

  1. Download the file. Put it anywhere.
  2. Rename it to replace “.txt” extension to “.py”
  3. Make it executable (replace “path_to” with a path to file):
    chmod +x path_to/merge_metaphlan_tables_abs.py
  4. Run it as original script, but provide path_to/merge_metaphlan_tables_abs.py in a command, with a path to the script.

Many thanks for your quick reply! Timyerg. It works well!

It is so nice of you! truely appreciate your work!