UNPKG

2.9 kBapplication/x-shView Raw
1# rebuild and run like this:
2npm run compile:es5 && bin/gpml2pvjson --id http://identifiers.org/wikipathways/WP554 < ./test/input/WP554_77712.gpml
3
4# currently need to run commands like this:
5../wikipathways-api-client-js/bin/wikipathways-api-client get-pathway WP4 | bin/gpml2pvjson --id http://identifiers.org/wikipathways/WP4
6
7for f in playground/wikipathways-20170510-gpml-Homo_sapiens/*.gpml; do cat "$f" | bin/gpml2pvjson --id "http://identifiers.org/wikipathways/"`echo "$f" | sed 's/.*_WP/WP/' | sed 's/_.*.gpml//'`; done
8
9for f in playground/wikipathways-20170510-gpml-Homo_sapiens/*.gpml; do WPID=`echo "$f" | sed 's/.*_WP/WP/' | sed 's/_.*.gpml//'`; cat "$f" | bin/gpml2pvjson --id "http://identifiers.org/wikipathways/"$WPID > ./playground/pvjson/$WPID.json; done
10
11for f in playground/wikipathways-20170510-gpml-Homo_sapiens/*.gpml; do echo && echo "$f" && WPID=`echo "$f" | sed 's/.*_WP/WP/' | sed 's/_.*.gpml//'`; cat "$f" | bin/gpml2pvjson --id "http://identifiers.org/wikipathways/"$WPID; done
12
13for f in ../pvjs/test/input-data/troublesome-pathways/*.gpml; do echo && echo "$f" && WPID=`echo "$f" | sed 's/.*_WP/WP/' | sed 's/_.*.gpml//'`; cat "$f" | bin/gpml2pvjson --id "http://identifiers.org/wikipathways/"$WPID; done
14
15for f in ../pvjs/test/input-data/**/*.gpml; do echo "Processing $f" && WPID=`echo "$f" | sed 's/.*_WP/WP/' | sed 's/_.*.gpml//'`; cat "$f" | bin/gpml2pvjson --id "http://identifiers.org/wikipathways/"$WPID | jq . > /dev/null; done
16
17for f in ../pvjs/test/input-data/**/*.gpml{,.xml}; do echo "Processing $f" && WPID=`echo "$f" | sed 's/.*_WP/WP/' | sed 's/_.*.gpml//'`; cat "$f" | bin/gpml2pvjson --id "http://identifiers.org/wikipathways/"$WPID | jq . > /dev/null; done
18
19for f in ./test/input/**/*.gpml{,.xml}; do echo "Processing $f" && WPID=`echo "$f" | sed 's/.*_WP/WP/' | sed 's/_.*.gpml//'`; cat "$f" | bin/gpml2pvjson --id "http://identifiers.org/wikipathways/"$WPID | jq . > /dev/null; done
20
21curl --limit-rate 10K "http://webservice.wikipathways.org/getPathwayAs?fileType=xml&pwId=WP554&revision=77712&format=xml" | xpath "*/ns1:data/text()" | base64 --decode | bin/gpml2pvjson --id http://identifiers.org/wikipathways/WP554
22
23## The following examples might not be working quite right:
24../wikipathways-api-client-js/bin/wikipathways-api-client list | while read i; do echo "$i"; sleep 0.01; done | jq '.identifier' | ../wikipathways-api-client-js/bin/wikipathways-api-client get-pathway | bin/gpml2pvjson
25
26../wikipathways-api-client-js/bin/wikipathways-api-client list | head | while read i; do echo "$i"; sleep 0.01; done | jq '.identifier' | ../wikipathways-api-client-js/bin/wikipathways-api-client get-pathway | bin/gpml2pvjson
27
28../wikipathways-api-client-js/bin/wikipathways-api-client list | while read i; do echo "$i"; sleep 0.01; done | head | jq '.identifier' | ../wikipathways-api-client-js/bin/wikipathways-api-client get-pathway | bin/gpml2pvjson