anuradhawick / LRBinner

LRBinner is a long-read binning tool published in WABI 2021 proceedings and AMB.
https://doi.org/10.4230/LIPIcs.WABI.2021.11
GNU General Public License v2.0
28 stars 4 forks source link

Conda Environment for Dependencies #2

Closed cazzlewazzle89 closed 2 years ago

cazzlewazzle89 commented 2 years ago

Hi Anuradha,

I'm looking forward to trying out this tool but I keep running into issues while trying to get the dependencies installed and working with conda. Is there any chance you could share a working environment .yml?

Thanks, Calum

anuradhawick commented 2 years ago

Hi Calum,

Thanks for the great suggestion. I will look into this ASAP. In the meantime could you share with me any error messages that might be popping up?

Thanks Anuradha

anuradhawick commented 2 years ago

@cazzlewazzle89 kind reminder, do you have any particular issues that you'd like to raise? I am updating the code base and am happy to incorporate it. If this is an issue on a Mac, kindly note that this tool will not support Mac.

Thanks

cazzlewazzle89 commented 2 years ago

Hi Anuradha,

Thanks for reminding me about this. I was having conda issues and ended up taking a break but forgot to come back to it. I'm running this on a linux server, not a Mac. I created a conda environment using the command below and then followed your instructions for cloning and compiling the source code. conda create -n lrbinner -y numpy scipy seaborn h5py tabulate pytorch hdbscan gcc openmp tqdm I'm still running into the same error as before - the tqdm module

(lrbinner) [cwwalsh@roosta LRBinner]$ LRBinner --help  
Traceback (most recent call last):  
  File "/home/cwwalsh/Software/LRBinner/LRBinner", line 8, in <module>  
    from mbcclr_utils import pipelines
  File "/home/cwwalsh/Software/LRBinner/mbcclr_utils/pipelines.py", line 10, in <module>
    from mbcclr_utils.runners_utils import *
  File "/home/cwwalsh/Software/LRBinner/mbcclr_utils/runners_utils.py", line 10, in <module>
    from mbcclr_utils import ae_utils
  File "/home/cwwalsh/Software/LRBinner/mbcclr_utils/ae_utils.py", line 8, in <module>
    from tqdm import tqdm
ModuleNotFoundError: No module named 'tqdm'

I have also tried installing tqdm with pip3 to no avail. Any help or advice would be greatly appreciated. I'm still getting to grips with conda so it is likely that I'm making a simple error.

Thanks, Calum

anuradhawick commented 2 years ago

Hi Calum,

This is because LRBinner by default point to python in /usr/bin/python3 while your actual conda python lived elsewhere. Could you please try python LRBinner --help from the created conda environment.

I will see if I can fix this simply, or in the next release, I will use a docker pull which should simplify things a lot.

Thanks for the feedback. Much appreciated.

anuradhawick commented 2 years ago

@cazzlewazzle89

Please refer to the above comment. Additionally, I updated the LRBinner main script to point to your default python. In that case, if your new conda env is activated this should work fine. Kindly take a pull.

cazzlewazzle89 commented 2 years ago

Thanks @anuradhawick for the quick reply That error above was generated by running it from the created environment. I have double checked and it seems to be pointing to my conda python (see below). I'll try again.

(lrbinner) [cwwalsh@roosta LRBinner]$ python
Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:23:11) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.path)
['', '/home/cwwalsh/miniconda3/envs/lrbinner/lib/python39.zip', '/home/cwwalsh/miniconda3/envs/lrbinner/lib/python3.9', '/home/cwwalsh/miniconda3/envs/lrbinner/lib/python3.9/lib-dynload', '/home/cwwalsh/miniconda3/envs/lrbinner/lib/python3.9/site-packages']
anuradhawick commented 2 years ago

The new pull should eliminate this error. Or try python LRBinner --help.

Please note that I have used Python 3.7 for development. Python 3.9 may raise issues. You might want to try using python 3.7 in your conda create CONDA DOCS.

Something like below; conda create --name lrbinner -y python=3.7 numpy scipy seaborn h5py tabulate pytorch hdbscan gcc openmp tqdm

cazzlewazzle89 commented 2 years ago

It appears to be working now without needing to change python version. Thanks a million Anuradha! Looking forward to giving this a go.

For the benefit of anybody else, the following conda env worked for me conda create -n lrbinner -y numpy scipy seaborn h5py tabulate pytorch hdbscan gcc openmp tqdm biopython

anuradhawick commented 2 years ago

Thanks for the feedback. I look forward to hearing your comments/feedbacks/problems/improvements. I will add this conda script to README.md. I will close the issue, but you're very welcome to make one if problems arise or to give feedback.

Have a nice day.

franciscozorrilla commented 2 months ago

Hi Anuradha, I couldn't get conda to resolve the dependencies as outlined in the README installation instructions. It looks like I managed to install properly using mamba:

conda create -n lrbinner mamba python==3.10
conda activate lrbinner
mamba install numpy scipy seaborn h5py hdbscan gcc openmp tqdm biopython fraggenescan hmmer tabulate pytorch pytorch-cuda=11.7 -c pytorch -c nvidia -c bioconda

Best, Francisco