Intermine-Python: Tutorial 13: Query Manager

This tutorial will tell you about the Query Manager and how to it can be used to make better use of queries. We hope at this stage you have the 'intermine' package installed

We start by importing the module from InterMine package.

In [1]:
from intermine import query_manager as qm

The next step will be to access the account whose query options we want to manage

In [2]:

There are now four functions that we can utilise:

In [3]:
qm.post_query('<query name="test" model="genomic" view="Gene.length\
            Gene.symbol" longDescription="" sortOrder="Gene.length asc">\
'test is posted'

'''posts a query with name and other information as above'''

In [4]:
'Organism_Sequence, test'

'''returns the names of all the saved queries in user account'''

In [5]:
'<saved-queries><query name="test" model="genomic" view="Gene.length Gene.symbol" longDescription="" sortOrder="Gene.length asc"></query></saved-queries>'

'''returns information about the query whose name is 'test'''

In [6]:
'test is deleted'

'''deletes the query whose name is 'test' from user's account'''

Now that we have made dealing with queries easier, the next tutorial will have details of how we can visualise the data using Python client.