File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,9 @@ export default class BamFile {
105105 this . chunkSizeLimit = chunkSizeLimit || 300000000 // 300MB
106106 }
107107
108- async getHeader ( opts : AbortSignal | BaseOpts = { } ) {
109- const indexData = await this . index . parse ( makeOpts ( opts ) )
108+ async getHeader ( origOpts : AbortSignal | BaseOpts = { } ) {
109+ const opts = makeOpts ( origOpts )
110+ const indexData = await this . index . parse ( opts )
110111 const ret = indexData . firstDataLine ? indexData . firstDataLine . blockPosition + 65535 : undefined
111112 let buffer
112113 if ( ret ) {
@@ -433,6 +434,9 @@ export default class BamFile {
433434 start : blockStart ,
434435 end : blockEnd ,
435436 } ,
437+ // the below results in an automatically calculated file-offset based ID
438+ // if the info for that is available, otherwise crc32 of the features
439+ //
436440 // cpositions[pos] refers to actual file offset of a bgzip block boundaries
437441 //
438442 // we multiply by (1 <<8) in order to make sure each block has a "unique"
Original file line number Diff line number Diff line change 1- import { BaseOpts } from './indexFile '
2- import BamFile , { BamOpts , BAM_MAGIC } from './bamFile'
1+ import { BaseOpts , BamOpts } from './util '
2+ import BamFile , { BAM_MAGIC } from './bamFile'
33import 'cross-fetch/polyfill'
44import Chunk from './chunk'
55import { unzip } from '@gmod/bgzf-filehandle'
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import QuickLRU from 'quick-lru'
33import { GenericFilehandle } from 'generic-filehandle'
44import VirtualOffset from './virtualOffset'
55import Chunk from './chunk'
6+ import { BaseOpts } from './util'
67
78export default abstract class IndexFile {
89 public filehandle : GenericFilehandle
You can’t perform that action at this time.
0 commit comments