癌症中克隆种群结构统计推断分析软件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语句有三种格式体 ...
随机推荐
- CSS实现文字颜色渐变效果
略微搜索查阅了网上的实现方法: 1.给元素添加背景渐变色,通过背景裁剪其中文字,再将文字设置为透明即可实现.(兼容性问题请自行添加浏览器前缀) background-color:linear-grad ...
- Java 内存模型(二)
Java 内存模型(二) happens-before JSR-133 提出了 happens-before 的概念,通过这个概念来阐述操作之间的内存可见性.如果一个操作执行的结果需要对另一个操作 ...
- 设计模式(二十九)----综合应用-自定义Spring框架-Spring IOC相关接口分析
1 BeanFactory解析 Spring中Bean的创建是典型的工厂模式,这一系列的Bean工厂,即IoC容器,为开发者管理对象之间的依赖关系提供了很多便利和基础服务,在Spring中有许多IoC ...
- Terraform 系列-Terraform 项目的典型文件布局
系列文章 Terraform 系列文章 典型文件布局 - modules/ - services/ - webserver-cluster/ - examples/ - main.tf - outpu ...
- FreeSWITCH的originate命令解析及示例
FreeSWITCH版本:1.10.9 操作系统:CentOS 7.6.1810 originate经常用于发起呼叫,在实际工作过程中用到的也比较多,今天总结下基本用法,也方便我以后查阅. 一.wik ...
- 系统评价——主成分分析PCA的R语言实现(六)
主成分分析(Principal Component Analysis,PCA),是将多个变量通过线性变换以选出较少个数重要变量的一种多元统计分析方法,起到数据约减和集成的作用.在许多领域的研究与应用中 ...
- 强大的 apt-get 命令
强大的 apt-get 命令(小结) 一.ubuntu下管理软件最方便的非 apt-get 工具莫属了,它的常见用法稍微整理一下供以后参考(详细见 man apt-get ): 1.更新源,升级软件和 ...
- IBM Cloud Computing Practitioners 2019 (IBM云计算从业者2019)Exam答案
Cloud Computing Practitioners 2019 IBM Cloud Computing Practitioners 2019 (IBM云计算从业者2019)Exam答案,加粗的为 ...
- python去掉重复值的方法--四种
my_list = [1,1,1,1,2,3,3,3,4,5,5,56,6,7,77,7,5,5,3]# 集合法:缺点是结果会打乱原始数据的顺序print(set(my_list)) # 列表法:缺点 ...
- 【D01】Django中实现带进度条的倒计时功能(简易版)
首先说明简易版是只有一个 倒计时 和一个 进度条,页面加载后自动开始计时,下次计时需要手动刷新页面. 后续会更新实现完整的倒计时功能的文章 前期准备 前端框架 你需要准备一些前端框架:Bootstra ...