Skip to content

Instantly share code, notes, and snippets.

@SJShaw
Last active April 19, 2024 14:10
Show Gist options
  • Save SJShaw/ec9114a3ff0a65182940cd2874a440c0 to your computer and use it in GitHub Desktop.
Save SJShaw/ec9114a3ff0a65182940cd2874a440c0 to your computer and use it in GitHub Desktop.
Build simple regions TSV from antiSMASH JSON
#!/bin/bash
#
# Requires JQ, on debian/ubuntu derivatives, this can be installed with "apt install jq"
#
# Either provide an antiSMASH JSON results file as the argument or pipe it in
jq -r '.records[].areas[] | [.start, .end, (.products | join(","))] | flatten | @tsv' "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment