CRAM: embedded references + multi-slice implies error

Open
#503 0 comments 0 reactions 1 assignee View on GitHub

@jkbonfield is already working on this.

Since Apr 7, 2017.

Assessment

This issue has not been assessed yet.

Description

$ samtools view -O cram,seqs_per_slice=100,slices_per_container=3,embed_ref mpileup.1.bam -o _.cram
$ samtools view -f 0xffff _.cram
ERROR: md5sum reference mismatch for ref 0 pos 581..1515
CRAM: 4e96f155b96b5a96edd94baa663201f1
Ref : 83916a0a333f001225279539abe685fe
Failure to decode slice
[main_samview] truncated file.

With slices_per_container=1 it's fine, as is without embed_ref or with no_ref option. (Scramble has the same bug too.)

Dominant language
C
Stars
950
Forks
475
Avg merge
3d 13h
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from samtools/htslib

All issues in samtools/htslib

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.