different size integers) and more advanced data structures to allow for defining composite structures. The library provides primitives for common atomic constructs (e.g. Let’s compare these methods on the binary file format for BAM index files that ConstructĬonstruct is “a powerful declerative parser (and builder) for binary data”. Both construct and kaitai-struct result in more readable and maintainable code, and both provide concepts for dealing with common data structures that I would have had to deal with on my own. Yes, I could have used the core struct Python library, but I wanted a slightly higher level interface to the binary grammer. Since I was targeting the Python runtime for Lambda I found two packages that would fit the bill to define the grammer of the binary data into objects that I could easily use, Construct and Kaitai Struct. If I wanted that information I would either need to calculate the file offsets myself (as is done in the excellent htsnexus) or implement my own binary file parser for BAI files. PICARD, samtools) that use the index for random access into BAM files. There are no tools that independently inspect this binary format and spit out the information into text, only tools (e.g. For easier reference, below is the description of the index format pulled from the SAM format specification. The tangential rabbit hole I fell into was in developing routines to parse out the data within a BAM index file into DynamoDB for easy lookup.
Limit the number requests as much as possible.
The goal of the project would be to have a server/client that conforms to the draft GA4GH Streaming API specification. For example, the other day I was trying to write a smallapplication to serve up BAM alignments to a user based on a location range query. Sometimes I like to get into the weeds of a problem that is only tangentially related to the actual problem I am trying to solve.