其他分享
首页 > 其他分享> > 大创

大创

作者:互联网

数据下载

rm(list = ls())
library(GEOquery)
setwd('D:\\陈思杰\\大创')
GSE=c("GSE85680","GSE106817","GSE110651",
      "GSE112264","GSE113486","GSE113740",
      "GSE119892","GSE122497","GSE124158",
      "GSE134108","GSE137140","GSE164174",
      "GSE139031")
# 从GEO下载上述所有数据集
data<-NULL
for(i in GSE){
  x<-paste(i,"<-getGEO(i,destdir='.')",sep='')
  eval(parse(text = x))
  y<-paste('names(',i,')',sep='')
  for(a in eval(parse(text = y))){
    z<-paste('data<-','c(','data,',i,'$`',a,'`)',sep='')
    eval(parse(text = z))
    names(data)[length(data)]<-a[1]
  }
}
rm(list =ls()[ls()!="data"])
data$`GSE85680-GPL18941_series_matrix.txt.gz`<-NULL
data$`GSE124158-GPL18941_series_matrix.txt.gz`<-NULL
data$`GSE134108-GPL18941_series_matrix.txt.gz`<-NULL
names(data)<-sub('-GPL21263','',names(data))
data$GSE85680_series_matrix.txt.gz<-NULL
save(data,file="data12.RData")

数据筛查

load("D:/陈思杰/大创/data12.RData")
for(name in names(data)){
  a<-sub('_series_matrix.txt.gz','',name)
  a<-sub('-','_',a)
  a<-paste(a,"<-pData(data[[name]])",sep='')
  eval(parse(text = a))
  rm(a);rm(name)
}
#GSE号
gse=c()
len=c(4046,147,1591,972,1817,66,5531,1370,71,3924,580,2934)
for(i in 1:12){
  gse=c(rep(GSE[i],len[i]),gse)
}

#GSM号
GSM01=GSE106817[,2]
GSM02=GSE110651[,2]
GSM03=GSE112264[,2]
GSM04=GSE113486[,2]
GSM05=GSE113740[,2]
GSM06=GSE119892[,2]
GSM07=GSE122497[,2]
GSM08=GSE124158[,2]
GSM09=GSE134108[,2]
GSM10=GSE137140[,2]
GSM11=GSE139031[,2]
GSM12=GSE164174[,2]

#age
AGE01=GSE106817[,32]
AGE02=GSE110651[,34]
AGE03=GSE112264[,36]
AGE04=GSE113486[,35]
AGE05=GSE113740[,43]
AGE06=GSE119892[,36]
AGE07=GSE122497[,38]
AGE08=GSE124158[,38]
AGE09=GSE134108[,36]
AGE10=GSE137140[,34]
AGE11=GSE139031[,31]
AGE12=GSE164174[,33]


#sex
SEX=rep(NA,4046)
SEX=rep(NA,147)
SEX=GSE112264[,41]
SEX=GSE113486[,39]
SEX=GSE113740[,53]
SEX=GSE119892[,39]
SEX=GSE122497[,41]
SEX=GSE124158[,39]
SEX=rep(NA,71)
SEX=GSE137140[,36]
SEX=GSE139031[,32]
SEX=GSE164174[,36]

#癌症分类TYPE
TYPE=as.character(GSE106817[,19])
TYPE=GSE110651[,35]
TYPE=GSE112264[,40]
TYPE=GSE113486[,36]
TYPE=GSE113740[,48]
TYPE=GSE119892[,37]
TYPE=GSE122497[,40]
TYPE=GSE124158[,40]
TYPE=sub('[0-9]+','',GSE134108[,1])
TYPE=GSE137140[,35]
TYPE=as.character(GSE139031[,19])
TYPE=GSE164174[,34]

#癌症stage
STAGE=GSE106817[,33]
STAGE=rep(NA,147)
STAGE=GSE112264[,37]
STAGE=GSE113486[,37]
STAGE=GSE113740[,51]
STAGE=rep(NA,66)
STAGE=GSE122497[,39]
STAGE=GSE124158[,42]
STAGE=rep(NA,71)
STAGE=GSE137140[,35]
STAGE=rep(NA,580)
STAGE=GSE164174[,37]

标签:GSE85680,数据,陈思杰,大创,data,下载
来源: https://www.cnblogs.com/csjsdyp/p/15442824.html