adamhockenberry / bacphlip

A python library for predicting phage lifestyle based on genome sequence
MIT License
35 stars 7 forks source link

Please include a statement on dependency versions #9

Open mtisza1 opened 2 years ago

mtisza1 commented 2 years ago

Hi Adam,

Now that I've gotten BACPHLIP installed, it's great! Thank you for making this tool.

However, I had to struggle for a while to get it working. Based on your listed dependencies, I made a conda environment like this

conda create -n bacphlip -c bioconda biopython pandas joblib scikit-learn hmmer

For whatever reason, conda "solved" this with biopython 1.70. I then installed BACPHLIP with pip. When I ran the tool, I kept getting this biopython error:

AttributeError: 'SeqRecord' object has no attribute 'translate'

I noticed that the version of biopython available when you uploaded this package to github was 1.77, so I redid the conda environment as follows, and it works fine.

conda create -n bacphlip python biopython=1.77 pandas joblib scikit-learn hmmer

Because the dependency versions can matter quite a bit, I'm wondering if you can post the versions of each package that worked for you. This should help people install your tool.

Best,

Mike

hanrong-chen commented 11 months ago

Adding a note that numpy <1.24.0 is needed, or else BACPHLIP throws an error at the end: AttributeError: module 'numpy' has no attribute 'float'. This has got to do with numpy's deprecation of np.float expiring in v1.24.0.

AndAvia commented 7 months ago

Hi Adam,

Now that I've gotten BACPHLIP installed, it's great! Thank you for making this tool.

However, I had to struggle for a while to get it working. Based on your listed dependencies, I made a conda environment like this

conda create -n bacphlip -c bioconda biopython pandas joblib scikit-learn hmmer

For whatever reason, conda "solved" this with biopython 1.70. I then installed BACPHLIP with pip. When I ran the tool, I kept getting this biopython error:

AttributeError: 'SeqRecord' object has no attribute 'translate'

I noticed that the version of biopython available when you uploaded this package to github was 1.77, so I redid the conda environment as follows, and it works fine.

conda create -n bacphlip python biopython=1.77 pandas joblib scikit-learn hmmer

Because the dependency versions can matter quite a bit, I'm wondering if you can post the versions of each package that worked for you. This should help people install your tool.

Best,

Mike

Thanks for sharing, followed your steps and it has been successfully installed.

SebasSaenz commented 5 months ago

Hi Adam,

Now that I've gotten BACPHLIP installed, it's great! Thank you for making this tool.

However, I had to struggle for a while to get it working. Based on your listed dependencies, I made a conda environment like this

conda create -n bacphlip -c bioconda biopython pandas joblib scikit-learn hmmer

For whatever reason, conda "solved" this with biopython 1.70. I then installed BACPHLIP with pip. When I ran the tool, I kept getting this biopython error:

AttributeError: 'SeqRecord' object has no attribute 'translate'

I noticed that the version of biopython available when you uploaded this package to github was 1.77, so I redid the conda environment as follows, and it works fine.

conda create -n bacphlip python biopython=1.77 pandas joblib scikit-learn hmmer

Because the dependency versions can matter quite a bit, I'm wondering if you can post the versions of each package that worked for you. This should help people install your tool.

Best,

Mike

Thank you, this also worked for me but I had to install python 3.8, the 3.9 was creating issues with numpy.

Cheers,

Johan Sebastián

AndAvia commented 5 months ago

AttributeError: module 'numpy' has no attribute 'float'.

You're right, I downgraded the version before it worked.
conda activate bacphlip conda install -c conda-forge -c bioconda numpy=1.23.5