Install database erro

Hi there. We are installing biobakery_workflows on our local machine using conda install -c biobakery biobakery_workflows. When we installed the databases, using
biobakery_workflows_databases --install wmgx, we received the error below. We tried wmgx_demo, 16S, and wmgx_wmgx, and received the same error in all cases. Could you help us to understand what our error is when installing the databases? It would be much appreciated.

Have a great day!

(base) biolab@FH-BIOLAB-IMAC ~ % conda install -c biobakery biobakery_workflows

(base) biolab@FH-BIOLAB-IMAC ~ % biobakery_workflows_databases --install wmgx

Traceback (most recent call last):
File “/Users/biolab/opt/miniconda3/bin/biobakery_workflows_databases”, line 6, in
from biobakery_workflows.biobakery_workflows_databases import main
File “/Users/biolab/opt/miniconda3/lib/python3.8/site-packages/biobakery_workflows/biobakery_workflows_databases.py”, line 30, in
from . import utilities
File “/Users/biolab/opt/miniconda3/lib/python3.8/site-packages/biobakery_workflows/utilities.py”, line 34, in
from anadama2.tracked import TrackedDirectory
File “/Users/biolab/opt/miniconda3/lib/python3.8/site-packages/anadama2/init.py”, line 83, in
from .workflow import Workflow
File “/Users/biolab/opt/miniconda3/lib/python3.8/site-packages/anadama2/workflow.py”, line 24, in
from . import backends
File “/Users/biolab/opt/miniconda3/lib/python3.8/site-packages/anadama2/backends.py”, line 7, in
import leveldb
ModuleNotFoundError: No module named ‘leveldb’

1 Like

Hi, Thank you for the detailed post. It looks like you are missing a dependency which is causing the error. If you install leveldb with conda or pypi it should resolve the issue.

Thank you,
Lauren

Lauren-
Thank you so much for your quick and perfect response. I installed leveldb and was successful…at first! I downloaded the HUMAnN database but then ran into an error when strainphlan was being generated (please see below). Again, any advice would be really appreciated.

HUMAnN configuration file updated: database_folders : utility_mapping = /Users/biolab/biobakery_workflows_databases/humann/utility_mapping

Generating strainphlan fasta database

Could not locate a Bowtie index corresponding to basename “/Users/biolab/opt/miniconda3/lib/python3.8/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901”

Error: Encountered internal Bowtie 2 exception (#1)

Command: /Users/biolab/opt/miniconda3/bin/bowtie2-inspect-s --wrapper basic-0 /Users/biolab/opt/miniconda3/lib/python3.8/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901

Unable to install database. Error running command: bowtie2-inspect /Users/biolab/opt/miniconda3/lib/python3.8/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901 > /Users/biolab/biobakery_workflows_databases/strainphlan_db_markers/all_markers.fasta

Hi @Bernadette_Connors , Can you install the MetaPhlAn database? The workflows use that database to generate the StrainPhlAn database.

Thank you,
Lauren

Hello, I tried this but if did not works for me

(metaphlan) microviable@DESKTOP-39BJL73:~$ biobakery_workflows_databases --install wmgx_demo
Traceback (most recent call last):
File “/home/microviable/anaconda3/envs/metaphlan/bin/biobakery_workflows_databases”, line 6, in
from biobakery_workflows.biobakery_workflows_databases import main
File “/home/microviable/anaconda3/envs/metaphlan/lib/python3.7/site-packages/biobakery_workflows/biobakery_workflows_databases.py”, line 30, in
from . import utilities
File “/home/microviable/anaconda3/envs/metaphlan/lib/python3.7/site-packages/biobakery_workflows/utilities.py”, line 34, in
from anadama2.tracked import TrackedDirectory
File “/home/microviable/anaconda3/envs/metaphlan/lib/python3.7/site-packages/anadama2/init.py”, line 83, in
from .workflow import Workflow
File “/home/microviable/anaconda3/envs/metaphlan/lib/python3.7/site-packages/anadama2/workflow.py”, line 24, in
from . import backends
File “/home/microviable/anaconda3/envs/metaphlan/lib/python3.7/site-packages/anadama2/backends.py”, line 7, in
import leveldb
ModuleNotFoundError: No module named ‘leveldb’
(metaphlan) microviable@DESKTOP-39BJL73:~$ pip install leveldb
Requirement already satisfied: leveldb in ./anaconda3/envs/metaphlan/lib/python3.7/site-packages (0.201)
(metaphlan) microviable@DESKTOP-39BJL73:~$ conda install leveldb
Collecting package metadata (current_repodata.json): done
Solving environment: done

All requested packages already installed.

(metaphlan) microviable@DESKTOP-39BJL73:~$ biobakery_workflows_databases --install wmgx_demo
Traceback (most recent call last):
File “/home/microviable/anaconda3/envs/metaphlan/bin/biobakery_workflows_databases”, line 6, in
from biobakery_workflows.biobakery_workflows_databases import main
File “/home/microviable/anaconda3/envs/metaphlan/lib/python3.7/site-packages/biobakery_workflows/biobakery_workflows_databases.py”, line 30, in
from . import utilities
File “/home/microviable/anaconda3/envs/metaphlan/lib/python3.7/site-packages/biobakery_workflows/utilities.py”, line 34, in
from anadama2.tracked import TrackedDirectory
File “/home/microviable/anaconda3/envs/metaphlan/lib/python3.7/site-packages/anadama2/init.py”, line 83, in
from .workflow import Workflow
File “/home/microviable/anaconda3/envs/metaphlan/lib/python3.7/site-packages/anadama2/workflow.py”, line 24, in
from . import backends
File “/home/microviable/anaconda3/envs/metaphlan/lib/python3.7/site-packages/anadama2/backends.py”, line 7, in
import leveldb
ModuleNotFoundError: No module named ‘leveldb’

1 Like

This worked for me to solve the error message that @Bernadette_Connors got above.

I shifted to my conda environment where I already had installed metaphlan. I was then able to successfully run the following command:

biobakery_workflows_databases --install wmgx

Additionally, it should be noted that the commands I had run to install metphlan on this conda environment initially were

conda install tbb=2020.2

conda install -c bioconda metaphlan

metphalan --install --nproc 8

It should be noted that there is information about this in the github page GitHub - biobakery/biobakery_workflows: bioBakery workflows is a collection of workflows and tasks for executing common microbial community analyses using standardized, validated tools and parameters.. HOWEVER, the location of these instructions coming after the necessary command caused me confusion. It might be better to move those instructions regarding prerequisite packages to up above the command.

Hello,

I’ve also been having the same issue. I installed leveldb using conda. And leveldb shows up in the conda list, but I keep getting this error.

Please let me know if you were able to find a solution for this.

Thank You

UPDATE: Managed to find the solution thanks to @BITsmyoon

install levelDB using the command below:

conda install -c conda-forge python-leveldb

2 Likes