Parsing DRAGEN Annotation JSON
Our JSON files are organized similarly to original VCF variants:

DRAGEN Annotation JSON files can get very large and sometimes we receive feedback that a bioinformatician tried to read the JSON file into Python or R resulting in a program that ran out of available RAM. This happens because those parsers try to load everything into memory all at once.
To get around those issues, we play some clever tricks with newlines that enables our users to parse our JSON files quickly and efficiently.
Organization
Our JSON file is arranged as follows:
the header section is located on the first line
each line after that corresponds to a position (same as a row in a VCF file)
until you reach the genes section
],"genes":[
each line after that corresponds to a gene
until you reach the end
]}
Knowing this, you can load each position line as an independent JSON object and extract the information you need.
JASIX
One of the tools that we really like in the VCF ecosystem is tabix. Unfortunately, tabix only works for tab-delimited file formats. As a result, we created a similar tool for DRAGEN Annotation JSON files called JASIX.
Here's an example of how you might use JASIX:
the
-iargument specifies the DRAGEN Annotation JSON paththe
-qargument specifies a genomic range (you can use as many of these as you want)
JASIX also includes additional options for showing the DRAGEN Annotation header or for extracting different sections (like the genes section).
The output from JASIX is compliant JSON object shown in pretty-printed form:
Last updated
Was this helpful?

