Created
October 17, 2017 09:52
-
-
Save joshkh/6974179420a9fffef973e3834c1dbd6c to your computer and use it in GitHub Desktop.
InterMine Python Tutorial 1
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
from intermine.webservice import Service | |
service = Service("www.flymine.org/query/service") | |
query=service.new_query() | |
query.select("Gene.symbol","Gene.primaryIdentifier", "Gene.length") | |
for row in query.rows(start=0,size=10): | |
print(row) | |
query=service.new_query("Gene") | |
query.select("symbol","primaryIdentifier","length") | |
for row in query.rows(start=0,size=10): | |
print(row) | |
query2=service.new_query() | |
query2.select("Organism.name") | |
query2.add_view("Organism.taxonId") | |
for row in query2.rows(start=0,size=10): | |
print(row) | |
query2.add_sort_order("Organism.taxonId") | |
for row in query2.rows(start=0,size=10): | |
print(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment