pysam-developers / pysam

Pysam is a Python package for reading, manipulating, and writing genomics data such as SAM/BAM/CRAM and VCF/BCF files. It's a lightweight wrapper of the HTSlib API, the same one that powers samtools, bcftools, and tabix.
https://pysam.readthedocs.io/en/latest/
MIT License
776 stars 274 forks source link

Conflict with bcftools 1.4 #427

Closed abalter closed 7 years ago

abalter commented 7 years ago
balter3:~$ conda create --name pysambcf
Fetching package metadata .................
Solving package specifications:
Package plan for installation in environment /home/Applications/conda/envs/pysambcf:

Proceed ([y]/n)? y

#
# To activate this environment, use:
# > source activate pysambcf
#
# To deactivate this environment, use:
# > source deactivate pysambcf
#

balter3:~$ source activate pysambcf
(pysambcf) balter3:~$ pysam -h
-bash: pysam: command not found
(pysambcf) balter3:~$ conda install pysam bcftools
Fetching package metadata .................
Solving package specifications: .

Package plan for installation in environment /home/Applications/conda/envs/pysambcf:

The following NEW packages will be INSTALLED:

    bcftools:   1.4-0         bioconda
    bzip2:      1.0.6-3       anaconda
    curl:       7.52.1-0      anaconda
    htslib:     1.4-0         bioconda
    libgcc:     5.2.0-0       anaconda
    openssl:    1.0.2k-1      anaconda
    pip:        9.0.1-py35_1  anaconda
    pysam:      0.10.0-py35_2 bioconda
    python:     3.5.3-1       anaconda
    readline:   6.2-2         anaconda
    samtools:   1.4-0         bioconda
    setuptools: 27.2.0-py35_0 anaconda
    sqlite:     3.13.0-0      anaconda
    tk:         8.5.18-0      anaconda
    wheel:      0.29.0-py35_0 anaconda
    xz:         5.2.2-1       anaconda
    zlib:       1.2.8-3       anaconda

Proceed ([y]/n)? y

(pysambcf) balter3:~$ bcftools -h

Program: bcftools (Tools for variant calling and manipulating VCFs and BCFs)
Version: 1.4 (using htslib 1.4)

Usage:   bcftools [--version|--version-only] [--help] <command> <argument>

Commands:

 -- Indexing
    index        index VCF/BCF files

 -- VCF/BCF manipulation
    annotate     annotate and edit VCF/BCF files
    concat       concatenate VCF/BCF files from the same set of samples
    convert      convert VCF/BCF files to different formats and back
    isec         intersections of VCF/BCF files
    merge        merge VCF/BCF files files from non-overlapping sample sets
    norm         left-align and normalize indels
    plugin       user-defined plugins
    query        transform VCF/BCF into user-defined formats
    reheader     modify VCF/BCF header, change sample names
    view         VCF/BCF conversion, view, subset and filter VCF/BCF files

 -- VCF/BCF analysis
    call         SNP/indel calling
    consensus    create consensus sequence by applying VCF variants
    cnv          HMM CNV calling
    csq          call variation consequences
    filter       filter VCF/BCF files using fixed thresholds
    gtcheck      check sample concordance, detect sample swaps and contamination
    mpileup      multi-way pileup producing genotype likelihoods
    roh          identify runs of autozygosity (HMM)
    stats        produce VCF/BCF stats

 Most commands accept VCF, bgzipped VCF, and BCF with the file type detected
 automatically even when streaming from a pipe. Indexed VCF and BCF will work
 in all situations. Un-indexed VCF and BCF and streams will work in most but
 not all situations.

(pysambcf) balter3:~$ python -c "import pysam"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/Applications/conda/envs/pysambcf/lib/python3.5/site-packages/pysam/__init__.py", line 5, in <module>
    from pysam.libchtslib import *
ImportError: libhts.so.1: cannot open shared object file: No such file or directory
(pysambcf) balter3:~$ conda update pysam
Fetching package metadata .................
Solving package specifications: .

Package plan for installation in environment /home/Applications/conda/envs/pysambcf:

The following packages will be UPDATED:

    pysam:    0.10.0-py35_2 bioconda --> 0.10.0-py35_3 bioconda

The following packages will be DOWNGRADED due to dependency conflicts:

    bcftools: 1.4-0         bioconda --> 1.3.1-1       bioconda
    htslib:   1.4-0         bioconda --> 1.3.2-0       bioconda
    samtools: 1.4-0         bioconda --> 1.3.1-5       bioconda

Proceed ([y]/n)? y

(pysambcf) balter3:~$ python -c "import pysam"
abalter commented 7 years ago

Problem also with htslib:

(pysambcf) balter3:~$ conda update bcftools
Fetching package metadata .................
Solving package specifications: .

Package plan for installation in environment /home/Applications/conda/envs/pysambcf:

The following packages will be UPDATED:

    bcftools: 1.3.1-1       bioconda --> 1.4-0         bioconda

The following packages will be DOWNGRADED due to dependency conflicts:

    pysam:    0.10.0-py35_3 bioconda --> 0.10.0-py35_2 bioconda

Proceed ([y]/n)?

(pysambcf) balter3:~$
(pysambcf) balter3:~$ python -c "import pysam"
(pysambcf) balter3:~$ conda update htslib
Fetching package metadata .................
Solving package specifications: .

Package plan for installation in environment /home/Applications/conda/envs/pysambcf:

The following packages will be UPDATED:

    htslib: 1.3.2-0 bioconda --> 1.4-0 bioconda

Proceed ([y]/n)? y

(pysambcf) balter3:~$ python -c "import pysam"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/Applications/conda/envs/pysambcf/lib/python3.5/site-packages/pysam/__init__.py", line 5, in <module>
    from pysam.libchtslib import *
ImportError: libhts.so.1: cannot open shared object file: No such file or directory
kyleabeauchamp commented 7 years ago

This is a known issue. The latest HTSLib is not compatible with the pysam version we have. The recipe has been updated, but there is an old package that is incompatible.

You should downgrade HTSLib and get the pysam 0.10.0-py35_3 package until the new pysam (for the latest HTSLib 1.4) version is available.

AndreasHeger commented 7 years ago

Thanks, I will close this as related to #413