Conda install does not properly bundle db dir
boulund opened this issue · comments
It seems the bioconda package does not properly bundle the db
folder.
When installing SUPER-FOCUS using pip, you get a folder in your python library folder that contains the db
directory from the repo (including the databasePKs.txt
and organism2subsystem.txt
files, etc.). For example, if I create an empty conda environment named superfocus
and use pip to install super-focus into that conda environment, I get the following result:
$ conda create -n superfocus pip
... (install log removed for brevity)
$ conda activate superfocus
(superfocus)$ pip install superfocus
Collecting superfocus
Downloading superfocus-0.35-py3-none-any.whl (223 kB)
|████████████████████████████████| 223 kB 5.4 MB/s
Collecting numpy>=1.12.1
Downloading numpy-1.21.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB)
|████████████████████████████████| 15.9 MB 19.1 MB/s
Collecting scipy>=0.19.0
Downloading scipy-1.7.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.9 MB)
|████████████████████████████████| 39.9 MB 29.2 MB/s
Installing collected packages: numpy, scipy, superfocus
Successfully installed numpy-1.21.5 scipy-1.7.3 superfocus-0.35
(superfocus)$ tree ~/.conda/envs/superfocus/lib/python3.10/site-packages/superfocus_app/
/ceph/home/boulund/.conda/envs/superfocus/lib/python3.10/site-packages/superfocus_app/
├── db
│ ├── database_PKs.txt
│ ├── focus_reduction
│ │ ├── blast
│ │ ├── diamond
│ │ └── rapsearch2
│ ├── organisms2subsystem.txt
│ ├── static
│ │ ├── blast
│ │ ├── diamond
│ │ └── rapsearch2
│ └── tmp
├── do_alignment.py
├── __init__.py
├── __pycache__
│ ├── do_alignment.cpython-310.pyc
│ ├── __init__.cpython-310.pyc
│ ├── superfocus.cpython-310.pyc
│ └── superfocus_downloadDB.cpython-310.pyc
├── superfocus_downloadDB.py
└── superfocus.py
11 directories, 10 files
When installing SUPER-FOCUS via conda, the db folder is not installed, leading to the issues described in #67, #65, etc.
This is what the superfocus_app folder looks like when installing with conda:
$ conda create -n superfocus_conda super-focus
... (install log removed for brevity)
$ conda activate superfocus_conda
(superfocus_conda)$ tree ~/.conda/envs/superfocus_conda/lib/python3.10/site-packages/superfocus_app/
/ceph/home/boulund/.conda/envs/superfocus_conda/lib/python3.10/site-packages/superfocus_app/
├── do_alignment.py
├── __init__.py
├── __pycache__
│ ├── do_alignment.cpython-310.pyc
│ ├── __init__.cpython-310.pyc
│ ├── superfocus.cpython-310.pyc
│ └── superfocus_downloadDB.cpython-310.pyc
├── superfocus_downloadDB.py
└── superfocus.py
1 directory, 8 files
I developed a workaround to enable using SUPER-FOCUS with a conda-based installation, explained in: #73 (comment)
Thanks @boulund. The PR has been merged and the already created version (1.1) should have the fix.