Skip to content

Instantly share code, notes, and snippets.

@harryscholes
Created June 12, 2017 13:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harryscholes/d9f6c6b1a86fe8b2a98ee23e16d8201e to your computer and use it in GitHub Desktop.
Save harryscholes/d9f6c6b1a86fe8b2a98ee23e16d8201e to your computer and use it in GitHub Desktop.
Download all KEGG pathways and modules for an organism
organism=spo
# Download S. pombe KEGG pathways
wget -O kegg_pathways.tsv http://rest.kegg.jp/list/pathway/${organism}
ids=$(cut -f1 kegg_pathways.tsv)
for id in $ids; do
wget -O ${id}.json http://togows.dbcls.jp/entry/pathway/${id}/genes.json
done
# Download S.pombe KEGG modules
wget -O kegg_modules.tsv http://rest.kegg.jp/list/module/${organism}
ids=$(cut -f1 kegg_modules.tsv)
for id in $ids; do
wget -O ${id}.json http://togows.dbcls.jp/entry/pathway/${id}/genes.json
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment