跳转到主要内容

RNA-seq数据的二值化和归一化PROFILE方法

项目描述

profile_binr

RNA-seq数据的二值化和归一化PROFILE方法。

这是一个R语言编写的RNA-seq数据归一化和二值化函数集的Python接口。

本软件包基于Beal, Jonas; Montagud, Arnau; Traynard, Pauline; Barillot, Emmanuel; 和 Calzone, Laurence在Curie研究所计算系统生物学癌症团队(contact-sysbio@curie.fr)开发的方法。它扩展了原始的Rmarkdown笔记本实现,并提供了Python接口,这些笔记本可以在https://github.com/sysbio-curie/PROFILE找到。

安装

使用conda

可以使用colomoto通道中的conda包profile_binr安装此工具。注意,其中一些依赖项需要conda-forge通道。

conda install -c conda-forge colomoto::profile_binr

使用pip

要求

  • R (≥4.0)
  • R包
    • mclust
    • diptest
    • moments
    • magrittr
    • tidyr
    • dplyr
    • tibble
    • bigmemory
    • doSNOW
    • foreach
    • glue
pip install profile_binr

用法

这又是一个最小示例

from profile_binr import ProfileBin
import pandas as pd

# your data is assumed to contain observations as
# rows and genes as columns
data = pd.read_csv("path/to/your/data.csv")
data.head()
Clec1b Kdm3a Coro2b 8430408G22Rik Clec9a Phf6 Usp14 Tmem167b
cell_id
HSPC_025 0.0 4.891604 1.426148 0.0 0.0 2.599758 2.954035 6.357369
HSPC_031 0.0 6.877725 0.000000 0.0 0.0 2.423483 1.804914 0.000000
HSPC_037 0.0 0.000000 6.913384 0.0 0.0 2.051659 8.265465 0.000000
LT-HSC_001 0.0 0.000000 8.178374 0.0 0.0 6.419817 3.453502 2.579528
HSPC_001 0.0 0.000000 9.475577 0.0 0.0 7.733370 1.478900 0.000000
# create the binarisation instance using the dataframe
# with the index containing the cell identifier
# and the columns being the gene names
probin = ProfileBin(data)

# compute the criteria used to binarise/normalise the data :
# This method uses a parallel implementation, you can specify the 
# number of workers with an integer
probin.fit(8) # train using 8 threads

# Look at the computed criteria
probin.criteria.head(8)
Dip BI Kurtosis DropOutRate MeanNZ DenPeak Amplitude Category
Clec1b 0.358107 1.635698 54.017736 0.876208 1.520978 -0.007249 8.852181 ZeroInf
Kdm3a 0.000000 2.407548 -0.784019 0.326087 3.847940 0.209239 10.126676 Bimodal
Coro2b 0.000000 2.320060 7.061604 0.658213 2.383819 0.004597 9.475577 ZeroInf
8430408G22Rik 0.684454 3.121069 21.729044 0.884058 2.983472 0.005663 9.067857 ZeroInf
Clec9a 1.000000 2.081717 140.089285 0.965580 2.280293 -0.009361 9.614233 废弃
Phf6 0.000000 1.988667 -1.389024 0.035628 5.025501 2.017547 10.135226 Bimodal
Usp14 0.000000 2.208080 -1.224987 0.007850 6.109964 8.245570 11.088750 Bimodal
Tmem167b 0.000000 2.430813 0.093023 0.393720 3.448331 0.072982 9.486826 Bimodal
# get binarised data (alternatively .binarise()):
my_bin = probin.binarize()
my_bin.head()
Clec1b Kdm3a Coro2b 8430408G22Rik Clec9a Phf6 Usp14 Tmem167b
HSPC_025 非数字 1.0 非数字 非数字 非数字 0.0 0.0 1.0
HSPC_031 非数字 1.0 非数字 非数字 非数字 0.0 0.0 0.0
HSPC_037 非数字 0.0 1.0 非数字 非数字 0.0 1.0 0.0
LT-HSC_001 非数字 0.0 1.0 非数字 非数字 1.0 0.0 0.0
HSPC_001 非数字 0.0 1.0 非数字 非数字 1.0 0.0 0.0
# idem for normalised data :
my_norm = probin.normalize()
my_norm.head()
Clec1b Kdm3a Coro2b 8430408G22Rik Clec9a Phf6 Usp14 Tmem167b
HSPC_025 0.0 0.9796196e+01 0.184102 0.0 非数字 0.000801 8.318176e-05 1.0000070e+00
HSPC_031 0.0 1.0000181e+00 0.000000 0.0 非数字 0.000462 8.084114e-07 6.874397e-11
HSPC_037 0.0 4.408417e-09 0.892449 0.0 非数字 0.000145 1.0000040e+00 6.874397e-11
LT-HSC_001 0.0 4.408417e-09 1.000000 0.0 非数字 0.991865 6.230178e-04 1.599753e-04
HSPC_001 0.0 4.408417e-09 1.000000 0.0 非数字 0.999865 2.171153e-07 6.874397e-11

参考文献

  • Béal J, Montagud A, Traynard P, Barillot E and Calzone L (2019) 《利用多组学数据个性化逻辑模型以实现患者的临床分层》. Front. Physiol. 9:1965. doi:10.3389/fphys.2018.01965

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源代码发行版

profile_binr-0.1.2.tar.gz (15.6 kB 查看哈希)

上传时间 源代码

构建发行版

profile_binr-0.1.2-py3-none-any.whl (14.0 kB 查看哈希)

上传时间 Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面