jtamames / SqueezeMeta

A complete pipeline for metagenomic analysis
GNU General Public License v3.0
348 stars 81 forks source link

Missing python library "pysam" #677

Closed fpusan closed 1 year ago

fpusan commented 1 year ago

Hi! I'm getting this warning after running the test_install.pl script:

WARNING: Some SqueezeMeta dependencies could not be found in your environment!

Could somebody help me? Thanks in advanced!

Originally posted by @emagallong in https://github.com/jtamames/SqueezeMeta/issues/258#issuecomment-1533388417

fpusan commented 1 year ago

How did you install SqueezeMeta? If using conda, have you activated the right environment?

emagallong commented 1 year ago

Thanks, for your quick response!! Yes, I used conda and I'm on the SqueezeMeta environment...

fpusan commented 1 year ago

pysam should be present in that environment. What is the output of which python?

emagallong commented 1 year ago

It's python3.6.15

emagallong commented 1 year ago

/home/usuario/miniconda3/envs/SqueezeMeta/bin/python

fpusan commented 1 year ago

Ok then it is a bit weird, it should be present. What happens if you manually install it with mamba install -c bioconda pysam

emagallong commented 1 year ago

This is the output: Looking for: ['pysam']

warning libmamba Could not parse state fileCould not load cache state: [json.exception.type_error.302] type must be number, but is null warning libmamba Could not parse state fileCould not load cache state: [json.exception.type_error.302] type must be number, but is null warning libmamba Could not parse state fileCould not load cache state: [json.exception.type_error.302] type must be number, but is null warning libmamba Could not parse state fileCould not load cache state: [json.exception.type_error.302] type must be number, but is null warning libmamba Could not parse state fileCould not load cache state: [json.exception.type_error.302] type must be number, but is null warning libmamba Could not parse state fileCould not load cache state: [json.exception.type_error.302] type must be number, but is null warning libmamba Could not parse state fileCould not load cache state: [json.exception.type_error.302] type must be number, but is null warning libmamba Could not parse state fileCould not load cache state: [json.exception.type_error.302] type must be number, but is null bioconda/noarch 4.2MB @ 3.8MB/s 1.7s bioconda/linux-64 4.6MB @ 2.8MB/s 2.4s pkgs/main/linux-64 5.6MB @ 2.3MB/s 3.6s pkgs/r/linux-64 1.4MB @ 384.1kB/s 1.4s pkgs/main/noarch 822.9kB @ 209.5kB/s 2.8s pkgs/r/noarch 1.3MB @ 312.4kB/s 2.5s r/linux-64 770.6kB @ 183.4kB/s 0.5s r/noarch 864.2kB @ 201.3kB/s 0.6s conda-forge/noarch 12.1MB @ 2.7MB/s 6.7s conda-forge/linux-64 31.2MB @ 3.0MB/s 16.0s

Pinned packages:

Transaction

Prefix: /home/usuario/miniconda3/envs/SqueezeMeta

All requested packages already installed

emagallong commented 1 year ago

I already run the test_install.pl and I got the same issue...

fpusan commented 1 year ago

So it thinks it is already installed (also there is something weird going on with your conda) What happens if you open python and type import pysam?

fpusan commented 1 year ago

Also what is the output of which python3 (note that now there is a 3 in the end)

emagallong commented 1 year ago

This is the output for which python3 : /home/usuario/miniconda3/envs/SqueezeMeta/bin/python3 This is the output for import pysam :

Python 3.6.15 | packaged by conda-forge | (default, Dec 3 2021, 18:49:41) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import pysam Traceback (most recent call last): File "", line 1, in File "/home/usuario/miniconda3/envs/SqueezeMeta/lib/python3.6/site-packages/pysam/init.py", line 5, in from pysam.libchtslib import * ImportError: libhts.so.2: cannot open shared object file: No such file or directory

fpusan commented 1 year ago

Ok, pysam itself is installed, but it is missing a dependency.

I see that pysam was recently updated in bioconda, apparently this broke our package. I expect this to keep happening in the future, so I will look into pinning package versions as suggested to me in #638. I am afraid that not allowing conda to solve packages on its own may also be problematic in a different way, but I'll see what I find out.

In any case, I just made a new release that fixes this particular issue. You will need to reinstall SqueezeMeta, then pysam and test_install.pl will hopefully work. Let me know what happens.

emagallong commented 1 year ago

Ok, I'll try and I'll keep you posted! Thanks ;)

emagallong commented 1 year ago

So far, everything is running pretty good. The issue was fixed. Thanks a lot, Fernando! I'm excited to run SqueezeMeta!

fpusan commented 1 year ago

Excellent! Good luck with your analyses, you know where to find us