cBioPortal的原始数据获取

cBioPortal中的文章相关数据都存放在这里:https://github.com/cBioPortal/datahub/tree/master/public

第一步 获取需要的数据

1
wget https://github.com/cBioPortal/datahub/raw/master/public/prad_su2c_2019/data_mrna_seq_fpkm_capture.txt

第二步 读取数据

1
2
3
4
5
6
7
8
9
10
f_name_dedup <- function(lc_exp, rowN = 1){
res <- lc_exp[-rowN]
lc_tmp = by(res,
lc_exp[[rowN]],
function(x) rownames(x)[which.max(rowMeans(x))])
lc_probes = as.character(lc_tmp)
res = lc_exp[rownames(res) %in% lc_probes,]
rownames(res) <- res[[rowN]]
res[-rowN]
}
1
2
3
d <- read.table('data_mrna_seq_fpkm_capture.txt', header = T, sep = '\t', allowEscapes = T)
d <- f_name_dedup(d)
d <- d[,order(colnames(d))]

第三步 导出需要的基因

1
write.csv(t(log1p(d[c('RPLP0', 'GAPDH'),])), file='prad_su2c_2019.csv.csv')

cBioPortal的原始数据获取
https://b.limour.top/1680.html
Author
Limour
Posted on
February 18, 2022
Licensed under