MaayanLab / enrichr_issues

5 stars 3 forks source link

Gene search via the API, how to get structured output #6

Closed AlfredoKCL closed 3 years ago

AlfredoKCL commented 3 years ago

@maxim-k Thank you very much for the answer to my previous issue. I am posting my new question here as I realised that my other issue was closed. Anyway, I have another question about this. I am not that familiar with the json format so I would like to have the output in plaintext, but if I set json=false, I lose the category information. Is it possible to get the output in plaintext but still grouped by category (e.g. Transcription, pathways, etc) and by source (e.g. for Transcription, ChEA 2016, ENCODE and ChEA Consensus TFs from ChIP-X, ARCHS4 TFs Coexp, etc)?

Alternatively, I imagine I could recreate the menu with the categories from the json output, however, not being able to do it myself, is there a script to do it?

Thank you very much in advance

Alfredo

maxim-k commented 3 years ago

@AlfredoKCL to print a json file in a human-readable way, you can use any of approaches from this StackOverflow discussion. The simplest one is python3 -m json.tool genemap.json