Skip to content

Instantly share code, notes, and snippets.

@chapmanb
Created February 11, 2010 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chapmanb/301355 to your computer and use it in GitHub Desktop.
Save chapmanb/301355 to your computer and use it in GitHub Desktop.
from systemsbio import Biogateway, UniProtGOQueryBuilder
builder = UniProtGOQueryBuilder("Homo sapiens")
builder.add_filter("GO_term", "insulin")
builder.add_filter("disease_description", "diabetes")
builder.add_attributes(["protein_name", "interactor", "gene_name"])
server = Biogateway()
results = server.search(builder)
print len(results), results.dtype.names
result = results[0]
print result['protein_name'], result['gene_name'], \
result['interactor'], result['GO_term']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment