Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install of pysamstats results in ValueError: pysam.libchtslib.HTSFile has the wrong size #12466

Closed
lparsons opened this issue Dec 3, 2018 · 12 comments

Comments

@lparsons
Copy link
Contributor

lparsons commented Dec 3, 2018

conda create -n pysamstats pysamstats

Traceback (most recent call last):
  File "/Genomics/grid/users/lparsons/miniconda3/envs/pysamstats/bin/pysamstats", line 10, in <module>
    import pysamstats
  File "/Genomics/grid/users/lparsons/miniconda3/envs/pysamstats/lib/python3.6/site-packages/pysamstats/__init__.py", line 8, in <module>
    from .pileup import *
  File "/Genomics/grid/users/lparsons/miniconda3/envs/pysamstats/lib/python3.6/site-packages/pysamstats/pileup.py", line 6, in <module>
    import pysamstats.opt as opt
  File "libchtslib.pxd", line 2590, in init pysamstats.opt
ValueError: pysam.libchtslib.HTSFile has the wrong size, try recompiling. Expected 88, got 80
# packages in environment at /Genomics/grid/users/lparsons/miniconda3/envs/pysamstats:
#
# Name                    Version                   Build  Channel
bcftools                  1.9                  h4da6232_0    bioconda
blas                      1.1                    openblas    conda-forge
blosc                     1.14.4               hfc679d8_0    conda-forge
bzip2                     1.0.6                h470a237_2    conda-forge
ca-certificates           2018.11.29           ha4d7672_0    conda-forge
certifi                   2018.11.29            py36_1000    conda-forge
curl                      7.62.0               h74213dd_0    conda-forge
hdf5                      1.10.3               hc401514_2    conda-forge
htslib                    1.9                  hc238db4_4    bioconda
krb5                      1.16.2               hbb41f41_0    conda-forge
libcurl                   7.62.0               hbdb9355_0    conda-forge
libdeflate                1.0                  h470a237_0    bioconda
libedit                   3.1.20170329         haf1bffa_1    conda-forge
libffi                    3.2.1                hfc679d8_5    conda-forge
libgcc-ng                 7.2.0                hdf63c60_3    conda-forge
libgfortran               3.0.0                         1    conda-forge
libssh2                   1.8.0                h5b517e9_3    conda-forge
libstdcxx-ng              7.2.0                hdf63c60_3    conda-forge
lzo                       2.10                 h470a237_0    conda-forge
ncurses                   6.1                  hfc679d8_1    conda-forge
numexpr                   2.6.8            py36hf8a1672_0    conda-forge
numpy                     1.15.1          py36_blas_openblashd3ea46f_0    conda-forge
openblas                  0.2.20                        8    conda-forge
openssl                   1.0.2p               h470a237_1    conda-forge
pip                       18.1                  py36_1000    conda-forge
pysam                     0.15.1           py36h0380709_0    bioconda
pysamstats                1.0.1            py36ha92aebf_2    bioconda
pytables                  3.4.4            py36h2392372_1    conda-forge
python                    3.6.7                h5001a0f_1    conda-forge
readline                  7.0                  haf1bffa_1    conda-forge
samtools                  1.9                  h8ee4bcc_1    bioconda
setuptools                40.6.2                   py36_0    conda-forge
six                       1.11.0                py36_1001    conda-forge
sqlite                    3.26.0               hb1c47c0_0    conda-forge
tk                        8.6.9                ha92aebf_0    conda-forge
wheel                     0.32.3                   py36_0    conda-forge
xz                        5.2.4                h470a237_1    conda-forge
zlib                      1.2.11               h470a237_3    conda-forge
@lparsons
Copy link
Contributor Author

@bgruening or @dpryan79 Do either of you know if pinning pysam or htslib would fix this? Not quite sure what to pin or how, but I suspect using - {{ pin_compatible('pysam') }} might work? I can add that, but since it would rebuild the package, I'm sure it would pass tests. Not sure how to know if it would fix it going forward. Also related to #12494. Oh, and let me know if there is a more appropriate person/group to ask about this...

@lparsons
Copy link
Contributor Author

