title: cBioPortal的原始数据获取 tags: [] id: '1680' categories:
cBioPortal中的文章相关数据都存放在这里:https://github.com/cBioPortal/datahub/tree/master/public
wget https://github.com/cBioPortal/datahub/raw/master/public/prad_su2c_2019/data_mrna_seq_fpkm_capture.txt
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]
}
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))]
write.csv(t(log1p(d[c('RPLP0', 'GAPDH'),])), file='prad_su2c_2019.csv.csv')