Skip to content

Instantly share code, notes, and snippets.

View felipealbrecht's full-sized avatar
🎯
Focusing

Felipe Albrecht felipealbrecht

🎯
Focusing
View GitHub Profile
@felipealbrecht
felipealbrecht / 02-poster-03-mrna-t-regulatory-cells.py
Last active July 22, 2017 01:51
Calculating the mRNA expression level for your favorite genes across all regulatory T cells and subsequent filtering regarding those genes regions where the value of the column named “score” is higher than a given threshold
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
@felipealbrecht
felipealbrecht / 01-14-flank.py
Last active July 22, 2017 03:43
Obtaining flanking regions based on already existing regions
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"]
@felipealbrecht
felipealbrecht / 01-06-summarizing.py
Last active June 22, 2022 03:52
Summarizing methylation level by CpG Island of the monocyte cells
# 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
@felipealbrecht
felipealbrecht / 01-05-experiments.py
Last active January 7, 2016 19:44
Accessing and downloading experiments from DeepBlue
# 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
@felipealbrecht
felipealbrecht / 01-04-samples.py
Last active October 20, 2015 20:55
Listing the Samples registered into DeepBlue
# 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"
@felipealbrecht
felipealbrecht / 01-03-biosources.py
Created October 20, 2015 20:48
DeepBlue Tutorial - BioSources
#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"
@felipealbrecht
felipealbrecht / 01-02-data-listing.py
Last active August 8, 2016 13:52
DeepBlue Tutorial: listing data
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"
@felipealbrecht
felipealbrecht / 02-poster-02-overlap-tf-to-promoters-to-h3k27ac.py
Last active November 10, 2016 12:52
Identification of H3k27ac peaks that overlap with promoters in all BLUEPRINT datasets and subsequent identification of transcription factor peaks that overlap with these promoters, on all ENCODE datasets
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,
@felipealbrecht
felipealbrecht / 02-poster-01-aggr-methylation-data-signal-by-hesc-h3k4me3.py
Last active July 22, 2017 01:43
Summarizing DNA methylation levels in liver tissue across H3K4me3 peaks regions derived from human liver cells
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
@felipealbrecht
felipealbrecht / 03-01-experiments-matrix.py
Last active October 14, 2015 10:18
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.
# 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