Last active
June 9, 2021 12:44
-
-
Save eweitz/920daff2bd79e59457b088916e3c2521 to your computer and use it in GitHub Desktop.
Pathway count by organism in WikiPathways
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
# Get number of pathways by organism in WikiPathways | |
# Graph of output: | |
# https://docs.google.com/spreadsheets/d/1zZSqeKufuYxfFd3pFeMAUOjCm1sLRAw5SgJ4OJel9M8/edit?usp=sharing | |
# Fetch all organisms in WikiPathways | |
curl -s https://webservice.wikipathways.org/listOrganisms?format=json | jq .organisms[] > organisms-wikipathways.json | |
# Fetch all pathways in WikiPathways | |
curl -s https://webservice.wikipathways.org/listPathways?format=json | jq . > all-wikipathways.json | |
# Print all organisms in WikiPathways | |
cat organisms-wikipathways.json | |
# Count pathways by organism | |
cat organisms-wikipathways.json | xargs -I{} grep -c {} all-wikipathways.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment