癌症中克隆种群结构统计推断分析软件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语句有三种格式体 ...
随机推荐
- 第一部分:介绍 Spdlog 日志库
什么是 Spdlog 日志库 Spdlog 是一个 C++ 的日志库,它具有高效.易用.跨平台等特点.它可以写入到控制台.文件等输出目标,支持多种日志级别.多线程安全等功能,非常适合在 C++ 项目中 ...
- Node.js爬取百度图片瀑布流,使用class类封装。
//爬取百度高清图片 const phantom = require('phantom') const express = require('express'); const app = expres ...
- 使用HTMLform表单操作腾讯云DNS控制台
在使用中经常需要修改DNS记录,或者查询.删除操作.每次都得登录腾讯云控制台,腾讯云比较鸡肋的一点就是需要进行微信扫码登录,每次操作太不方便. 可以使用api接口进行操作腾讯云上的产品.所以使用HTM ...
- Containerd 入门基础操作
Containerd 被 Docker.Kubernetes CRI 和其他一些项目使用 Containerd 旨在轻松嵌入到更大的系统中.Docker 在后台使用 containerd来运行容器. ...
- [MyBatis]MyBatis系列:模糊查询的4种实现方式【待完善】
背景 客户现网遇到的1个子问题. 方案 LIKE + Concat(strA, strB) ... 参考文献 MyBatis系列:模糊查询的4种实现方式
- c#快速入门~在java基础上,知道C#和JAVA 的不同即可
观看下文前提:如果你的主语言是java,现在想再学一门新语言C#,下文是在java基础上,对比和java的不同,快速上手C# C# 学习参考文档和开发工具 微软c#官方文档:https://learn ...
- ES_ChatGPT问答
Q1:springboot项目,如何使用elasticsearch的api增删改查?查询中有哪些方式,如果模糊查询.排序查询.分页查询?分别阐述下这些查询方式的用法?最后举一个完整的例子 答: 在Sp ...
- java 回行矩阵的打印
n=3 n=4 1 2 3 1 2 3 4 8 9 4 12 13 14 5 7 6 5 11 16 15 6 10 9 ...
- Springboot3整合使用ja-captcha行为验证码解决方案
截止到目前,Springboot最新稳定版本已经迭代到3.0.5,而我们项目中使用的行为验证码框架ja-captcha还没有适配Springboot3,码云上类似的请求也没有得到过回应,于是决定自己动 ...
- 12-提取css成单独文件
const { resolve } = require('path') const HtmlWebpackPlugin = require('html-webpack-plugin') const M ...