Merge_metaphlan_tables.py with rel_ab_w_read_stats

Hello!

I ran metaphlan 3.0.8 using the option -t rel_ab_w_read_stats for multiple samples. I want to merge all samples into a single feature table using the estimated read counts, however although each individual input file includes 5 header rows, the merged feature table merges on relative_abundance rather than estimated_number_of_reads_from_the_clade which I would like. I see a post with an alternative script to allow merging using estimated_number_of_reads_from_the_clade, however is it possible to include this directly as an option of merge_metaphlan_tables.py? Thank you,

#mpa_v30_CHOCOPhlAn_201901
#/miniconda/envs/metaphlan/bin/metaphlan paired_1.fastq.gz,paired_2.fastq.gz --bowtie2out bowtie2.bz2 --nproc 16 --bowtie2db /home/metaphlan_db -o profile.txt --sample_id sampleID --input_type fastq -t rel_ab_w_read_stats --bt2_ps very-sensitive-local --samout bowtie2.sam
#SampleID sampleID
#estimated_reads_mapped_to_known_clades:34927653
#clade_name clade_taxid relative_abundance coverage estimated_number_of_reads_from_the_clade

Hi Jenya,
Yes, of course, I can add it as a flag in the original script, I’ll keep you posted here when I’ll push this update!

2 Likes

@fbeghini
Has this flag been added to the script cuz even I want to use it for getting the merged table for the read counts instead of rel abundances.

Thanks

@fbeghini I would also like to know if this flag has been implemented in the original script. Thank you!