Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Dec 19, 2024
1 parent ffec22b commit 52f5b26
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cramFile/sectionParsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -652,11 +652,14 @@ function cramContainerHeader1(majorVersion: number) {
parser: (buffer: Uint8Array, offset: number) => {
const b = buffer
const dataView = new DataView(b.buffer, b.byteOffset, b.length)

// byte size of the container data (blocks)
const length = dataView.getInt32(offset, true)
offset += 4
// reference sequence identifier, -1 for unmapped reads, -2 for multiple
// reference sequences

// reference sequence identifier:
// -1 for unmapped reads,
// -2 for multiple reference sequences
const [refSeqId, newOffset1] = parseItf8(buffer, offset)
offset += newOffset1
const [refSeqStart, newOffset2] = parseItf8(buffer, offset)
Expand Down

0 comments on commit 52f5b26

Please sign in to comment.