{"id":57255,"date":"2024-06-16T19:01:18","date_gmt":"2024-06-16T11:01:18","guid":{"rendered":"https:\/\/www.biocloudservice.com\/wordpress\/?p=57255"},"modified":"2026-09-11T23:07:49","modified_gmt":"2026-09-11T15:07:49","slug":"%e4%b8%80%e6%96%87%e6%90%9e%e5%ae%9a%e7%94%9f%e4%bf%a1%e5%88%86%e6%9e%90%e5%bc%ba%e5%8a%a9%e6%94%bb-%e8%8d%af%e6%95%8f%e5%88%86%e6%9e%90prrophetic%e5%92%8concopredict%e5%8c%85","status":"publish","type":"post","link":"https:\/\/www.biocloudservice.com\/wordpress\/%e4%b8%80%e6%96%87%e6%90%9e%e5%ae%9a%e7%94%9f%e4%bf%a1%e5%88%86%e6%9e%90%e5%bc%ba%e5%8a%a9%e6%94%bb-%e8%8d%af%e6%95%8f%e5%88%86%e6%9e%90prrophetic%e5%92%8concopredict%e5%8c%85\/","title":{"rendered":"\u4e00\u6587\u641e\u5b9a\u751f\u4fe1\u5206\u6790\u5f3a\u52a9\u653b-\u836f\u654f\u5206\u6790(pRRophetic\u548concoPredict\u5305)"},"content":{"rendered":"<aside class=\"ysx-source-note\"><span>\u6765\u6e90<\/span><\/p>\n<p>\u516c\u4f17\u53f7\u300cR\u8bed\u8a00\u5b66\u5f92\u300d\u5386\u53f2\u5185\u5bb9\uff1b\u672c\u6587\u4fdd\u7559\u539f\u6709\u6280\u672f\u4fe1\u606f\u5e76\u4f18\u5316\u7f51\u9875\u6392\u7248\u3002 <a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=Mzg5MDk3Mzg4OA==&amp;mid=2247492138&amp;idx=1&amp;sn=d05faf1ff64bed2da42d6f5d72fd8fb7\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">\u67e5\u770b\u539f\u6587<\/a><\/p>\n<\/aside>\n<p>\u4e4b\u524d\u679c\u5b50\u5df2\u7ecf\u505a\u8fc7\u4e86\u57fa\u56e0\u8868\u8fbe\u6570\u636e\u4ee5\u53ca\u514d\u75ab\u7ec6\u80de\u6570\u636e\u4e4b\u95f4\u7684\u5173\u7cfb\uff0cR\u5305\u4e4b pRRophetic\u548concoPredict \uff0c\u53ef\u4ee5\u5bf9\u8868\u8fbe\u91cf\u77e9\u9635\u8fdb\u884c\u836f\u7269\u53cd\u5e94\u9884\u6d4b\uff0c\u8fd9\u6b21\u7ed9\u5927\u5bb6\u5e26\u67652021\u5e747\u6708\u7684\u300aoncoPredict: an R package for predicting in vivo or cancer patient drug response and biomarkers from cell line screening data\u300b \u836f\u7269\u9884\u6d4bR\u5305\u4e4boncoPredict \u3002\u6211\u4eec\u5148\u6765\u5b66\u4e60\u4e00\u4e0b\u8fd9\u4e24\u4e2aR\u5305\u5427\u3002<\/p>\n<h2>\u7528 pRRophetic \u9884\u6d4b\u836f\u7269\u654f\u611f\u6027<\/h2>\n<p>\u672c\u671f\u4e3b\u8981\u7ed9\u5927\u5bb6\u5e26\u6765\u836f\u7269\u654f\u611f\u6027\u5206\u6790\uff0c\u4f7f\u7528 pRRophetic \u4e4b\u524d\u5148\u5b89\u88c5\uff0c\u81ea\u5df1\u4e0b\u8f7dpRRophetic_0.5.tar.gz\u8fd9\u4e2a\u538b\u7f29\u5305\uff08\u5927\u4e8e500M\u54e6\uff09\uff0c\u7136\u540e\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e0b\u9762\u4f7f\u7528\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<div class=\"code-card\">\n<div class=\"code-head\"><span>\u4ee3\u7801<\/span><\/div>\n<pre><code>#if (!requireNamespace(\"BiocManager\", quietly = TRUE))<\/code><code>#    install.packages(\"BiocManager\")<\/code><code>#BiocManager::install(c(\"limma\", \"car\", \"ridge\", \"preprocessCore\", \"genefilter\", \"sva\"))<\/code><code>#\u4f7f\u7528 \"BiocManager\" \u5305\u6765\u5b89\u88c5\u591a\u4e2a\u5176\u4ed6\u5305\uff0c\u5305\u62ec \"limma\"\u3001\"car\"\u3001\"ridge\"\u3001\"preprocessCore\"\u3001\"genefilter\" \u548c \"sva\"\u3002<\/code><code>#install.packages(\"ggplot2\")<\/code><code>#install.packages(\"ggpubr\")<\/code><code>           <\/code><code>#\u5f15\u7528\u5305<\/code><code>library(limma)<\/code><code>library(ggpubr)<\/code><code>library(pRRophetic)<\/code><\/pre>\n<\/div>\n<figure><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/2_mfMOBibicJib8QOyolU7X2tpnomokg.png?ssl=1\" loading=\"lazy\" decoding=\"async\" alt=\"\"><\/figure>\n<div class=\"code-card\">\n<div class=\"code-head\"><span>\u4ee3\u7801<\/span><\/div>\n<pre><code>library(ggplot2)<\/code><code>#\u52a0\u8f7d\u6240\u9700\u7684R\u5305\uff0c\u5305\u62ec \"limma\"\u3001\"ggpubr\"\u3001\"pRRophetic\"\u3001\"ggplot2\" \u7b49<\/code><code>set.seed(12345)<\/code><code>           <\/code><code>pFilter=0.001            #pvalue\u7684\u8fc7\u6ee4\u6761\u4ef6\u8bbe\u7f6e\u663e\u8457\u6027\u8fc7\u6ee4\u6761\u4ef6\uff0c\u7528\u4e8e\u7b5b\u9009\u5dee\u5f02\u663e\u8457\u7684\u7ed3\u679c<\/code><code>gene=\"VCAN\"              #\u76ee\u6807\u57fa\u56e0<\/code><code>expFile=\"symbol.txt\"     #\u8868\u8fbe\u6570\u636e\u6587\u4ef6<\/code><code>           <\/code><code>setwd(\"\")     #\u8bbe\u7f6e\u5de5\u4f5c\u76ee\u5f55<\/code><code>           <\/code><code>#\u83b7\u53d6\u836f\u7269\u5217\u8868<\/code><code>           <\/code><code>data(cgp2016ExprRma)<\/code><code>#\u8f7d\u5165\u5df2\u7ecf\u63d0\u4f9b\u7684 \"cgp2016ExprRma\" \u6570\u636e\u96c6<\/code><code>data(PANCANCER_IC_Tue_Aug_9_15_28_57_2016)<\/code><code>allDrugs=unique(drugData2016$Drug.name)<\/code><code>#\u8f7d\u5165\u5df2\u7ecf\u63d0\u4f9b\u7684 \"PANCANCER_IC_Tue_Aug_9_15_28_57_2016\" \u6570\u636e\u96c6\u3002<\/code><code>#\u8bfb\u53d6\u8868\u8fbe\u8f93\u5165\u6587\u4ef6,\u5e76\u5bf9\u6570\u636e\u8fdb\u884c\u5904\u7406<\/code><code>rt=read.table(expFile, header=T, sep=\"t\", check.names=F)<\/code><\/pre>\n<\/div>\n<figure><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/3_5bkvTibVtwR7PF1JfMMEVSMTky1EXA.png?ssl=1\" loading=\"lazy\" decoding=\"async\" alt=\"\"><\/figure>\n<div class=\"code-card\">\n<div class=\"code-head\"><span>\u4ee3\u7801<\/span><\/div>\n<pre><code>rt=as.matrix(rt)<\/code><code>rownames(rt)=rt[,1]<\/code><code>exp=rt[,2:ncol(rt)]<\/code><code># \u5c06\u5904\u7406\u540e\u7684\u77e9\u9635\u4e2d\u7684\u8868\u8fbe\u6570\u636e\u63d0\u53d6\u51fa\u6765\u3002<\/code><code>dimnames=list(rownames(exp),colnames(exp))<\/code><code>#\u521b\u5efa\u77e9\u9635 data \u8bbe\u7f6e\u7ef4\u5ea6\u540d\u79f0\u3002<\/code><code>#\u5728R\u4e2d\uff0c\u7ef4\u5ea6\u540d\u79f0\u5141\u8bb8\u4f60\u4e3a\u77e9\u9635\u7684\u884c\u548c\u5217\u6307\u5b9a\u6807\u7b7e\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u7406\u89e3\u77e9\u9635\u4e2d\u7684\u6570\u636e<\/code><code>data=matrix(as.numeric(as.matrix(exp)),nrow=nrow(exp),dimnames=dimnames)<\/code><code>#\u5c06\u6570\u636e\u77e9\u9635 exp \u8f6c\u6362\u4e3a data \u77e9\u9635\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/code><code> #   as.matrix(exp): \u5c06\u6570\u636e\u6846 exp \u8f6c\u6362\u4e3a\u6570\u503c\u578b\u77e9\u9635\u3002<\/code><code> #  as.numeric(...): \u5c06\u6570\u503c\u578b\u77e9\u9635\u4e2d\u7684\u6570\u636e\u8f6c\u6362\u4e3a\u6570\u503c\u3002<\/code><code> #   matrix(...): \u4f7f\u7528\u8f6c\u6362\u540e\u7684\u6570\u503c\u548c\u6307\u5b9a\u7684\u884c\u6570\uff08\u7531 nrow(exp) \u7ed9\u51fa\uff09\u548c\u7ef4\u5ea6\u540d\u79f0\uff08\u7531 dimnames \u7ed9\u51fa\uff09\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u77e9\u9635 data\u3002<\/code><code>#\u5220\u6389\u6b63\u5e38\u6837\u54c1<\/code><code>data=avereps(data)    <\/code><code>#\u51fd\u6570 avereps \u5bf9\u77e9\u9635 data \u8fdb\u884c\u5904\u7406\u3002avereps \u51fd\u6570\u7684\u76ee\u7684\u662f\u6c42\u6bcf\u4e00\u884c\u7684\u5e73\u5747\u503c<\/code><code>data=data[rowMeans(data)&gt;0.5,]<\/code><code>#\u5c06\u77e9\u9635 data \u8fdb\u4e00\u6b65\u5904\u7406\uff0c\u53ea\u4fdd\u7559\u884c\u5e73\u5747\u503c\u5927\u4e8e0.5\u7684\u884c\u3002<\/code><code>#\u6392\u9664\u90a3\u4e9b\u5e73\u5747\u8868\u8fbe\u91cf\u8f83\u4f4e\u7684\u6837\u672c\uff0c\u4ee5\u4fbf\u66f4\u5173\u6ce8\u8868\u8fbe\u4e30\u5ea6\u8f83\u9ad8\u7684\u6837\u672c\u3002<\/code><code>group=sapply(strsplit(colnames(data),\"\\-\"), \"[\", 4)<\/code><code>#\u5c06\u77e9\u9635 data \u7684\u5217\u540d\u8fdb\u884c\u5904\u7406\uff0c\u63d0\u53d6\u51fa\u6bcf\u5217\u540d\u79f0\u7684\u7b2c\u56db\u4e2a\u90e8\u5206\uff08\u4f7f\u7528 \"-\" \u4f5c\u4e3a\u5206\u9694\u7b26\uff09\u3002\u7528\u4e8e\u4ece\u6837\u672c\u540d\u4e2d\u83b7\u53d6\u6837\u672c\u7684\u5206\u7ec4\u4fe1\u606f\u3002<\/code><code>group=sapply(strsplit(group,\"\"), \"[\", 1)<\/code><code>#\u5c06\u6bcf\u4e2a\u5b57\u7b26\u4e32\u4e2d\u7684\u6bcf\u4e2a\u5b57\u7b26\u4f5c\u4e3a\u5355\u72ec\u7684\u5143\u7d20\u3002\u7136\u540e\uff0c\u4f7f\u7528 [ \u51fd\u6570\u63d0\u53d6\u6bcf\u4e2a\u5b57\u7b26\u4e32\u7684\u7b2c\u4e00\u4e2a\u5b57\u7b26\u3002\u8fd9\u53ef\u80fd\u662f\u4e3a\u4e86\u8fdb\u4e00\u6b65\u5904\u7406\u6837\u672c\u5206\u7ec4\u4fe1\u606f\u3002<\/code><code>group=gsub(\"2\",\"1\",group)<\/code><code>#\u7528 gsub \u51fd\u6570\u5c06\u6240\u6709\u5b57\u7b26\u4e32\u4e2d\u7684\u5b57\u7b26 \"2\" \u66ff\u6362\u4e3a \"1\"\u3002\u8fd9\u53ef\u80fd\u662f\u5c06\u6837\u672c\u5206\u7ec4\u4fe1\u606f\u8fdb\u884c\u6807\u51c6\u5316\u6216\u91cd\u65b0\u7f16\u7801\u3002<\/code><code>data=data[,group==0]<\/code><code>#\u5c06\u77e9\u9635 data \u8fdb\u4e00\u6b65\u5904\u7406\uff0c\u53ea\u4fdd\u7559\u6837\u672c\u5206\u7ec4\u4fe1\u606f\u4e3a \"0\" \u7684\u5217\u3002\u8fd9\u53ef\u80fd\u662f\u4e3a\u4e86\u53ea\u4fdd\u7559\u7279\u5b9a\u6837\u672c\u5206\u7ec4\u7684\u6570\u636e\u3002<\/code><code>data=t(data)<\/code><code>#\u5bf9\u77e9\u9635 data \u8fdb\u884c\u8f6c\u7f6e\uff0c\u5c06\u884c\u5217\u4e92\u6362<\/code><code>rownames(data)=gsub(\"(.*?)\\-(.*?)\\-(.*?)\\-.*\", \"\\1\\-\\2\\-\\3\", rownames(data))<\/code><code>#\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u5904\u7406\u77e9\u9635 data \u7684\u884c\u540d\uff0c\u4ece\u4e2d\u63d0\u53d6\u51fa\u6240\u9700\u7684\u4fe1\u606f\uff0c\u5e76\u91cd\u65b0\u8bbe\u7f6e\u884c\u540d\u3002<\/code><code>data=t(avereps(data))<\/code><code>           <\/code><code>#\u6839\u636e\u76ee\u6807\u57fa\u56e0\u7684\u8868\u8fbe\u91cf\u5bf9\u6837\u54c1\u8fdb\u884c\u5206\u7ec4<\/code><code>geneExp=as.data.frame(t(data[gene,,drop=F]))<\/code><code>geneExp$Type=ifelse(geneExp[,gene]&gt;median(geneExp[,gene]), \"High\", \"Low\")<\/code><code>#\u4ece\u77e9\u9635 data \u4e2d\u9009\u62e9\u4e0e\u76ee\u6807\u57fa\u56e0\u76f8\u5173\u7684\u884c\uff0c<\/code><code>#\u5e76\u4f7f\u7528\u9017\u53f7 , \u6765\u6307\u5b9a\u5217\u7684\u9009\u62e9\u3002drop=F \u53c2\u6570\u786e\u4fdd\u5373\u4f7f\u53ea\u9009\u62e9\u4e00\u5217\uff0c\u7ed3\u679c\u4e5f\u4f1a\u4fdd\u6301\u4e3a\u77e9\u9635\u800c\u4e0d\u662f\u5411\u91cf\u3002<\/code><code>for(drug in allDrugs){<\/code><code>       #\u9884\u6d4b\u836f\u7269\u654f\u611f\u6027<\/code><code>       possibleError=tryCatch(<\/code><code>           {senstivity=pRRopheticPredict(data, drug, selection=1, dataset = \"cgp2016\")},<\/code><code>           error=function(e) e)<\/code><code>              #\u4f7f\u7528 tryCatch \u51fd\u6570\uff0c\u5c1d\u8bd5\u6267\u884c\u836f\u7269\u654f\u611f\u6027\u9884\u6d4b\u3002<\/code><code>              #\u5982\u679c\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u9519\u8bef\uff0c\u5c06\u5728\u9519\u8bef\u5904\u7406\u51fd\u6570\u4e2d\u6355\u83b7\u9519\u8bef\u5e76\u5b58\u50a8\u5728 possibleError \u4e2d\u3002<\/code><code>    if(inherits(possibleError, \"error\")){next}<\/code><code>       #\u5982\u679c possibleError \u5305\u542b\u4e86\u4e00\u4e2a\u9519\u8bef\uff0c\u90a3\u4e48\u8fd9\u884c\u4ee3\u7801\u5c06\u8df3\u8fc7\u5f53\u524d\u836f\u7269\uff0c\u7ee7\u7eed\u4e0b\u4e00\u4e2a\u5faa\u73af\u8fed\u4ee3\u3002<\/code><code>       senstivity=senstivity[senstivity!=\"NaN\"]<\/code><code>       #\u79fb\u9664\u836f\u7269\u654f\u611f\u6027\u7ed3\u679c\u4e2d\u7684 \"NaN\" \u503c\uff0c\u5c06\u6709\u6548\u7684\u836f\u7269\u654f\u611f\u6027\u503c\u5b58\u50a8\u5728\u53d8\u91cf senstivity \u4e2d\u3002<\/code><code>       senstivity[senstivity&gt;quantile(senstivity,0.99)]=quantile(senstivity,0.99)<\/code><code>       #\u5bf9\u836f\u7269\u654f\u611f\u6027\u503c\u8fdb\u884c\u5904\u7406\uff0c\u5c06\u9ad8\u4e8e 0.99 \u5206\u4f4d\u6570\u7684\u503c\u8bbe\u7f6e\u4e3a 0.99\u3002\u8fd9\u53ef\u80fd\u662f\u4e3a\u4e86\u53bb\u9664\u6781\u7aef\u5f02\u5e38\u503c\uff0c\u4ee5\u83b7\u5f97\u66f4\u597d\u7684\u53ef\u89c6\u5316\u6548\u679c<\/code><code>       #\u5c06\u8868\u8fbe\u6570\u636e\u4e0e\u836f\u7269\u654f\u611f\u6027\u7684\u7ed3\u679c\u8fdb\u884c\u5408\u5e76<\/code><code>       sameSample=intersect(row.names(geneExp), names(senstivity))<\/code><code>       #\u627e\u5230 geneExp \u4e2d\u4e0e\u836f\u7269\u654f\u611f\u6027\u7ed3\u679c\u5177\u6709\u76f8\u540c\u6837\u672c\u540d\u79f0\u7684\u6837\u672c\u3002<\/code><code>       geneExp=geneExp[sameSample, \"Type\",drop=F]<\/code><code>       #\u4ece geneExp \u4e2d\u9009\u62e9\u4e0e\u836f\u7269\u654f\u611f\u6027\u7ed3\u679c\u76f8\u540c\u7684\u6837\u672c\uff0c\u4ec5\u4fdd\u7559 \"Type\" \u5217\u3002<\/code><code>       senstivity=senstivity[sameSample]<\/code><code>       #\u4ece\u836f\u7269\u654f\u611f\u6027\u7ed3\u679c\u4e2d\u9009\u62e9\u4e0e geneExp \u76f8\u540c\u6837\u672c\u7684\u654f\u611f\u6027\u503c\u3002<\/code><code>       rt=cbind(geneExp, senstivity)<\/code><code>       #\u5c06\u57fa\u56e0\u8868\u8fbe\u5206\u7ec4\u548c\u836f\u7269\u654f\u611f\u6027\u7ed3\u679c\u5408\u5e76\u5230\u4e00\u4e2a\u6570\u636e\u6846\u4e2d\u3002<\/code><code>       #\u8bbe\u7f6e\u6bd4\u8f83\u7ec4<\/code><code>       rt$Type=factor(rt$Type, levels=c(\"Low\", \"High\"))<\/code><code>       #\u5c06 \"Type\" \u5217\u8f6c\u6362\u4e3a\u56e0\u5b50\uff0c\u8bbe\u5b9a\u6c34\u5e73\u4e3a \"Low\" \u548c \"High\"\u3002<\/code><code>       type=levels(factor(rt[,\"Type\"]))<\/code><code>       comp=combn(type, 2)<\/code><code>       my_comparisons=list()<\/code><code>       #\u521b\u5efa\u4e00\u4e2a\u7a7a\u5217\u8868\u6765\u5b58\u50a8\u5206\u7ec4\u6bd4\u8f83<\/code><code>       for(i in 1:ncol(comp)){my_comparisons[[i]]&lt;-comp[,i]}<\/code><code>       #\u5c06\u6240\u6709\u53ef\u80fd\u7684\u5206\u7ec4\u6bd4\u8f83\u6dfb\u52a0\u5230 my_comparisons \u5217\u8868\u4e2d\u3002<\/code><code>       #\u83b7\u53d6\u9ad8\u4f4e\u8868\u8fbe\u7ec4\u5dee\u5f02\u7684pvalue<\/code><code>       test=wilcox.test(senstivity~Type, data=rt)<\/code><code>       #\u6267\u884c Wilcoxon \u79e9\u548c\u68c0\u9a8c\uff0c\u68c0\u9a8c\u836f\u7269\u654f\u611f\u6027\u662f\u5426\u5728\u4e0d\u540c\u57fa\u56e0\u8868\u8fbe\u5206\u7ec4\u4e4b\u95f4\u5b58\u5728\u663e\u8457\u5dee\u5f02\u3002<\/code><code>       diffPvalue=test$p.value<\/code><code>       if(diffPvalue     &lt;pFilter){&lt; span&gt;<\/code><code>     &lt;\/pFilter){&lt;&gt;<\/code><code>              #\u7ed8\u5236\u7bb1\u7ebf\u56fe<\/code><code>              boxplot=ggboxplot(rt, x=\"Type\", y=\"senstivity\", fill=\"Type\",<\/code><code>                                         xlab=gene,<\/code><code>                                         ylab=paste0(drug, \" senstivity (IC50)\"),<\/code><code>                                         legend.title=gene,<\/code><code>                                         palette=c(\"#0066FF\",\"#FF0000\")<\/code><code>                                        )+ <\/code><code>                     stat_compare_means(comparisons=my_comparisons)<\/code><code>              pdf(file=paste0(\"durgSenstivity.\", drug, \".pdf\"), width=5, height=4.5)<\/code><code>              #\u521b\u5efa\u4e00\u4e2a PDF \u6587\u4ef6\uff0c\u7528\u4e8e\u4fdd\u5b58\u7ed8\u5236\u7684\u7bb1\u7ebf\u56fe\uff0c\u6587\u4ef6\u540d\u6839\u636e\u5f53\u524d\u836f\u7269\u547d\u540d\u3002<\/code><code>              print(boxplot)<\/code><code>              dev.off()<\/code><code>       }<\/code><code>}<\/code><\/pre>\n<\/div>\n<figure><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/4_uWaz1MWHeibc1czHMibAOpOw7hnwvA.png?ssl=1\" loading=\"lazy\" decoding=\"async\" alt=\"\"><\/figure>\n<figure><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/5_bNbz3QaIL3K1PamZB4oH9bEgAEzuPA.png?ssl=1\" loading=\"lazy\" decoding=\"async\" alt=\"\"><\/figure>\n<figure><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/6_YKgNX6UfAqViaeW4gsUiaztAKgbBpg.png?ssl=1\" loading=\"lazy\" decoding=\"async\" alt=\"\"><\/figure>\n<figure><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/7_TczPJjmaOFkZOOPicQxGkTJSXlRqTA.png?ssl=1\" loading=\"lazy\" decoding=\"async\" alt=\"\"><\/figure>\n<figure><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/8_wDqkV9rkdNja14sq5s2WLk09vmN0NQ.png?ssl=1\" loading=\"lazy\" decoding=\"async\" alt=\"\"><\/figure>\n<h2>\u7528 oncoPredict \u8fdb\u884c\u836f\u7269\u53cd\u5e94\u9884\u6d4b<\/h2>\n<p>\u8fd8\u6709\u4e00\u4e2aR\u5305oncoPredict\uff0c\u836f\u7269\u9884\u6d4b\u9700\u8981\u8bad\u7ec3\u96c6\uff0c\u4e00\u822c\u6765\u8bf4\u63a8\u8350\u4f7f\u7528\u6743\u5a01\u8d44\u6e90\u4f5c\u4e3a\u8bad\u7ec3\u96c6\u5efa\u597d\u6a21\u578b\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u53bb\u9884\u6d4b\u4f60\u81ea\u5df1\u7684\u6570\u636e\u3002Cancer Therapeutics Response Portal (CTRP) \u548c Genomics of Drug Sensitivity in Cancer (GDSC) \uff0c\u516b\u767e\u591a\u4e2a\u7ec6\u80de\u7cfb\u7684\u7ea62\u4e07\u4e2a\u57fa\u56e0\u7684\u8868\u8fbe\u91cf\u77e9\u9635\uff0c\u4ee5\u53ca\u5bf9\u5e94\u516b\u767e\u591a\u7ec6\u80de\u7cfb\u7684\u7ea6200\u4e2a\u836f\u7269\u7684IC50\u503c\u3002<\/p>\n<div class=\"code-card\">\n<div class=\"code-head\"><span>\u4ee3\u7801<\/span><\/div>\n<pre><code>library(reshape2)<\/code><code>library(ggpubr)<\/code><code>th=theme(axis.text.x = element_text(angle = 45,vjust = 0.5))<\/code><code>dir='.\/DataFiles\/Training Data\/'<\/code><code>GDSC2_Expr = readRDS(file=file.path(dir,'GDSC2_Expr (RMA Normalized and Log Transformed).rds'))<\/code><code>dim(GDSC2_Expr)  <\/code><code>GDSC2_Expr[1:4, 1:4]<\/code><code>boxplot(GDSC2_Expr[,1:4])<\/code><code>df=melt(GDSC2_Expr[,1:4])<\/code><code>head(df)<\/code><code>p1=ggboxplot(df, \"Var2\", \"value\") +th<\/code><code># Read GDSC2 response data. rownames() are samples, colnames() are drugs. <\/code><code>dir<\/code><code>GDSC2_Res = readRDS(file = file.path(dir,\"GDSC2_Res.rds\"))<\/code><code>dim(GDSC2_Res)  # 805 198<\/code><code>GDSC2_Res[1:4, 1:4]<\/code><code>p2=ggboxplot(melt(GDSC2_Res[ , 1:4]), \"Var2\", \"value\") +th ; p2# IMPORTANT note: here I do e^IC50 since the IC50s are actual ln values\/log transformed already, and the calcPhenotype function Paul #has will do a power transformation (I assumed it would be better to not have both transformations)    <\/code><code>GDSC2_Res &lt;- exp(GDSC2_Res)  <\/code><code>p3=ggboxplot(melt(GDSC2_Res[ , 1:4]), \"Var2\", \"value\") +th ; p3<\/code><code>           <\/code><code>library(patchwork)<\/code><code>p1+p2+p3<\/code><\/pre>\n<\/div>\n<figure><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/9_XsYkicXlcvFKRzFL35xfJtYfU4DQsg.png?ssl=1\" loading=\"lazy\" decoding=\"async\" alt=\"\"><\/figure>\n<div class=\"code-card\">\n<div class=\"code-head\"><span>\u4ee3\u7801<\/span><\/div>\n<pre><code>ggboxplot(melt(GDSC2_Res[ 1:4 ,]), \"Var1\", \"value\") +th<\/code><\/pre>\n<\/div>\n<figure><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/10_xHtU4ZZXGicVhscnCLD2CdJyic2oEw.png?ssl=1\" loading=\"lazy\" decoding=\"async\" alt=\"\"><\/figure>\n<p>\u56e0\u4e3a\u6bcf\u4e2a\u7ec6\u80de\u7cfb\u7684\u7bb1\u7ebf\u56fe\u91cc\u9762\u90fd\u662f\u7ea6200\u4e2a\u836f\u7269\uff0c\u6240\u4ee5\u8fd9\u6837\u7684\u53ef\u89c6\u5316\u770b\u4e0d\u51fa\u6765\u5177\u4f53 \u7684\u836f\u7269\u8868\u73b0\uff0c\u5e76\u6ca1\u6709\u592a\u5927\u7684\u610f\u4e49\u3002\u6211\u4eec\u5e94\u8be5\u662f\u76f4\u63a5\u770btop\u836f\u7269\u5373\u53ef\uff1a<\/p>\n<div class=\"code-card\">\n<div class=\"code-head\"><span>\u4ee3\u7801<\/span><\/div>\n<pre><code>round(apply(GDSC2_Res[ 1:4 ,], 1, function(x){<\/code><code>  return(c(<\/code><code>    head(sort(x)),<\/code><code>    tail(sort(x))<\/code><code>  ))<\/code><code>}),2)<\/code><\/pre>\n<\/div>\n<div class=\"code-card\">\n<div class=\"code-head\"><span>\u4ee3\u7801<\/span><\/div>\n<pre><section><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/11_h2ZKFMr4nhn1kdquLQob7qhyWY0Emw.png?ssl=1\" loading=\"lazy\" decoding=\"async\" alt=\"\"><\/section><\/pre>\n<\/div>\n<div class=\"code-card\">\n<div class=\"code-head\"><span>\u4ee3\u7801<\/span><\/div>\n<pre><section>\u6bcf\u4e2a\u7ec6\u80de\u7cfb\u90fd\u662f\u6709\u81ea\u5df1\u7684\u7279\u5f02\u6027\u836f\u7269\u548c\u5e9f\u7269\u836f\u7269\uff0cIC50\u63a5\u8fd1\u4e8e0\u7684\u5c31\u662f\u795e\u836f<\/section><section>\u3002\u8868\u8fbe\u91cf\u77e9\u9635\u662f\u4eceGenomics of Drug Sensitivity in Cancer (GDSC) \u7684<\/section><\/pre>\n<\/div>\n<div class=\"code-card\">\n<div class=\"code-head\"><span>\u4ee3\u7801<\/span><\/div>\n<pre><section>v2\u91cc\u9762\u968f\u673a\u6311\u900910\u4e2a\u7ec6\u80de\u7cfb\u4f5c\u4e3a\u8981\u9884\u6d4b\u7684\u77e9\u9635\u3002\u8bfb\u5165\u8bad\u7ec3\u96c6\u7684\u8868\u8fbe\u91cf\u77e9\u9635<\/section><section>\u548c\u836f\u7269\u5904\u7406\u4fe1\u606f\u3002<\/section><\/pre>\n<\/div>\n<div class=\"code-card\">\n<div class=\"code-head\"><span>\u4ee3\u7801<\/span><\/div>\n<pre><code>install.packages(\"oncoPredict\")<\/code><code>rm(list = ls())  ## \u9b54\u5e7b\u64cd\u4f5c\uff0c\u4e00\u952e\u6e05\u7a7a~<\/code><code>options(stringsAsFactors = F)<\/code><code>library(oncoPredict)<\/code><code>library(data.table)<\/code><code>library(gtools)    <\/code><code>library(reshape2)<\/code><code>library(ggpubr)<\/code><code>th=theme(axis.text.x = element_text(angle = 45,vjust = 0.5))<\/code><code>dir='.\/DataFiles\/Training Data\/'<\/code><code>GDSC2_Expr = readRDS(file=file.path(dir,'GDSC2_Expr (RMA Normalized and Log Transformed).rds'))<\/code><code>GDSC2_Res = readRDS(file = file.path(dir,\"GDSC2_Res.rds\"))<\/code><code>GDSC2_Res &lt;- exp(GDSC2_Res) <\/code><code>testExpr&lt;- GDSC2_Expr[,sample(1:ncol(GDSC2_Expr),10)]testExpr[1:4,1:4]  <\/code><code>colnames(testExpr)=paste0('test',colnames(testExpr))<\/code><code>dim(testExpr) <\/code><code>calcPhenotype(trainingExprData = GDSC2_Expr,<\/code><code>              trainingPtype = GDSC2_Res,<\/code><code>              testExprData = testExpr,<\/code><code>              batchCorrect = 'eb',  #   \"eb\" for ComBat  <\/code><code>              powerTransformPhenotype = TRUE,<\/code><code>              removeLowVaryingGenes = 0.2,<\/code><code>              minNumSamples = 10, <\/code><code>              printOutput = TRUE, <\/code><code>              removeLowVaringGenesFrom = 'rawData' )<\/code><code>#\u89e3\u8bfb\u836f\u7269\u9884\u6d4b\u7ed3\u679c<\/code><code>library(data.table)testPtype &lt;- fread('.\/calcPhenotype_Output\/DrugPredictions.csv', data.table = F)testPtype[1:4, 1:4]<\/code><\/pre>\n<\/div>\n<h2>\u7ed3\u679c\u5e94\u8be5\u5982\u4f55\u89e3\u91ca<\/h2>\n<p>\u836f\u7269\u654f\u611f\u6027\u5206\u6790\u53ef\u4ee5\u5e2e\u52a9\u7814\u6df1\u5165\u4e86\u89e3\u836f\u7269\u7684\u4f5c\u7528\u673a\u5236\u3002\u901a\u8fc7\u5206\u6790\u4e0d\u540c\u57fa\u56e0\u8868\u8fbe\u5206\u7ec4\u7684\u836f\u7269\u654f\u611f\u6027\u5dee\u5f02\uff0c\u53ef\u4ee5\u63ed\u793a\u836f\u7269\u4e0e\u7279\u5b9a\u751f\u7269\u5b66\u8fc7\u7a0b\u548c\u9014\u5f84\u4e4b\u95f4\u7684\u5173\u8054\uff0c\u4ece\u800c\u5e2e\u52a9\u89e3\u91ca\u836f\u7269\u7684\u6cbb\u7597\u6548\u679c\u3002\u4e0b\u671f\u5c06\u4e3a\u4f60\u5e26\u6765\u66f4\u591aR\u8bed\u8a00\u7684\u9a9a\u64cd\u4f5c\u6280\u5de7\uff0c\u4ee5\u4e0b\u63a8\u8350\u7684\u662f\u4e00\u4e2a\u591a\u529f\u80fd\u7684\u751f\u4fe1\u5e73\u53f0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u6587\u641e\u5b9a\u751f\u4fe1\u5206\u6790\u5f3a\u52a9\u653b-\u836f\u654f\u5206\u6790(pRRophetic\u548concoPredict\u5305) \u5c0f\u5e08\u59b9 \u751f\u4fe1\u679c 2024-03-28 19:00:40 \u8f6c\u81ea\u516c\u4f17\u53f7\uff1aR\u8bed\u8a00\u5b66\u5f92http:\/\/mp.weixin.qq.com\/s?__biz=Mzg5MDk3Mzg4OA==\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-57255","post","type-post","status-publish","format-standard","hentry","category-part"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/57255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/comments?post=57255"}],"version-history":[{"count":3,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/57255\/revisions"}],"predecessor-version":[{"id":65433,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/57255\/revisions\/65433"}],"wp:attachment":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media?parent=57255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/categories?post=57255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/tags?post=57255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}