Possible to get combined profile output instead of R1 and R2 profiles?

Hello,

I’m a newbie to Metaphlan. I have a directory of fastq files that I would like Metaphlan to classify. I ran the following code:

for i in *.fastq.gz; do metaphlan $i --input_type fastq --nproc 40 > ${i%.fastq.gz}_profile.txt; done

However, my input fastq files are split into Read1 and Read2 files and the resulting profile.txt files are also split in to Read1 and Read2. I would like the resulting profile.txt files to contain data for the paired reads. Is this possible? Or do I need to somehow interleave the R1 and R1 fastq files before I run them through Metaphlan?

Thank you for your help!

I don’t think it’s possible. I just ended up merging the R1 and R2 fastqs with flash FLASh. Then, I ran those combined fastq files through metaphlan.

Hi @nkirc,

You can add multiple files as input to the same MetaPhlAn run like this:

i=‘name_file’
metaphlan ${i}_R1.fastq,${i}_R2.fastq …

or directly pipe them into metaphlan:

(bzcat ls -1 ${i}{R1,R2}.fastq.bz2 | paste -sd ' ' - ) | metaphlan …

Either way, or even if you merge the files like you did, MetaPhlAn will not consider the paired end information.