I was trying to use metaphlan4 to parse some metagenomics fastq files. Those files were ran successfully with metaphlan3. However, when using metaphlan4, I faced the following error:
Traceback (most recent call last):
File “/N/u/dongq/Carbonate/.local/bin/metaphlan”, line 8, in
File “/N/u/dongq/Carbonate/.local/lib/python3.9/site-packages/metaphlan/metaphlan.py”, line 1077, in main
run_bowtie2(pars[‘inp’], pars[‘bowtie2out’], pars[‘bowtie2db’],
File “/N/u/dongq/Carbonate/.local/lib/python3.9/site-packages/metaphlan/metaphlan.py”, line 445, in run_bowtie2
nreads, avg_read_length = list(map(float, read_fastx_stderr.decode().split()))
IndexError: list index out of range
I checked the bowtie2.bz2 output, and the output didn’t have the last line starting with “#nreads”. The fastq files are ok and they could run through metaphlan3. The metaphlan3 outputs of these fastq files had the last like with “#nreads”.
The command I used was:
metaphlan FQ1.fastq,FQ2.fastq --input_type fastq --nproc 8 --unclassified_estimation -t rel_ab_w_read_stats --bowtie2out test.bowtie2.bz2 -o test_profile.txt
I really appreciate it if you could help with this!