mob-suite
mob-suite copied to clipboard
How to specify database directory
Hi because of error downloading the database when running the script, I had to download the database manually. How do I reference the mob_typer to the database that i downloaded manually?
Hi,
You need to initialize database and use mob_init
that creates sketches and downloads taxonomy database for the ete3
package. Just downloading database is not enough for a full initialization. Try re-running mob_init
. It has the -d
flag allowing to init databases in other than default directory. The mob_typer
also supports -d
flag allowing you to specify path to a database location. Usually this is option is used when you moved initialized databases to other location on a cluster or have a lightweight docker image with mounted database.
Hi, When i typed mob_init it tried to downloaded all the database from the source again, even though I had already downloaded the database manually. The connection timed out and it didnt succeed.
Is there a way to mob_init using the manually downloaded database file?
I ran mob_init -d /home/yichen/MOBSuite/data, I put the manually downloaded file in the MOBSuite folder.
Then it still downloaded from source.
Hi, I was away a couple of days. Sorry for the delay.
Currently mob_init
needs internet connection to download and initialize databases and does not work in "offline" mode where the user would supply all necessary files. One of the reasons is that ete3
library that is also out of our control also needs internet connection as it downloads taxonomy database snapshot from NCBI. I've tried running mob_init
for the latest version in a docker container and all databases downloaded correctly.
The easiest solution for your case is to copy already initialized database from other successfully installed instance or copy it from a docker image that has all databases initialized and ready to go.
Here is what you can do:
- Install docker on a home PC as it needs root privileges or alternatively use Singularity image on a HPC cluster
- Pull a complete image from Docker Hub or from BioContainers
#for docker
docker pull kbessonov/mob_suite:3.0.3
#for singularity this command will pull image into a shareable file mob_suite.sif
singularity pull mob_suite.sif https://depot.galaxyproject.org/singularity/mob_suite:3.0.3--pyhdfd78af_0
- Mount downloaded image and copy mob_suite database from the
databases
folder
# Launch docker image as a container and mount current directory on a host machine as /mnt in a container
docker run -v $PWD:/mnt --rm -it kbessonov/mob_suite:3.0.3 bash
cd /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/databases
mkdir /mnt/databases && cp * /mnt/databases/
#run singularity image and mount current directory with the -B flag
singularity shell -B $PWD:/mnt mob_suite.sif
cd /usr/local/lib/python3.8/site-packages/mob_suite/databases
mkdir /mnt/databases && cp * /mnt/databases/