Last active
August 8, 2016 13:52
-
-
Save felipealbrecht/64655b560fac6a1f9674 to your computer and use it in GitHub Desktop.
DeepBlue Tutorial: listing data
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 | |
# Before going further, we must set up the client: | |
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc" | |
server = xmlrpclib.Server(url, encoding='UTF-8', allow_none=True) | |
# You can use the anonymous key or your own user key | |
user_key = "anonymous_key" | |
# Listing all projects | |
server.list_projects(user_key) | |
# The result will be similar to ['okay', [['p1', 'ENCODE'], ['p2', 'BLUEPRINT Epigenome'], ['p5', 'Roadmap Epigenomics']]] | |
# Listing all registered epigenetic marks | |
server.list_epigenetic_marks(None, user_key) | |
# Part of the output will be ['okay', [['em1', 'DNA Methylation'], ['em10', 'Input'], ['em100', 'H3K9/14ac'], ['em101', 'H4K12ac'], ... | |
# We can list all experiments that are peaks (bed files), have H3k27ac as epigenetic mark and belongs to ENCODE or BLUEPRINT projects | |
(status, peaks_experiments) = server.list_experiments("", "peaks", "H3K27ac", "", "", "", ["ENCODE", "Blueprint Epigenome"], user_key) | |
# We expect more than 400 peaks experiments! | |
len(peaks_experiments) | |
# We can also list all experiments that are signal (wiggle and bedgraph files), have H3k27ac as epigenetic mark and belongs to ENCODE or BLUEPRINT projects | |
(status, signal_experiments) = server.list_experiments("", "signal", "H3K27ac", "", "", "", ["ENCODE", "Blueprint Epigenome"], user_key) | |
# We expect more than 300 peaks experiments! | |
len(signal_experiments) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment