python 总结CpG群岛的一个实验区域

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 总结CpG群岛的一个实验区域相关的知识,希望对你有一定的参考价值。

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: GC_T14_10.CPG_methylation_calls.bs_call.GRCh38.20150707.wig
# As we already know the experiments names, we keep all others fields empty.
# We are selecting the are in the chromosome 1, position 0 to 50.000.000.
(status, query_id) = server.select_experiments (["GC_T14_10.CPG_methylation_calls.bs_call.GRCh38.20160531.wig"], "chr1", 0, 50000000, user_key )

# Select the CpG Islands annotation from GRCh38
(status, cpg_islands) = server.select_annotations("CpG Islands", "GRCh38", "chr1", 0, 50000000, user_key)

# Aggregate
(status, overlapped) = server.aggregate (query_id, cpg_islands, "VALUE", user_key )

# Retrieve the experiments data (The @NAME meta-column is used to include the experiment name and @BIOSOURCE for experiment's biosource
(status, request_id) = server.get_regions(overlapped, "CHROMOSOME,START,END,@AGG.MIN,@AGG.MAX,@AGG.MEDIAN,@AGG.MEAN,@AGG.VAR,@AGG.SD,@AGG.COUNT", user_key)

# Wait for the server processing
(status, info) = server.info(request_id, user_key)
request_status = info[0]["state"]
while request_status != "done" and request_status != "failed":
  time.sleep(1)
  (status, info) = server.info(request_id, user_key)
  request_status = info[0]["state"]

(status, regions) = server.get_request_data(request_id, user_key)

print regions

以上是关于python 总结CpG群岛的一个实验区域的主要内容,如果未能解决你的问题,请参考以下文章

python 通过单核细胞的CpG岛总结甲基化水平

python 通过平铺区域来总结一个实验的区域

易基因:全基因组CpG密度和DNA甲基化分析方法比较(MeDIPRRBS和WGBS)| 研究综述

基于中枢模式发生器控制的电刺激步行康复系统设计与实验

DNA甲基化及其测量方法(转)

python 找到与启动子重叠的两个实验中的区域