python 列出注册到DeepBlue中的Samples

Posted

tags:

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

# 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"
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"

# The command list_samples is used to list all Samples from a given BioSource:
server.list_samples("blood", {}, user_key)
# Output:
# ['okay',
# [['s3',
#   {'_id': 's3',
#    'biosource_name': 'blood',
#    'description': 'leukemia (UCDavis alternate), "The continuous cell line K-562 was established by Lozzio and Lozzio from the pleural effusion of a 53-year-old female with chronic myelogenous leukemia in terminal blast crises." - ATCC',
#    'karyotype': 'cancer',
#    'lineage': 'mesoderm',
#    'organism': 'human',
#    'sex': 'F',
#    'source': 'ENCODE',
#    'term': 'K562b',
#    'tier': '1',
#    'tissue': 'leukemia (UCDavis alternate), "The continuous cell line K-562 was established by Lozzio and Lozzio from the pleural effusion of a 53-year-old female with chronic myelogenous leukemia in terminal blast crises." - ATCC',
#    'user': 'Populator'}],



# The samples are automatically load from the Epigenetics Projects (BLUEPRINT, ENCODE, Roadmap) 
# and we are always trying to perform the best match between the mapped BioSource and the Biological Entitiy of the Experiment.

# It is important to remid that the metadata key names are not uniformized, so depending the Project or Sample, 
# there can have different names with the same semantic. It is possible to list only the Knowing the Samples Metadata fields,

以上是关于python 列出注册到DeepBlue中的Samples的主要内容,如果未能解决你的问题,请参考以下文章

python 用于BLUEPRINT年会的DEEPBLUE海报的案例2。 (09.2015)。找到与所有BLUEPRINT中的启动子重叠的H3k27ac峰

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

python 从DeepBlue访问和下载实验

python DeepBlue教程 - BioSources

python 连接到DeepBlue服务器

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