I was running MetaPhlAn3 on one of the bowtie2out files, and it reported back with this confusing error message:
Please provide the size of the metagenome using the --nreads parameter when running MetaPhlAn using SAM files as input
Exiting...
To be clear, I ran MetaPhlAn 3.0.8 with the mpa_v30_CHOCOPhlAn_201901
index and --input_type bowtie2out
.
1 Like
I am new to metaphlan and had a similar error running metaphlan3 on trimmomatic trimmed fastq reads. I would also love to know if anybody has any suggestions, as I cannot figure out what to do.
$ conda install -c bioconda python=3.7 metaphlan
$ metaphlan F_trimmed_paired.fq.gz,F_trimmed_unpaired.fq.gz,R_trimmed_paired.fq.gz,R_trimmed_unpaired.fq.gz --bowtie2out metagenome.bowtie2.bz2 --nproc 5 --input_type fastq -o …/…/metaphlan_out/profiled_metagenome.txt
------ And I receive: --------
Downloading http://cmprod1.cibio.unitn.it/biobakery3/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.md5
Downloading file of size: 0.00 MB
0.01 MB 12800.00 % 37.32 MB/sec 0 min -0 sec
Decompressing /home/liam/miniconda3/envs/mtp/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.fna.bz2 into /home/liam/miniconda3/envs/mtp/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.fna
Building Bowtie2 indexes
Removing uncompress database /home/liam/miniconda3/envs/mtp/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.fna
Download complete
Please provide the size of the metagenome using the --nreads parameter when running MetaPhlAn using SAM files as input
Exiting…
WARNING: The metagenome profile contains clades that represent multiple species merged into a single representant.
An additional column listing the merged species is added to the MetaPhlAn output.
1 Like
Same issue here too. Encountered the problem with metaphlan 3.0.7. Trouble shooted on the tutorial (metaphlan3 · biobakery/biobakery Wiki · GitHub) and the same error popped up. Definitely not using sam files as input but the fasta in the tutorial.
Hi, can you post here the command line you used?
Hi @liamfriar ,
which version of MetaPhlAn are you using?
Hi @Jeffrey_Chiu ,
Have you tried updating to version 3.0.7?
1 Like
metaphlan sample_rawlib.bam.fastq.gz --bowtie2db ../mpa_bowtie2db --input_type fastq --nproc 4 --unknown_estimation -o sample_mpa_profile.txt
Incidentally, even though conda list
reports having version 3.0.8 installed, metaphlan --version
misleadingly reports having version 3.0.7 installed.
EDIT: I’ve tested this on multiple fastq.gz files, and it makes no difference whether the input is a gzipped fastq file or a bowtie2out text file.
I’ve pushed a fix for this, now it should work.
Hi @fbeghini, yep, I’ve encountered the issue with version 3.0.7. For the fix that you pushed, could I get that fix by doing a conda update metaphlan? Still getting the same warning (I think the warning is there but, confusingly, it seems like files are all outputted (bowtie2out, sams, profile) from the command).
conda update metaphlan
won’t work unitl Update metaphlan to 3.0.9 by BiocondaBot · Pull Request #28529 · bioconda/bioconda-recipes · GitHub gets merged (this is due to how the bioconda channel works). The bioconda team is usually very prompt at integrating BiocondaBot’s version bumps, so you should not have to wait too long.
Same problem encountered. Even I have update to 3.0.8, the metaphlan -h sitll showed 3.0.7. And in annaconda, 3.0.9 is not available up to now.
So, we have no option except for waiting?
I merged the PR, it should not take long to be available now
2 Likes
It is available now. Thanks a lot 
The update solved this problem for me! Thank you!