Are you using the latest version of samtools and HTSlib? If not, please specify.
(run samtools --version)
yes
samtools 1.23.1
Using htslib 1.23.1
Please describe your environment.
- OS (run
uname -sr on Linux/Mac OS or wmic os get Caption, Version on Windows) Linux 5.15.0-176-generic
- machine architecture (run
uname -m on Linux/Mac OS or wmic os get OSArchitecture on Windows) x86_64
- compiler (run
gcc --version or clang --version) 11.4.0
Please specify the steps taken to generate the issue, the command you are running and the relevant output.
This is a bit of a strange one.
We had a case when the release was downloaded
https://github.com/samtools/samtools/releases/download/1.23.1/samtools-1.23.1.tar.bz2
and extracted, the permisions of the files were not set properly.
most files being set as
-rw-r--r--
rather than
-rw-rw-r--
crucially, version.sh in both samtools and htslib, and hts_probe_cc.sh were all set to
-rw-r--r--
So doing a
./configure
make
we get the following message in the output
make
cd htslib-1.23.1 && make htslib_static.mk
make[1]: Entering directory '/install/jamfer/tmp/samtools-1.23.1/htslib-1.23.1'
make[1]: ./version.sh: Permission denied
BUT, it still builds a samtools binary
Then, if you run samtools version
You get
samtools version
samtools
Using htslib
...
so when you run something like
./samtools view -H test.bam
The header VN tags are empty. If you make bams with this build of samtools, they will all be invalid, missing the VN tag. For example, (zaeleus/noodles#397)
here is an example of a broken header (last line)
@PG PN:minimap2 ID:minimap2 VN:2.28-r1209 CL:minimap2 -R @RG\tID:JFPB\tSM:JFPB -y -Y --secondary=no --MD -a -x map-hifi -t 48 /genome/chm13v2.0_maskedY_rCRS.fa -
@PG PN:samtools ID:samtools VN:1.21 PP:minimap2 CL:samtools sort -@ 48 -o sorted.bam -
@PG PN:whatshap ID:whatshap VN:2.3 CL:whatshap haplotag --reference /genome/chm13v2.0_maskedY_rCRS.fa --output sorted.haplotagged.bam --sample JFPB --tag-supplementary --ignore-read-groups --output-threads 16 --output-haplotag-list sorted.haplotagged.tsv snp_indel.phased.vcf.gz sorted.bam m5:6c0050281fedc5e7aa359e1cc9d72b4e
@PG ID:samtools.1 PN:samtools PP:samtools VN: CL:/install/samtools-1.23.1/samtools view -H JFPB.chm13v2.minimap2.whatshap.sorted.haplotagged.bam
and another example
@PG ID:minimap2 PN:minimap2 VN:2.26-r1175 CL:minimap2 -ax map-ont -t 8 --secondary=no /genome/chm13v2.0.mmi -
@PG ID:samtools PN:samtools PP:minimap2 VN:1.18 CL:samtools sort -o test.bam -
@PG ID:samtools.1 PN:samtools PP:samtools VN: CL:/install/samtools-1.23.1/samtools view -@ 4 -b -G 2048 -L test_region.chm13.bed test_aligned.bam
@PG ID:samtools.2 PN:samtools PP:samtools.1 VN: CL:/install/samtools-1.23.1/samtools sort -@ 4
@PG ID:samtools.3 PN:samtools PP:samtools.2 VN: CL:/install/samtools-1.23.1/samtools view -N test_hap1_reads.tsv -o test-hap1_chm13.bam test-chm13.bam
@PG ID:samtools.4 PN:samtools PP:samtools.3 VN:1.16.1 CL:samtools view -H test-hap1_chm13.bam
I think the solution here is to have make fail if it hits the permission denied, so it doesn't build a broken binary, because otherwise this is all silent if you aren't paying attention (or it's running in an automated build)
Cheers,
James
Are you using the latest version of samtools and HTSlib? If not, please specify.
(run
samtools --version)yes
samtools 1.23.1
Using htslib 1.23.1
Please describe your environment.
uname -sron Linux/Mac OS orwmic os get Caption, Versionon Windows) Linux 5.15.0-176-genericuname -mon Linux/Mac OS orwmic os get OSArchitectureon Windows) x86_64gcc --versionorclang --version) 11.4.0Please specify the steps taken to generate the issue, the command you are running and the relevant output.
This is a bit of a strange one.
We had a case when the release was downloaded
https://github.com/samtools/samtools/releases/download/1.23.1/samtools-1.23.1.tar.bz2and extracted, the permisions of the files were not set properly.
most files being set as
-rw-r--r--rather than
-rw-rw-r--crucially,
version.shin both samtools and htslib, andhts_probe_cc.shwere all set to-rw-r--r--So doing a
./configure
make
we get the following message in the output
BUT, it still builds a
samtoolsbinaryThen, if you run
samtools versionYou get
so when you run something like
The header
VNtags are empty. If you make bams with this build of samtools, they will all be invalid, missing the VN tag. For example, (zaeleus/noodles#397)here is an example of a broken header (last line)
and another example
I think the solution here is to have make fail if it hits the permission denied, so it doesn't build a broken binary, because otherwise this is all silent if you aren't paying attention (or it's running in an automated build)
Cheers,
James