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 | |
import time | |
import os | |
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc" | |
user_key = "anonymous_key" | |
server = xmlrpclib.Server(url, allow_none=True) | |
# obtain genes regions |
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 | |
import time | |
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc" | |
user_key = "anonymous_key" | |
server = xmlrpclib.Server(url, allow_none=True) | |
gene_names = ["RNU6-1100P", "CICP7", "MRPL20", "ANKRD65", "HES2", "ACOT7", "HES3", "ICMT"] |
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
# Summarizing methylation level by CpG Island of the monocyte cells | |
import xmlrpclib | |
import time | |
# Before going further, we must set up the client: | |
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc" | |
server = xmlrpclib.Server(url, allow_none=True) | |
# You can use the anonymous key or your own user key |
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
# The most important DeepBlue entity is the experiment. | |
# The experiments contains the Epigenetic Data with their data description, that we name as metadata. | |
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 |
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
# Samples | |
# DeepBlue organizes the Biological Names into BioSources and Samples. | |
# While the BioSources are the biological entities, the Samples are the instances of these entities. | |
# For example, the BioSource blood. It refer to any blood, but a blood from a specific donor, time, or caractistic will have be a specific sample. | |
# All Samples refer to a BioSource and a set o attributes, that we name metadata. | |
import xmlrpclib | |
# Before going further, we must set up the client: | |
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc" |
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
#DeepBlue organizes the Biological Names into BioSources and Samples. | |
#BioSources are biological entities, e.g. Cell Lins, Cell Types, Tissues, and Organs. | |
#They are imported from three ontologies: Cell Type, Experimental Factor Ontology, and Uber Anatomy Ontology. | |
#They are organized hierarchicaly and the BioSource terms may contain synonyms. | |
import xmlrpclib | |
# Before going further, we must set up the client: | |
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc" |
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" | |
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 | |
import time | |
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc" | |
user_key = "anonymous_key" | |
server = xmlrpclib.Server(url, allow_none=True) | |
(status, exps) = server.select_regions("", "GRCh38", "H3k27ac", "", "", | |
"BLUEPRINT Epigenome", "chr1", None, |
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 | |
import time | |
import os.path | |
user_key = 'anonymous_key' | |
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc" | |
server = xmlrpclib.Server(url, encoding='UTF-8', allow_none=True) | |
print server.echo(user_key) | |
## List the H1-hESC samples from ENCODE |
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
# Build an matrix where the columns are the epigenetic marks and the lines are the samples. It puts the experiment ID where the there is an experiment or "-" otherwise. | |
# It may take some minutes because it has to load all the data. | |
# It does create a "cache" directory where it stores the experiments info. | |
import xmlrpclib | |
import time | |
from collections import defaultdict | |
import pickle | |
import os.path |