8
|
1 args <- commandArgs(trailingOnly = TRUE)
|
26
|
2
|
8
|
3 GSE = args[1]
|
|
4 GSMTable = args[2]
|
|
5
|
26
|
6
|
|
7
|
8
|
8 search1 <- entrez_search(db = "gds", term = GSE, retmax = 1)
|
|
9
|
|
10 rec2 <- entrez_summary(db = "gds",
|
|
11 id = search1$ids,
|
|
12 version = "2.0")
|
|
13
|
|
14 extract <- extract_from_esummary(rec2,rownames(summary(rec2)))
|
|
15
|
|
16 samples <- extract$samples
|
|
17 colnames(samples)[which(names(samples) == "accession")] <- "ID"
|
|
18 colnames(samples)[which(names(samples) == "title")] <- "Phenotype"
|
|
19
|
26
|
20 samples$Phenotype<-gsub("\\s", "",samples$Phenotype)
|
8
|
21
|
26
|
22 write.table(samples, GSMTable, row.names = FALSE,quote=FALSE,sep="\t")
|
|
23
|
|
24
|