cram-js icon indicating copy to clipboard operation
cram-js copied to clipboard

Remove dependency on long, abortable-promise-cache

Open cmdcolin opened this issue 11 months ago • 2 comments

This removes some dependencies on some packages

The removal of abortable-promise-cache could change aborting behavior in a slight way: if multiple clients try to parseIndex, and one aborts, then all will abort

I don't believe this will affect jbrowse code, and would probably not affect other consumers

This also removes the long package. My testing seemed to conclude that type 'I' in the data records are Uint32 instead of Uint64 requiring the Long package. I couldn't find exact reference to this in the CRAMv3.1 pdf but console logging the buffer showed only 4 bytes instead of 8, and that also corresponds to type i/I in bam-js being 4 byte ints (https://github.com/GMOD/bam-js/blob/507c7284749603862ef72a473db6435c8a865102/src/record.ts#L211-L220)

The typescript in this zone of the code is slightly improved also, but may benefit from some further work (there is technically some usage of Uint8Array|number but it ignores the number usage right now)

cmdcolin avatar Jul 30 '23 08:07 cmdcolin