前面介绍过一些药物敏感性分析的教程:
oncoPredict:一个用于预测体内或癌症患者药物反应和细胞系筛查数据的生物标志物的R包
这里我们接着介绍一个在许多生信文章中用到的R包:pRRophetic。
pRRophetic: An R Package for Prediction of Clinical Chemotherapeutic Response from Tumor Gene Expression Levels
pRRophetic包并不使用我们介绍的Cancer Therapeutics Response Portal (CTRP) 和 Genomics of Drug Sensitivity in Cancer (GDSC) 两个数据库资源,而是使用 Cancer Genome Project (CGP)计划里面的表达量矩阵和药物处理信息,该数据库有138 anticancer drugs against 727 cell lines
1.包的安装 R包可在https://github.com/paulgeeleher/pRRophetic或者http://genemed.uchicago.edu/~pgeeleher/pRRophetic找到,直接下载下载安装就行了。
# website (http://genemed.uchicago.edu/~pgeeleher/pRRophetic)
# GitHub (https://github.com/paulgeeleher/pRRophetic).
BiocManager::install(c('sva', 'car', 'genefilter', 'preprocessCore', 'ridge'))
# 假如提前你缺啥,就使用上面的代码安装缺失的包
install.packages("pRRophetic_0.5.tar.gz", repos = NULL, dependencies = TRUE)
2.包的数据介绍
安装完成后,pRRophetic自带了下面这些数据。数据主要是2014年的数据和2016年更新后的数据。
2016年更新了一次数据。
library(pRRophetic)
data(bortezomibData)
dim(exprDataBortezomib)
exprDataBortezomib[1:4,1:4]
boxplot(exprDataBortezomib[1:4,])
MedBioInfoCloud: table(studyResponse)
studyResponse
PGx_Responder = IE PGx_Responder = NR PGx_Responder = R
25
NR, Clinical Non-responders; R, Clinical Responders.IE文章中没有描述,不知道是什么。但重点看NR和R就行。
查看CCLE数据:
data(ccleData)
dim(exprMatCcle)
exprMatCcle[1:4,1:3]
可以看到ccle数据库里面的表达量矩阵信息很丰富,有1037个细胞系的18988个基因表达。
但是药物处理信息只有24个药物,五百多个细胞系。
head(sensDataCcle)[,1:4]
tmp=as.data.frame(table(sensDataCcle[,2:3]) )
length(unique(sensDataCcle$Compound))
length(unique(sensDataCcle$Primary.Cell.Line.Name))
24种药物:
unique(sensDataCcle$Compound)
Cancer Genome Project (CGP)里面有1018个细胞系的17419个基因的表达数据,以及251种药物。
data(cgp2016ExprRma)
dim(cgp2016ExprRma)
data(PANCANCER_IC_Tue_Aug_9_15_28_57_2016)
length(unique(drugData2016$Drug.name))
unique(drugData2016$Drug.name)
介绍完数据,我们开始介绍这个包怎么使用。
3.实践
这个包的核心函数是pRRopheticPredict,有非常多的参数,不过绝大部分都是有默认值。
pRRopheticPredict(testMatrix, drug, tissueType = "all", batchCorrect = "eb",
powerTransformPhenotype = TRUE, removeLowVaryingGenes = 0.2,
minNumSamples = 10, selection = -1, printOutput = TRUE,
removeLowVaringGenesFrom = "homogenizeData", dataset = "cgp2014")
我们这里以CGP2014的数据来演示,药物选择紫杉醇(Paclitaxel)。
predictedPtype <- pRRopheticPredict(testMatrix = exprDataBortezomib,
drug="Paclitaxel",
tissueType = "all",
batchCorrect = "eb",
selection=1,
dataset = "cgp2014")
exprDataBortezomib在分析是换成我们自己的表达矩阵。 可视化数据:
df <- stack(list(NR = predictedPtype[((studyResponse == 'PGx_Responder = NR') & bortIndex)],
R = predictedPtype[((studyResponse == 'PGx_Responder = R') & bortIndex)]))
head(df)
library(ggplot2)
ggplot(data = df,
aes(y = values,
x = ind))+
geom_boxplot(alpha = 0.3,
fill = c('#A7E753','#C7a4e9'))+
theme_bw()+
ylab('Predicted Paclitaxel Sensitivity') +
xlab('Clinical Response')
如果使用2016的数据,那么把dataset设置为"cgp2016"就行了。
这个包在一些生信文章中是有使用的。比如:
本文分享自 MedBioInfoCloud 微信公众号,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文参与 腾讯云自媒体分享计划 ,欢迎热爱写作的你一起参与!