Mercurial > repos > testtool > get_gsm
comparison getGSMdata/.Rhistory @ 8:5e1d49abfc99 draft
Uploaded
author | testtool |
---|---|
date | Mon, 06 Feb 2017 05:17:56 -0500 |
parents | |
children | c1bf6f112a19 |
comparison
equal
deleted
inserted
replaced
7:3eb1073638d7 | 8:5e1d49abfc99 |
---|---|
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) |