Metaphlan in Docker container with external db path

Hi,

I have developed a workflow that included Metaphlan 3. To maintain a clean versioning of software dependencies, most tools - including Metaphlan - are dockerized (executed with Singularity on a HPC cluster). I am using a pre-downloaded version of Chocoplan as a data source, since the executing user cannot write into the docker container. The command then looks like so (including variables):

metaphlan left.fq,right.fq --bowtie2db $METAPHLAN_DB --samout $sam_out --bowtie2out bowtie_out --nproc {task.cpus} -o $metaphlan_out --input_type fastq

Now, while this works fine, Metaphlan - in certain intervals - tries to “phone home” and download some files into the Metaphlan DB installation (mpa_latest). However, rather than obeying the external db path, it will try to download the file INTO the docker container. Which obviously does not work and basically means that the pipeline stops working every few weeks and I have to manually update the “mpa_latest” file.

This is not really a good situation and should be fixed on Metaphlan’s end. Either make the update check obey the external db path or, preferably, allow users to skip the “update” procedure (if this is already possible, I could not find the option).

Cheers,
Marc

Hi Marc,
I’m sorry you have experienced this. In order to avoid the constant check of the latest version, you can include in the command line the parameter -x mpa_v30_CHOCOPhlAn_201901 in order to override the default value for the index parameter (which is latest), this will only check if all the Bowtie2 files are present.
I’ll update the documentation to make this more clear.
Let me know if you have more problems.