I have annotated a genome using maker and the json output can be used with jbrowse. All data are available on my local PC. So far so good, but now I would like to export the annotated regions of the json tree into gff or fasta files to use it e.g. for a local blast search (via viroblast). I now, that I can export a single file, but I've got more than 3000 annotated genes. Unfortunately, I found several tools to get json format from many other file formats but not the other way round.
And please keep in mind, that - unfortunately - I am a newby to both: genome annotation and unix based server systems ...
It depends on the structure of your JSON, but you can do this type of conversion quite easily in Python. Here's a generic, basic example:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You just need to work with the structure of your JSON object to figure out how to loop through your array of annotation objects. You then dereference the keys in each annotation object, writing out GFF fields in an order that follows the format's specification. The example above turns the output into three-column BED, but you can simply reorder fields to get a different format.
Can you post a snippet of the JSON?