python DeepBlue教程:列出数据

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python DeepBlue教程:列出数据相关的知识,希望对你有一定的参考价值。

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)


以上是关于python DeepBlue教程:列出数据的主要内容,如果未能解决你的问题,请参考以下文章

python DeepBlue教程 - BioSources

python 用于BLUEPRINT年会的DEEPBLUE海报的案例2。 (09.2015)。通过a在您自己的数据集中聚合DNA甲基化信号

python 提取DeepBlue注释 - 对备份很有用

python 从DeepBlue访问和下载实验

python 连接到DeepBlue服务器

python 从DeepBlue中删除所有ENCODE实验的代码