Open amizeranschi opened 3 years ago
Hi @amizeranschi !
Thanks for the detailed reporting and sorry about the issues!
This last update https://github.com/chapmanb/cloudbiolinux/pull/387 unfortunately, can' be applied by bcbio_nextgen.py -u skip upgrade
- you'd better re-install the code and tools from scratch and link the data.
https://bcbio-nextgen.readthedocs.io/en/latest/contents/intro.html#install-bcbio-python-package-and-tools
There might be samtools issues as well, since we now have multiple htslib environments - please update here if you still see the error in the new instllalation.
Sergey
Hi Sergey,
Thanks for the reply. Everything I reported here was based on a fresh install of bcbio, completely from scratch, on a new machine. This was done on the 14th of November and I followed the documentation you linked above.
The update you mentioned seems to be from the 28th of October, so I'm guessing that my install should have used the updated code. Here's what I did:
cd ${HOME}
wget https://raw.githubusercontent.com/bcbio/bcbio-nextgen/master/scripts/bcbio_nextgen_install.py
python3 bcbio_nextgen_install.py ${HOME}/bcbio --tooldir=${HOME}/bcbio/tools --nodata
## add the locations to the bcbio-nextgen dependency executables to the system's $PATH variable
echo "export PATH=${HOME}/bcbio/anaconda/bin:${HOME}/bcbio/tools/bin:\$PATH" >> ~/.bashrc
source ~/.bashrc
## download genome data for sacCer3
bcbio_nextgen.py upgrade -u skip --genomes sacCer3 --aligners bwa --aligners bowtie2 --aligners hisat2 --aligners star
I can retry the installation within the following days, but is there any reason to believe there should be a different outcome, regarding the Samtools errors I mentioned above?
Update:
As advised, I tried reinstalling Bcbio from scratch, but it didn't make any difference. I am still in the same situation as outlined above.
When I try installing the data, Bcbio tries to use the old samtools version that gets symlinked in the tools/bin directory and runs into the error mentioned in the title.
Update 2:
As mentioned in https://github.com/bcbio/bcbio-nextgen/issues/3561, I've upgraded bcbio to the latest development version. Unlike there, however, this didn't fix the issue mentioned here.
I can hack around it by renaming or removing the samtools symlink from the tools directory, but it might still be good to solve this before the next stable release.
HI @amizeranschi !
Thanks for the follow up and for the patience! Yes, indeed this old samtools should not be called. Please unlink it:
cd /home/user/bcbio/tools/bin/
unlink samtools
I've pushed a fix that it won't be linked in the first place anymore: https://github.com/chapmanb/cloudbiolinux/pull/393
Let me know if that helps with the installation.
Sergey
Hi @naumenko-sa
Strangely enough, I still seem to be getting this issue. Once again, on a completely fresh bcbio install, from scratch. Upgrading bcbio and tools to development didn't help.
This time, the culprit samtools executable is in bcbio_dir/anaconda/bin:
[a.mizeranschi@haswell-wn30 ~]$ which samtools
~/bcbio-nextgen/anaconda/bin/samtools
[a.mizeranschi@haswell-wn30 ~]$ samtools
samtools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
[a.mizeranschi@haswell-wn30 ~]$ mamba list | grep samtools
bioconductor-rsamtools 2.10.0 r41h619a076_1 bioconda
perl-bio-samtools 1.43 pl5321h7132678_3 bioconda
samtools 1.7 1 bioconda
Any help here would be much appreciated.
I tried pinning the samtools version to 1.12, but ran into errors:
[a.mizeranschi@haswell-wn30 ~]$ mamba install -c bioconda samtools=1.12
[...]
Encountered problems while solving:
- package cyvcf2-0.30.11-py37h31aceb7_2 requires htslib >=1.13,<1.14.0a0, but none of the providers can be installed
However, this seems to work if I request samtools=1.13:
Package Version Build Channel Size
────────────────────────────────────────────────────────────────────
Upgrade:
────────────────────────────────────────────────────────────────────
- samtools 1.7 1 installed
+ samtools 1.13 h8c37831_0 bioconda/linux-64 397 KB
Downgrade:
────────────────────────────────────────────────────────────────────
- ldc 1.28.1 hcf88599_0 installed
+ ldc 1.20.0 h9a1ace1_1 conda-forge/linux-64 37 MB
- ncurses 6.3 h9c3ff4c_0 installed
+ ncurses 6.2 h58526e2_4 conda-forge/linux-64 Cached
- sqlite 3.37.1 h4ff8645_0 installed
+ sqlite 3.37.0 h9cd32fc_0 conda-forge/linux-64 Cached
Summary:
Upgrade: 1 packages
Downgrade: 3 packages
Total download: 37 MB
────────────────────────────────────────────────────────────────────
Confirm changes: [Y/n]
I'm seeing this samtools issue as well with the current stable release. Working on debugging.
Yeah it's installing samtools 1.7 on my machine as well. Seeing if pinning to 1.13 works, as you mentioned.
As mentioned in https://github.com/bcbio/bcbio-nextgen/issues/3632, we likely need to double check the pinning of bcftools as well.
This hotfix seems to be working for me so far:
/opt/koopa/opt/bcbio-nextgen/install/anaconda/bin/mamba install \
--name 'base' \
'bcftools==1.15' \
'samtools==1.15'
Transaction
Prefix: /opt/koopa/app/bcbio-nextgen/1.2.9/install/anaconda
Updating specs:
- bcftools==1.15
- samtools==1.15
- ca-certificates
- certifi
- openssl
Package Version Build Channel Size
─────────────────────────────────────────────────────────────────────────────
Change:
─────────────────────────────────────────────────────────────────────────────
- fastp 0.23.2 h79da9fb_0 installed
+ fastp 0.23.2 hb7a2d85_2 bioconda/linux-64 3 MB
- libtiff 4.3.0 hf544144_1 installed
+ libtiff 4.3.0 h542a066_3 conda-forge/linux-64 Cached
- r-base 4.1.1 hb67fd72_0 installed
+ r-base 4.1.1 hb93adac_1 conda-forge/linux-64 25 MB
- staden_io_lib 1.14.14 h7c09d56_1 installed
+ staden_io_lib 1.14.14 h0d9da7e_3 bioconda/linux-64 792 KB
Upgrade:
─────────────────────────────────────────────────────────────────────────────
- bcftools 1.13 h3a49de5_0 installed
+ bcftools 1.15 h0ea216a_2 bioconda/linux-64 852 KB
- cyvcf2 0.30.11 py37h31aceb7_2 installed
+ cyvcf2 0.30.15 py37h6841c58_0 bioconda/linux-64 929 KB
- gsl 2.6 he838d99_2 installed
+ gsl 2.7 he838d99_0 conda-forge/linux-64 Cached
- htslib 1.13 h9093b5e_0 installed
+ htslib 1.15 h9753748_0 bioconda/linux-64 Cached
- lerc 2.2.1 h9c3ff4c_0 installed
+ lerc 3.0 h9c3ff4c_0 conda-forge/linux-64 Cached
- libdeflate 1.7 h7f98852_5 installed
+ libdeflate 1.10 h7f98852_0 conda-forge/linux-64 Cached
- pysam 0.17.0 py37h45aed0b_0 installed
+ pysam 0.18.0 py37h8fe4cdf_2 bioconda/linux-64 3 MB
- samtools 1.7 1 installed
+ samtools 1.15 h1170115_1 bioconda/linux-64 392 KB
- tk 8.6.10 hbc83047_0 installed
+ tk 8.6.12 h27826a3_0 conda-forge/linux-64 Cached
- zstd 1.5.0 ha4553b6_1 installed
+ zstd 1.5.2 ha95c52a_0 conda-forge/linux-64 Cached
Summary:
Change: 4 packages
Upgrade: 10 packages
Total download: 33 MB
Still not working, now seeing this error on an RNA-seq run: samtools sort: failed to read header
.
Trying to pin against 1.13 instead to see if that works.
See potentially related 1.13 pinning: https://github.com/chapmanb/cloudbiolinux/blob/c7fbc5c15629810a55c2c0df2e9a482410c80205/contrib/flavor/ngs_pipeline_minimal/packages-conda.yaml#L114
Yeah still hitting this error: samtools sort: failed to read header from "/dev/stdin"
Update: this only happens when running STAR
@mjsteinbaugh
FYI, I couldn't reproduce the samtools sort
error you mentioned above. I'm testing using the RNA-seq scenario described in my older issue report, here: https://github.com/bcbio/bcbio-nextgen/issues/3565#issuecomment-997212051
My Samtools version is also 1.15.
P.S. Are you any closer to making a new release for r-acidgenomes
in bioconda? It would be great to have bcbiornaseq
working within bcbio once again.
@amizeranschi working on updating r-bcbiornaseq
(https://github.com/bioconda/bioconda-recipes/pull/33652) and r-acidgenomes
(https://github.com/bioconda/bioconda-recipes/pull/33651). Track those open pull requests for updates.
I'm going to run the bcbio unit tests and see what's up with the current install.
Alright, thanks for the update, I've tracked those pull requests.
If you do try to run the code I've linked, you will first need sacCer3 genome data available in bcbio. This is pretty small and you can get it via:
## download genome data for sacCer3
bcbio_nextgen.py upgrade -u skip --genomes sacCer3 --aligners bwa --aligners bowtie2 --aligners hisat2 --aligners star
You'd also want to comment out lines 217-220, which enable bcbiornaseq
.
Hi @mjsteinbaugh and @amizeranschi !
Sorry, I dropped the ball.
Interestingly, my ~january 1.2.9 installation received samtools 1.13 in the base env, as needed.
But the fresh one indeed received samtools1.7 in the base.
It has to be 1.13, not 1.15, I fixed it with
mamba install samtools=1.13
it is weird why conda solved it like that, bcftools was pinned to 1.13. I pinned samtools as well: https://github.com/chapmanb/cloudbiolinux/blob/master/contrib/flavor/ngs_pipeline_minimal/packages-conda.yaml#L113
I appreciate if anybody tests.
Sergey
I've tried another fresh install and now it ends up with bcbio-nextgen 1.2.8 at the end. Here's what I tried:
cd
wget https://raw.githubusercontent.com/bcbio/bcbio-nextgen/master/scripts/bcbio_nextgen_install.py
python3 bcbio_nextgen_install.py /home/test/bcbio-test --tooldir=/home/test/bcbio-test/tools --nodata --mamba
export PATH=/home/test/bcbio-test/anaconda/bin:/home/test/bcbio-test/tools/bin:$PATH
bcbio_nextgen.py --version
This reports 1.2.8
. Having a look at the output, I see the following:
Downgrade:
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
- bcbio-nextgen 1.2.9 pyh5e36f6f_2 installed
+ bcbio-nextgen 1.2.8 pyh5e36f6f_0 bioconda/noarch 2 MB
A collaborator, @marianastase0912, had a similar thing happen to her fresh bcbio install.
Upgrading to the latest development version doesn't fix this, either, as the same downgrade happens at some point near the end of the install.
Thanks for testing @amizeranschi
Yes, it replicates for me as well in the fresh installation.
The workaround for now:
mamba install openssl=1.1.1l bcbio-nextgen=1.2.9
I am fixing bcbio recipe to solve this issue https://github.com/bioconda/bioconda-recipes/blob/master/recipes/bcbio-nextgen/meta.yaml#L43
I pinned openssl, because new openssl3.0 shifts a lot of packages openssl1.1.1n is released, and I think conda downgrades bcbio instead of keeping openssl 1.1.1l
Sergey
Fixing it here: https://github.com/bioconda/bioconda-recipes/pull/34746
Awesome thanks @naumenko-sa , happy to help test this out on an AWS instance.
Yeah still hitting this error:
samtools sort: failed to read header from "/dev/stdin"
Update: this only happens when running STAR
@mjsteinbaugh I know that I am late here.. But I have had the same problem with STAR .. After a lot of "suffering" , I have discovered that this is a RAM problem.. STAR uses a lot of RAM, and if the resources are not managed properly.. you will get this exact error.
Version info
bcbio_nextgen.py --version
): 1.2.8lsb_release -ds
): Ubuntu 20.04.3 LTSTo Reproduce Exact bcbio command you have used:
This results in the following:
This suggests an older version of samtools is being used at some point. There are multiple versions of samtools installed in bcbio:
My PATH is configured like this:
And the main version of Samtools on my system, given the above, seems to be v1.13:
There also seems to be an older version of Samtools getting symlinked in my bcbio tools directory. My guess is that this is probably being picked up somehow when installing the genome data.
Removing this symlink from the tools directory got things working for me and I managed to install the genome data using the command mentioned above.