jenniferlu717/KrakenTools

Including sample names in header of combine_mpa.py

susheelbhanu opened this issue · 1 comments

Hi,

I'm using combine_mpa.py as follows for 276 samples:

combine_mpa.py -i *_mpa.tsv -o combine_mpa.tsv

It turns out that the headers in the output file are being replaced with Sample #1, Sample #2 etc. How can I print the ouptut with the sample names intact?

Thank you,
Susheel

I was able to solve this issue with the attached script. I run the combine step as follows:

combine_mpa_modified.py -i *_mpa.tsv -d $(dirname (combine_mpa.tsv))

The output is two files - 1) the combined output and 2) a mapping file with sample name to sample index mapping.

Hope this helps others trying to do it.
combine_mpa_modified.py.txt

P.S. don't forget to remove the .txt extension the script name