biod / sambamba

Tools for working with SAM/BAM data
http://thebird.nl/blog/D_Dragon.html
GNU General Public License v2.0
557 stars 104 forks source link

Sambamba with htslib 1.10.2 #425

Closed bioinfornatics closed 3 years ago

bioinfornatics commented 4 years ago

Dear,

Thanks for your awesome project.

We are trying to build sambamba version 0.7.1 whith htslib 1.10.2 provided by samtools. Thus we have use patched:

The build works fine but test about cram fail:

sambamba-0.7.1: ./run_tests.sh bin/sambamba-0.7.1
sambamba-0.7.1: Running tests for bin/sambamba-0.7.1...
sambamba-0.7.1: #
sambamba-0.7.1: # Performing tests
sambamba-0.7.1: #
sambamba-0.7.1: testSamtoBam
sambamba-0.7.1: testSubSample
sambamba-0.7.1: testSortByName
sambamba-0.7.1: testSortByCoordinate
sambamba-0.7.1: testSortPicard
sambamba-0.7.1: testSortByNameMatchMates
sambamba-0.7.1: testNaturalSortMatchMates
sambamba-0.7.1: testSlice
sambamba-0.7.1: testSliceMultipleRegions
sambamba-0.7.1: testSliceMultipleRegionsBed
sambamba-0.7.1: ASSERT:expected:<156> but was:<0>
sambamba-0.7.1: testView
sambamba-0.7.1: testOverwriteProtection
sambamba-0.7.1: testSortingEmptyFile
sambamba-0.7.1: testMarkdupEmptyFile
sambamba-0.7.1: testCramWriting
sambamba-0.7.1: [E::cram_get_ref] No reference found for id 67113545
sambamba-0.7.1: [E::cram_encode_container] Failed to load reference #67113545
sambamba-0.7.1: [E::cram_flush_thread] Call to cram_encode_container failed
sambamba-0.7.1: [E::cram_get_ref] No reference found for id 67113545
sambamba-0.7.1: [E::cram_encode_container] Failed to load reference #67113545
sambamba-0.7.1: [E::cram_flush_thread] Call to cram_encode_container failed
sambamba-0.7.1: ./test/test_suite.sh: line 143: 27561 Segmentation fault      (core dumped) $sambamba $opts view -S htslib/test/c1#pad2.sam -T htslib/test/c1.fa -f cram -o $outdir/c1_pad2.cram
sambamba-0.7.1: ASSERT:expected:<0> but was:<139>
sambamba-0.7.1: testCramReading
sambamba-0.7.1: ./test/test_suite.sh: line 148: 27680 Segmentation fault      (core dumped) $sambamba $opts view -C $outdir/c1_pad2.cram > /dev/null
sambamba-0.7.1: ASSERT:expected:<0> but was:<139>
sambamba-0.7.1: testIndexUsage
sambamba-0.7.1: [E::cram_get_ref] No reference found for id 67113545
sambamba-0.7.1: [E::cram_encode_container] Failed to load reference #67113545
sambamba-0.7.1: [E::cram_flush_thread] Call to cram_encode_container failed

Thanks for you help

Have a nice day sambamba-0.7.1-fix_htslib_func_call.txt

pjotrp commented 4 years ago

Thanks for trying. I am actually planning to strip out the CRAM stuff and the htslib dependency. Feel free to do that. The old htslib was patched by sambamba which may explain the problems. Also the behaviour of htslib changed.

tillea commented 4 years ago

Thanks for trying. I am actually planning to strip out the CRAM stuff and the htslib dependency. Feel free to do that. The old htslib was patched by sambamba which may explain the problems. Also the behaviour of htslib changed.

Do you have some plan when you might be able to solve this inside sambamba. Htslib upstream is not really happy about the patch.

pjotrp commented 3 years ago

Getting round to it.

pjotrp commented 3 years ago

I stripped out CRAM support and htslib in the 0.8 release.