Hmmm... Come to think of it, perhaps htslib needs to be pinned this way in the pysam recipe?

@dpryan79
Copy link
Contributor

dpryan79 commented Dec 11, 2018

Yes, pysam is made for a particular htslib release, I assumed that pinning was already done!

Edit: It is in fact, not sure what's happening here.

@lparsons
Copy link
Contributor Author

Just checked this myself. These errors have been plaguing me for some time. Any help in tracking them down would be appreciated, but at the moment, I'm pretty stumped.

@dpryan79
Copy link
Contributor

I suspect this is a weird numpy version problem. For whatever it's worth I get exactly the same error as you do :(

@lparsons
Copy link
Contributor Author

lparsons commented Dec 11, 2018

I wonder what is requiring numpy? I'm wondering if this is actually an issue with stuff in conda-forge?

Edit: My bad, I was looking at pysam. Perhaps this recipe should include numpy in host and pin_compatible numpy in run? No idea how to test that though...

@dpryan79
Copy link
Contributor

You could bioconda-utils build that locally and then conda install the resulting tarball. That'd allow testing at least.

@lparsons
Copy link
Contributor Author

Hmmm.... Although, this calls for pysam 0.11.2.2 and I'm not sure that version has a pinned htslib dependency... Also, woudn't and updated build work (at least in theory) since the problem was the build was against an old version of htslib/numpy and the run is against a new one?

@dpryan79
Copy link
Contributor

You might also look at pytables, since it requires numpy.

@lparsons
Copy link
Contributor Author

lparsons commented Dec 11, 2018

Yeah, but that's in conda-forge and I'm not really familiar with how those packages are built...

Edit: Looks like pytables has numpy pinned: https://github.com/conda-forge/pytables-feedstock/blob/master/recipe/meta.yaml#L39

@lparsons
Copy link
Contributor Author

I think this means that pysam 0.11.2.2 has htslib pinned, but that is old syntax, does it still work? Would updating that help?

- htslib {{CONDA_HTSLIB}}*

@dpryan79
Copy link
Contributor

These days that shouldn't do anything. The conda_build_config.yaml sets htslib to 1.9 currently.

lparsons added a commit to lparsons/bioconda-recipes that referenced this issue Jun 14, 2019
lparsons added a commit to lparsons/bioconda-recipes that referenced this issue Jun 14, 2019
biocondabot bot pushed a commit that referenced this issue Jun 15, 2019
Package uploads complete: [ci skip]
 - biocontainers/pysamstats:1.1.2--py27h84994c4_3
 - biocontainers/pysamstats:1.1.2--py36h84994c4_3
 - biocontainers/pysamstats:1.1.2--py37h84994c4_3
 - linux-64/pysamstats-1.1.2-py27h84994c4_3.tar.bz2
 - linux-64/pysamstats-1.1.2-py36h84994c4_3.tar.bz2
 - linux-64/pysamstats-1.1.2-py37h84994c4_3.tar.bz2
 - osx-64/pysamstats-1.1.2-py27ha441bb4_3.tar.bz2
 - osx-64/pysamstats-1.1.2-py36ha441bb4_3.tar.bz2
 - osx-64/pysamstats-1.1.2-py37ha441bb4_3.tar.bz2
kpalin pushed a commit to kpalin/bioconda-recipes that referenced this issue Aug 7, 2019
Package uploads complete: [ci skip]
 - biocontainers/pysamstats:1.1.2--py27h84994c4_3
 - biocontainers/pysamstats:1.1.2--py36h84994c4_3
 - biocontainers/pysamstats:1.1.2--py37h84994c4_3
 - linux-64/pysamstats-1.1.2-py27h84994c4_3.tar.bz2
 - linux-64/pysamstats-1.1.2-py36h84994c4_3.tar.bz2
 - linux-64/pysamstats-1.1.2-py37h84994c4_3.tar.bz2
 - osx-64/pysamstats-1.1.2-py27ha441bb4_3.tar.bz2
 - osx-64/pysamstats-1.1.2-py36ha441bb4_3.tar.bz2
 - osx-64/pysamstats-1.1.2-py37ha441bb4_3.tar.bz2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants