Last active
July 22, 2017 02:05
-
-
Save felipealbrecht/620d77ed574fb2a90390 to your computer and use it in GitHub Desktop.
Using full text search for searching for experiments
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
import xmlrpclib | |
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc" | |
user_key = "anonymous_key" | |
server = xmlrpclib.Server(url, allow_none=True) | |
# We are selecting the experiments with terms 'H3k27AC', 'blood', and 'peak' in the metadata. | |
(status, experiments_found) = server.search("'H3k27AC' 'blood' 'peak'", "experiments", user_key) | |
for experiment in experiments_found: | |
experiment_id = experiment[0] | |
(status, info) = server.info(experiment_id, user_key) | |
print info[0]["name"], info[0]["description"], info[0]["sample_info"]["biosource_name"], info[0]["sample_id"], info[0]["epigenetic_mark"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment