如果GEO数据集的表型信息部分串列了

最近搜到GSE21653,提取临床信息部分,发现,多个行出现了,列之间串掉了;

  • 本来是把整个下载到的.gz文件解压后,在txt部分作了更改,但发现串的行数还挺多的;觉得,grep进行行的提取比较合适;
a<- do.call(rbind,lapply(1:nrow(pd21653),
                     function(x){
  dfs<- as.numeric(gsub('.+:','',grep('dfs evt',pd21653[x,],value=T)))[1]
  dfs.time<- as.numeric(gsub('.+:','',grep('dfs time',pd21653[x,],value=T)))[1]
  patient<- pd21653[x,2]
  re<- c(patient,OS,OS.time)
  names(re) <- c('patient','d'f's','dfs.time')
  return(re)}
  )
  )

你可能感兴趣的:(如果GEO数据集的表型信息部分串列了)