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 / deepblue_example_01.py
Last active December 6, 2016 10:28
Aggregate the methylation data signal of the liver data experiments by the H-ESC H3K4me3 peaks
## Aggregate the methylation data signal of the liver data experiments by the H-ESC H3K4me3 peaks
## Felipe Albrecht -
import xmlrpclib
import time
user_key = 'USER_KEY'
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc"
server = xmlrpclib.Server(url, encoding='UTF-8', allow_none=True)
@felipealbrecht
felipealbrecht / remove_encode_exp.py
Created September 2, 2015 12:16
Code that remove all ENCODE experiments from DeepBlue
import xmlrpclib
from Queue import Queue
from threading import Thread
uk = "USER_KEY"
q = Queue()
def worker():
__server = xmlrpclib.Server("http://deepblue.mpi-inf.mpg.de/xmlrpc", allow_none=True)
@felipealbrecht
felipealbrecht / 01-01-connect_to_the_server.py
Last active September 15, 2022 13:23
Connecting to DeepBlue server
import xmlrpclib
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc"
user_key = "anonymous_key"
server = xmlrpclib.Server(url, allow_none=True)
server.echo(user_key)
@felipealbrecht
felipealbrecht / 01-02-experiment-extra-metadata-info.py
Created September 22, 2015 09:01
Obtaining the extra metadata information from one experiment
import xmlrpclib
from pprint import pprint
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc"
user_key = "anonymous_key"
server = xmlrpclib.Server(url, allow_none=True)
# Lets get the information about the experiment e30000
@felipealbrecht
felipealbrecht / deepblue-searching-experiments.py
Last active July 22, 2017 02:05
Using full text search for searching for experiments
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)
@felipealbrecht
felipealbrecht / 01-04-select-experiments.py
Last active April 12, 2016 15:02
Selecting data from one experiment
import xmlrpclib
import time
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc"
user_key = "anonymous_key"
server = xmlrpclib.Server(url, allow_none=True)
# Selecting the data from 2 experiments: BL-2_c01.ERX297416.H3K27ac.bwa.GRCh38.20150527.bed and S008SGH1.ERX406923.H3K27ac.bwa.GRCh38.20150728.bed
# As we already know the experiments names, we keep all others fields empty.
@felipealbrecht
felipealbrecht / deepblue-poster-02.py
Last active September 25, 2015 16:54
Use case 2 from the DEEPBLUE Poster for the BLUEPRINT annual meeting. (09.2015). Find H3k27ac peaks that overlap promoters in all BLUEPRINT. Then, find the transcription factors peaks that overlap with these enhancers, using ENCODE datasets.
# Aggregate DNA methylation signal in your own datasets by all available H3K4me3 peaks in hESCs.
import xmlrpclib
import time
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc"
user_key = "anonymous_key"
server = xmlrpclib.Server(url, allow_none=True)
@felipealbrecht
felipealbrecht / deepblue-poster-01.py
Created September 25, 2015 16:51
Use case 2 from the DEEPBLUE Poster for the BLUEPRINT annual meeting. (09.2015). Aggregate DNA methylation signal in your own datasets by all available H3K4me3 peaks in hESCs.
# Aggregate DNA methylation signal in your own datasets by all available H3K4me3 peaks in hESCs.
import xmlrpclib
import time
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc"
user_key = "anonymous_key"
server = xmlrpclib.Server(url, allow_none=True)
@felipealbrecht
felipealbrecht / 0_reuse_code.js
Created September 29, 2015 09:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@felipealbrecht
felipealbrecht / 01-05-select-experiments.py
Last active December 17, 2015 14:38
Output with desired columns the data from two experiments
import xmlrpclib
import time
url = "http://deepblue.mpi-inf.mpg.de/xmlrpc"
user_key = "anonymous_key"
server = xmlrpclib.Server(url, allow_none=True)
# Selecting the data from 2 experiments: BL-2_c01.ERX297416.H3K27ac.bwa.GRCh38.20150527.bed and S008SGH1.ERX406923.H3K27ac.bwa.GRCh38.20150728.bed
# As we already know the experiments names, we keep all others fields empty.