@@ -7,10 +7,10 @@ const twoBit = ['T', 'C', 'A', 'G']
77const byteTo4Bases : string [ ] = [ ]
88for ( let index = 0 ; index < 256 ; index ++ ) {
99 byteTo4Bases . push (
10- twoBit [ ( index >> 6 ) & 3 ] +
11- twoBit [ ( index >> 4 ) & 3 ] +
12- twoBit [ ( index >> 2 ) & 3 ] +
13- twoBit [ index & 3 ] ,
10+ twoBit [ ( index >> 6 ) & 3 ] ! +
11+ twoBit [ ( index >> 4 ) & 3 ] ! +
12+ twoBit [ ( index >> 2 ) & 3 ] ! +
13+ twoBit [ index & 3 ] ! ,
1414 )
1515}
1616
@@ -285,7 +285,7 @@ export default class TwoBitFile {
285285 // advance past mask blocks that end before current position
286286 while (
287287 maskBlockIdx < maskBlockStarts . length &&
288- maskBlockStarts [ maskBlockIdx ] + maskBlockSizes [ maskBlockIdx ] <=
288+ maskBlockStarts [ maskBlockIdx ] ! + maskBlockSizes [ maskBlockIdx ] ! <=
289289 genomicPosition
290290 ) {
291291 maskBlockIdx ++
@@ -317,14 +317,14 @@ export default class TwoBitFile {
317317 while ( genomicPosition < runEnd ) {
318318 const bytePosition = ( genomicPosition >>> 2 ) - baseBytesOffset
319319 const subPosition = genomicPosition & 3
320- const byte = buffer [ bytePosition ]
320+ const byte = buffer [ bytePosition ] !
321321
322322 // if aligned to byte boundary and have room for full byte, emit all 4
323323 if ( subPosition === 0 && genomicPosition + 4 <= runEnd ) {
324- sequenceParts . push ( lookup [ byte ] )
324+ sequenceParts . push ( lookup [ byte ] ! )
325325 genomicPosition += 4
326326 } else {
327- sequenceParts . push ( lookup [ byte ] [ subPosition ] )
327+ sequenceParts . push ( lookup [ byte ] ! [ subPosition ] ! )
328328 genomicPosition += 1
329329 }
330330 }
@@ -350,7 +350,7 @@ export default class TwoBitFile {
350350 while ( lo < hi ) {
351351 const mid = ( lo + hi ) >>> 1
352352 // mid is always valid index since lo < hi <= len
353- const blockEnd = blockStarts [ mid ] + blockSizes [ mid ]
353+ const blockEnd = blockStarts [ mid ] ! + blockSizes [ mid ] !
354354 if ( blockEnd <= regionStart ) {
355355 lo = mid + 1
356356 } else {
0 commit comments