Created
February 11, 2013 09:04
-
-
Save cory-ko/4753373 to your computer and use it in GitHub Desktop.
Sample script to access G-Links (http://link.g-language.org/) via Python.
This file contains 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
#!/usr/bin/env python | |
import urllib | |
reqdata= {} | |
reqdata['query']= 'hsa:128,RECA_ECOLI' # hsa:128 (KEGG) and RECA_ECOLI (UniProt) | |
reqdata['format']= 'n3' # Notation3 format | |
params= urllib.urlencode(reqdata) | |
fh= urllib.urlopen('http://link.g-language.org/', params) | |
print fh.read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment