DeepBlue API - use cases

They are ready to use - Copy and paste into your favorite python environment. (Python version 2.6 or higher is required.)

Use case 1:
Identification of H3k27ac peaks that overlap with promoters in all BLUEPRINT datasets and subsequent identification of transcription factor peaks that overlap with these promoters in all ENCODE datasets


We select the promoters regions and the H3K27ac peaks from BLUEPRINT.

We filter the H3K27ac regions that overlap with some promoter region.

We select the signal of the Transcription Factors SP1.

We filter the TFs regions that overlap with some filtered H3K27ac peaks.

Finally, we request the regions and download them.

Source code (Copy it into your python interpreter)





We import the necessary libraries and assign to the variable server to a XML-RPC object for accessing the DeepBlue server. (lines 1 - 7)




We select all the H3k27ac from the BLUEPRINT project. (lines 9-12)




We select the regions of the annotation promoter from the genome GRCh38. (lines 15-16)


We filter the H3K27ac regions that overlap with a promoter region. (line 18)


We select the Transcription Factors (TF) AG01, AG02, and AG03 from the ENCODE project. (lines 20-21)


We filter the TFs regions that overlap with the previously filtered H3K27ac region. (line 24)

We request the regions. Each line will contain a region with its chromosome, start, end, experiment name, epigenetic mark, and biosource. (line 24)




We wait for the processing. (lines 31-35)




We download and print the regions that contains the TFs that overlap with the H3K27ac and the promoters regions. (lines 37-38)

Use case 2:
Summarizing DNA methylation levels in liver tissue across H3K4me3 peaks regions derived from human embryonic stem cells


We first list all experiments that have a sample with the biosource H1-hESC. After, we select the peaks experiments from this list. These experiment regions will be the boundaries of the aggregation.

Here, we list all experiments with liver or hepatocypes biosources.

For each listed liver or hepatocytes experiment, we select the associated regions of this experiment.

We perform an aggregation with the selected regions using the H1-hESC H3K27ac peaks as boundaries.

Finally, we request the regions and download them.

Source code (Copy it into your python interpreter)




We import the necessary libraries and assign the variable server to a XML-RPC object for accessing the DeepBlue server. (lines 1 - 7)

We test the connection to the server. The expected output is ['okay', 'DeepBlue (1.6.5) says hi to anonymous']. (line 8)



We list and extract all samples IDs with the biosource H1-hESC from the ENCODE project. (lines 10-13)




We list all peaks experiments that contains the previously selected samples IDS, the histone modification H3K4me3 from the ENCODE project.(line 16)



We extract the IDs from the listed experiments, obtain information about the experiment using the ID, and generate a list of experiments that the original file name ends with "bed.gz". (lines 21-24)

As we are interested in only one experiment file, we do a check if found only one experiment. (lines 25-26)




We select the regions of the selected h1-hESC H3K4me3 experiment. (line 30)






Then, we list and extract the names of the DNA Methylation experiments that contain liver or hepatocyte biosource. (lines 35-40)












We iterate over each selected DNA Methylation experiment, selecting its regions. (lines 47-52)






We aggregate the selected regions using the H1-hESC regions. We perform the aggregation on the column 'SCORE'. (lines 55-56)



We filter and remove the aggregated regions that did not aggregate any region. (lines 59-60)



Finally, we request the regions with the desired columns. We store the experiment name with the associated request ID, and also the request ID in a list of IDs. (line 63-67)







We create an directory to store the data downloaded from DeepBlue. (lines 72-73)


The data is retrieved later. Were each request status is verified. If the request is done, its data is downloaded, stored in a file, and the request is removed from the list. It is repeated until all requests are processed. (lines 77-90)

Use case 3:
Calculating the mRNA expression level for your favorite genes across Regulatory T cells and related, and subsequent filtering regarding those genes regions where the value of the column named “score” is higher than a given threshold


We first select the regions of some genes ('CCR1', 'CD164', 'CD1D', 'CD2', 'CD34', 'CD3G', 'CD44') and filter those regions that are protein coding.

We list all signal experiments related to Regulatory T cell biosources.

For each listed experiment, we select the associated regions of this experiment.

We perform an aggregation with the selected regions using the genes regions as boundaries.

Finally, we request the regions and download them.

Source code (Copy it into your python interpreter)




We import the necessary libraries and assign the variable server to a XML-RPC object for accessing the DeepBlue server. (lines 1 - 6)









We select the regions of some selected genes and after we filter those regions that are protein coding. (lines 14-18)







We build a list of all biosources names that are related with Regulatory T cell. (lines 21-25)






We list the mRNA signal experiments of the biosources previously listed. (lines 28-32)











We iterate over each selected mRNA experiment, selecting its regions. (lines 39-41)


We aggregate the selected regions using the protein encoding genes regions. We perform the aggregation on the column 'VALUE'. (line 43)


We filter and remove the aggregated regions that resulting mean is zero. (lines 45-46)





Finally, we request the regions with the desired columns. We store the experiment name with the associated request ID, and also the request ID in a list of IDs. (line 50-55)









We create an directory to store the data downloaded from DeepBlue. (lines 62-63)


The data is retrieved later. Where each request status is verified. If the request is done, its data is downloaded, stored in a file, and the request is removed from the list. It is repeated until all requests are processed. (lines 66-81)