8
|
1 GSMTable <- ("test-data/GSMTable.txt")
|
|
2 write.table(samples, GSMTable, row.names = FALSE, sep = "\t")
|
|
3 ?write.table
|
|
4 GSE <- "GSE51547"
|
|
5 search1 <- entrez_search(db = "gds", term = GSE, retmax = 1)
|
|
6 require("rentrez", quietly = TRUE)
|
|
7 search1 <- entrez_search(db = "gds", term = GSE, retmax = 1)
|
|
8 rec2 <- entrez_summary(db = "gds",
|
|
9 id = search1$ids,
|
|
10 version = "2.0")
|
|
11 extract <- extract_from_esummary(rec2,rownames(summary(rec2)))
|
|
12 samples <- extract$samples
|
|
13 colnames(samples)[which(names(samples) == "accession")] <- "ID"
|
|
14 colnames(samples)[which(names(samples) == "title")] <- "Phenotype"
|
|
15 write.table(samples, GSMTable, row.names = FALSE, sep = "\t",quote = FALSE)
|
|
16 write.table(samples, file=GSMTable.txt, row.names = FALSE, sep = "\t",quote = FALSE)
|
|
17 write.table(samples, file="GSMTable.txt", row.names = FALSE, sep = "\t",quote = FALSE)
|