I installed MetaPhlAn 3.0.7 using conda. However, when I first tried to run MetaPhlAn on got the error:
No MetaPhlAn BowTie2 database found (–index option)! Expecting location /home/vilardi.k/.conda/envs/mpa/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901
If I am using the database in my conda folder, do I still need to have the database location in the command line (–index /home/vilardi.k/.conda/envs/mpa/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901)
I also tried to download the database outside of the conda folder, but ultimately could not due to how long job was taking on the discovery cluster I am using.
Hi Katie, –index expects to find as parameter the name of the database, in this case mpa_v30_CHOCOPhlAn_201901.
To specify its location, you can use the parameter --bowtie2db /home/vilardi.k/.conda/envs/mpa/lib/python3.7/site-packages/metaphlan/metaphlan_databases/.
Thank you for response. Unfortunately, I added those parameters and still get the same error message. I also noticed the file size of mpa_v30_CHOCOPhlAn_201901.2.bt2 in metaphlan_databases is 0. There is nothing in it.
Hello,
I am getting the same problems and have tried to download and/or build the databases in multiple ways. I installed metaphlan into the metaphlan-3.0 conda environment as described in the Github issue #109, and also tried to pip install outside of a conda environment… I was able to download and run it successfully on my local machine but I need to work on the cluster due to the size of the metagenomics data. Here is the error I am getting when trying to run metaphlan --install in either pip or conda:
Building Bowtie2 indexes
Error message: ‘Command ‘[‘bowtie2-build’, ‘–quiet’, ‘–threads’, ‘4’, ‘-f’, ‘/storage/work/epb5360/miniconda3/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.fna’, ‘/storage/work/epb5360/miniconda3/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901’]’ returned non-zero exit status 247.’
I also tried to copy over the databases that downloaded successfully on my local machine into the cluster, that did not work either. Here is the content of the metaphlan_databases folder:
Can you run the following command and post the output? bowtie2-build –threads 4 -f /storage/work/epb5360/miniconda3/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.fna /storage/work/epb5360/miniconda3/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901
Also, ls -l /storage/work/epb5360/miniconda3/lib/python3.7/site-packages/metaphlan/metaphlan_databases/
Have you checked the md5 of the downloaded tar (md5sum -c mpa_v30_CHOCOPhlAn_201901.md5 mpa_v30_CHOCOPhlAn_201901.tar)?
Can you post here the version of Bowtie2 are you using? Are you trying to build the index from a HPC cluster system?
Yes, I’m building this from an HPC cluster but I had previously tried to copy over the database files from a (successful) local build which doesn’t work either… the cluster is currently down so I’ll get back to you asap
After a bit of struggling, I just managed to build the bowtie index on an HPC cluster. I had to submit it as a job because it didn’t seem to be working from an interactive node.
Submit script (though it didn’t actually need much RAM, ~3 GB):
Maybe a silly question: where are you seeing to expect .5.bt2 and .6.bt2 files? It’s been a little bit since I did this, so I am a little hazier on the details now.
I am hitting the same error “non-zero exit status 247”. My /metaphlan_databases/ looks exactly like @levlitichev posted above. @EmilyB did you eventually solve this?
Yes! @levlitichev I believe that was from an earlier version, I remember seeing it on forums somewhere…
@maxqiu I built the bowtie2 database in a different directory outside of the default conda install. For some reason that played nicely with the cluster and I was able to run humann.
I’d like to follow up on both EmilyB and levlitichev’s comments. On most HPC clusters, the ulimit is typically set so computationally intensive processes can’t be run on the login nodes. The login nodes are shared resources and only used for text editing and small file manipulations. I bet the failure with exit code 247 seen by bowtie2-build is emblematic of this.
I had the same error when running metaphlan --install at the Pittsburgh Supercomputing Center (PSC). The problem was that bowtie is called with 4 threads (see error message), while my default session was set up with a single thread.
At the PSC I normally start an interactive session with:
interact
All I had to do to make bowtie work was to request an interactive session with 4 tasks:
I wonder if you could share how you built the bowtie2 database in a different directory? Did you come out of your conda environment and create it in a completely different folder? Also, did you have to recruit more CPU / memory for this and what code you used if you remember. I am stuck at this stage where I am getting this error 247.
I would be very grateful if anyone could help many thanks.