chapmanb / cloudbiolinux

CloudBioLinux: configure virtual (or real) machines with tools for biological analyses
http://cloudbiolinux.org
MIT License
257 stars 158 forks source link

Pin Samtools version to 1.7 #354

Closed hackdna closed 4 years ago

hackdna commented 4 years ago

To fix https://github.com/bcbio/bcbio-nextgen/issues/3320 and toward https://github.com/bcbio/bcbio-nextgen/issues/3318

I performed a clean bcbio install using the latest master and ended up with the following working configuration:

vagrant@bcbio:~$ which samtools
/home/vagrant/local/share/bcbio/anaconda/bin/samtools
vagrant@bcbio:~$ samtools --version
samtools 1.7
Using htslib 1.7
Copyright (C) 2018 Genome Research Ltd.
vagrant@bcbio:~$ conda list openssl
# packages in environment at /home/vagrant/local/share/bcbio/anaconda:
#
# Name                    Version                   Build  Channel
openssl                   1.1.1g               h516909a_1    conda-forge
pyopenssl                 19.1.0                   py36_0    conda-forge
r-openssl                 1.4.1             r35he5c4762_0    conda-forge
vagrant@bcbio:~$ conda list samtools
# packages in environment at /home/vagrant/local/share/bcbio/anaconda:
#
# Name                    Version                   Build  Channel
bioconductor-rsamtools    1.34.0           r351hf484d3e_0    bioconda
perl-bio-samtools         1.43            pl526h1341992_1    bioconda
samtools                  1.7                           1    bioconda

This update will ensure this configuration is reproducible. Tested using: bcbio_nextgen.py upgrade -u development --tools

roryk commented 4 years ago

Thanks-- does getting 1.9 not work? 1.7 is super old.

hackdna commented 4 years ago

Sure, this is just a quick fix to help folks with broken bcbio installations. According to https://github.com/bioconda/bioconda-recipes/issues/12100, samtools 1.9 had issues since 2018. I will test more recent versions and report back.

hackdna commented 4 years ago

Tested successfully by bcbio_nextgen.py upgrade -u development --tools with samtools=1.10 in tmpbcbio-install/cloudbiolinux/contrib/flavor/ngs_pipeline_minimal/packages-conda.yaml:

vagrant@bcbio:~$ which samtools
/home/vagrant/local/share/bcbio/anaconda/bin/samtools
vagrant@bcbio:~$ samtools --version
samtools 1.10
Using htslib 1.10.2
Copyright (C) 2019 Genome Research Ltd.
vagrant@bcbio:~$ conda list openssl
# packages in environment at /home/vagrant/local/share/bcbio/anaconda:
#
# Name                    Version                   Build  Channel
openssl                   1.1.1g               h516909a_1    conda-forge
pyopenssl                 19.1.0                   py36_0    conda-forge
r-openssl                 1.4.1             r35he5c4762_0    conda-forge

Installing from scratch may be a different story because by default mamba/conda resolves samtools to version 1.7. However, I don't know an easy way to test that because bcbio install always overwrites tmpbcbio-install/cloudbiolinux with a version from GitHub.

roryk commented 4 years ago

Heya, you can skip the cloudbiolinux update by linking tmpbcbio-install/cloudbiolinux to your local one.

hackdna commented 4 years ago

I did but this directory got overwritten with cloudbiolinux from GitHub when running bcbio_nextgen_install.py.

roryk commented 4 years ago

Great, can you just push the 1.10 fix and we can see if it works, we can always revert it.

roryk commented 4 years ago

Thanks Ilya!

hackdna commented 4 years ago

It worked for me:

vagrant@bcbio:~$ which samtools
/home/vagrant/local/share/bcbio/anaconda/bin/samtools
vagrant@bcbio:~$ samtools --version
samtools 1.10
Using htslib 1.10.2
Copyright (C) 2019 Genome Research Ltd.
vagrant@bcbio:~$ conda list openssl
# packages in environment at /home/vagrant/local/share/bcbio/anaconda:
#
# Name                    Version                   Build  Channel
openssl                   1.1.1g               h516909a_1    conda-forge
pyopenssl                 19.1.0                   py36_0    conda-forge
r-openssl                 1.4.1             r35he5c4762_0    conda-forge
roryk commented 4 years ago

Awesome, thanks so much. Worked for me too.