癌症中克隆种群结构统计推断分析软件PyClone安装小记
由于微信不允许外部链接,你需要点击文章尾部左下角的 "阅读原文",才能访问文中链接。
PyClone 是一种用于推断癌症中克隆种群结构的统计模型。 它是一种贝叶斯聚类方法,用于将深度测序的体细胞突变集分组到假定的克隆簇中,同时估计其细胞流行率(prevalences)并解释由于分段拷贝数变化(segmental copy-number changes)和正常细胞污染(normal-cell contamination)引起的等位基因失衡。 单细胞测序验证证明了 PyClone 的准确性。
The input data for PyClone consists of a set read counts from a deep sequencing experiment, the copy number of the genomic region containing the mutation and an estimate of tumour content.
简易安装
官方推荐使用 MiniConda 来安装 PyClone。为了保证环境的稳定,可为 PyClone 单独建立一个环境,因为 PyClone 基于 Python2.7。在这里,我们使用 Anaconda3(conda 4.5.11) 来安装 PyClone。
# 创建基于 Python2.7 名字为 pyclone 独立环境
conda create --name pyclone python=2
# 激活 pyclone 环境
source activate pyclone
# 退出 pyclone 环境
source deactivate
# 安装 PyClone
conda install pyclone -c aroth85
Anaconda3 中安装完 PyClone,激活环境后,执行 PyClone -h 出现 RuntimeWarning。同样的,我们在 pyclone 的环境中导入 pandas 模板,出现一样的 RuntimeWarning:
(pyclone) shenweiyan@ecs-steven 13:38:25 /home/shenweiyan
$ PyClone -h
/usr/local/software/anaconda3/envs/pyclone/lib/python2.7/site-packages/pandas/_libs/__init__.py:4: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
/usr/local/software/anaconda3/envs/pyclone/lib/python2.7/site-packages/pandas/__init__.py:26: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
......
from pandas._libs import algos, lib, writers as libwriters
/usr/local/software/anaconda3/envs/pyclone/lib/python2.7/site-packages/statsmodels/nonparametric/kde.py:22: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .linbin import fast_linbin
/usr/local/software/anaconda3/envs/pyclone/lib/python2.7/site-packages/statsmodels/nonparametric/smoothers_lowess.py:11: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._smoothers_lowess import lowess as _lowess
usage: PyClone [-h] [--version]
{setup_analysis,run_analysis,run_analysis_pipeline,build_mutations_file,plot_clusters,plot_loci,build_table}
...
positional arguments:
{setup_analysis,run_analysis,run_analysis_pipeline,build_mutations_file,plot_clusters,plot_loci,build_table}
setup_analysis Setup a config file and mutations files for a PyClone
analysis.
run_analysis Run an MCMC sampler to sample from the posterior of
the PyClone model.
run_analysis_pipeline
Run a full PyClone analysis.
build_mutations_file
Build a YAML format file with mutation data and states
prior to be used for PyClone analysis.
plot_clusters Plot features of the clusters.
plot_loci Plot features of the loci.
build_table Build results table which contains cluster ids and
(mean) cellular prevalence estimates.
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
(pyclone) shenweiyan@ecs-steven 14:47:17 /home/shenweiyan
$ python
Python 2.7.15 | packaged by conda-forge | (default, Oct 12 2018, 14:10:50)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> >>> import pandas
/usr/local/software/anaconda3/envs/pyclone/lib/python2.7/site-packages/pandas/_libs/__init__.py:4: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
/usr/local/software/anaconda3/envs/pyclone/lib/python2.7/site-packages/pandas/__init__.py:26: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from pandas._libs import (hashtable as _hashtable,
......
/usr/local/software/anaconda3/envs/pyclone/lib/python2.7/site-packages/pandas/io/pytables.py:50: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from pandas._libs import algos, lib, writers as libwriters
>>> pandas.__version__
u'0.23.4'
原因与解决:(参考 anaconda-issues:#6678、numpy issues:#11628)
The pandas were build agains different version of numpy. we need to rebuild pandas agains the local numpy.
# 方法一(耗时长)
pip install --no-binary pandas -I pandas
# 方法二
conda install numpy==1.14.5 --yes
手动安装
要手动安装 PyClone,请确保安装了必要的库(如下所列)。 之后就可以像任何其他 Python 包一样通过 python setup.py install 安装 PyClone。
PyClone 必须满足依赖包如下:
PyDP >= 0.2.3
PyYAML >= 3.10
matplotlib >= 1.2.0 - Required for plotting.
numpy >= 1.6.2 - Required for plotting and clustering.
pandas >= 0.11 - Required for multi sample plotting.
scipy >= 0.11 - Required for plotting and clustering.
seaborn >= 0.6.0
手动安装 PyClone:
$ git clone https://github.com/aroth85/pyclone.git
$ cd pyclone
$ python setup.py install
running install
running bdist_egg
running egg_info
creating PyClone.egg-info
writing PyClone.egg-info/PKG-INFO
......
Installed /usr/local/software/python2.7/pyclone/lib/python2.7/site-packages/PyClone-0.13.1-py2.7.egg
Processing dependencies for PyClone==0.13.1
Finished processing dependencies for PyClone==0.13.1
到这里,PyClone 就安装完成了,关于该软件具体的使用说明,请参考 PyClone -h 或者 PyClone wiki: Usage。

参考资料:
numpy issues,#11628
anaconda-issues,#6678
aroth85/pyclone,GitHub
YTer,Pyclone 说明,Hexo 个人博客
用户1680321,安装使用pyclone进行克隆演化推断,yw的数据分析
·end·
—如果喜欢,快分享给你的朋友们吧—
我们一起愉快的玩耍吧
本文分享自微信公众号 - 生信科技爱好者(bioitee)。
如有侵权,请联系 support@oschina.cn 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一起分享。
癌症中克隆种群结构统计推断分析软件PyClone安装小记的更多相关文章
- 易基因:PIWI/piRNA在人癌症中的表观遗传调控机制(DNA甲基化+m6A+组蛋白修饰)|综述
大家好,这里是专注表观组学十余年,领跑多组学科研服务的易基因. 2023年03月07日,南华大学衡阳医学院李二毛团队在<Molecular Cancer>杂志发表了题为"The ...
- 浅谈android中的目录结构
之前在android游戏开发中就遇到本地数据存储的问题:一般情形之下就将动态数据写入SD中存储,在没有SD卡的手机上就需另作处理了;再有在开发android应用的过程中,总要去调试APP,安装时又想去 ...
- JavaScript中的分支结构
说到JavaScript中的分支结构,我们就不得不提到流程控制这个词,我们所有的程序都是由数据和算法组成的.程序=数据+算法通常我们所说的算法都可以通过"顺序","分支& ...
- Twitter Storm源代码分析之ZooKeeper中的目录结构
徐明明博客:Twitter Storm源代码分析之ZooKeeper中的目录结构 我们知道Twitter Storm的所有的状态信息都是保存在Zookeeper里面,nimbus通过在zookeepe ...
- IntelliJ和tomcat中的目录结构
IntelliJ和tomcat中的目录结构 IntelliJ的官网帮助中心:http://www.jetbrains.com/idea/webhelp/getting-help.html pr ...
- 通过jdbc获取数据库中的表结构
通过jdbc获取数据库中的表结构 主键 各个表字段类型及应用生成实体类 1.JDBC中通过MetaData来获取具体的表的相关信息.可以查询数据库中的有哪些表,表有哪些字段,字段的属性等等.Met ...
- [pjsip]Pjlib中的链表结构
Pjlib的链表结构跟常见的链表结构有所区别,如下图所示: 图1:一般链表结构 图2:pjlib中的链表结构 可以看到一般的双向链表是链表节点包含数据域,而pjlib中是数据域包含链表节点.一般的链表 ...
- (续)一个demo弄清楚位图在内存中的存储结构
本来续---数字图像处理之位图在计算机中的存储结构一文,通过参考别人的代码,进行修改和测试终于成功运行. 该实例未使用任何API和相关类,相信如果对此实例能够完全理解那么将有进一步进行数字图像处理的能 ...
- VSTO学习笔记(八)向 Word 2010 中写入表结构
原文:VSTO学习笔记(八)向 Word 2010 中写入表结构 前几天公司在做CMMI 3级认证,需要提交一系列的Word文档,其中有一种文档要求添加公司几个系统的数据库中的表结构.我临时接到了这项 ...
- Java初认识--Java中的语法结构
Java中的语法结构(程序流程控制) Java的语法结构有四种: 1.顺序结构. 顺序结构很简单,就是按顺序执行,输出就可以了. 2.判断结构. 判断结构的一个代表性的语句是if:if语句有三种格式体 ...
随机推荐
- Salesforce Sharing And Visibility 零基础学习(一)基础知识篇
本篇参考: https://trailhead.salesforce.com/en/users/strailhead/trailmixes/architect-sharing-and-visibili ...
- 源码解读之FutureTask如何实现最大等待时间
预备知识:Java 线程挂起的常用方式有以下几种 Thread.sleep(long millis):这个方法可以让线程挂起一段时间,并释放 CPU 时间片,等待一段时间后自动恢复执行.这种方式可以用 ...
- AIGC时代:未来已来
摘要:人工智能的快速发展使得我们进入了AIGC时代.AIGC时代的到来,将会带来巨大的机遇和挑战. 本文分享自华为云社区<GPT-4发布,AIGC时代的多模态还能走多远?系列之一: AIGC时代 ...
- 迁移学习《Asymmetric Tri-training for Unsupervised Domain Adaptation》
论文信息 论文标题:Asymmetric Tri-training for Unsupervised Domain Adaptation论文作者:Kuniaki Saito, Y. Ushiku, T ...
- MySQL之 InnoDB 内存结构
从MySQL 5.5版本开始默认 使用InnoDB作为引擎,它擅长处理事务,具有自动崩溃恢复的特性,在日常开发中使用非常广泛 下面是官方的InnoDB引擎架构图,主要分为内存结构和磁盘结构两大部分. ...
- MQTT(EMQX) - SpringBoot 整合MQTT 连接池 Demo - 附源代码 + 在线客服聊天架构图
MQTT(EMQX) - Linux CentOS Docker 安装 MQTT 概述 MQTT (Message Queue Telemetry Transport) 是一个轻量级传输协议,它被设计 ...
- 执行计划display_cursor函数
问题描述:关于oracle查看真实的执行计划,使用select * from table(dbms_xplan.display_cursor(null,null));的方式来获取执行计划 参考文档:h ...
- Golang网络编程: DNS子域名爆破
域名系统(Domain Name System,缩写:DNS)是互联网的一项服务.它作为将域名和IP地址相互映射的一个分布式数据库,能够使人更方便地访问互联网.这就如同一个地址簿,根据域名来指向IP地 ...
- abp(net core)+easyui+efcore实现仓储管理系统——组织管理升级之下(六十二)
Abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...
- 6个优化策略,助你降低K8S成本
Kubernetes 早已成为容器编排引擎的事实标准,而随着 Kubernetes 环境的复杂性持续增长,成本也在不断攀升.CNCF 发布的调查报告<Kubernetes 的 FinOps> ...