Mercurial > repos > testtool > geo_data
comparison getMETAdata/getMETAdata.R @ 71:81b5c08c21e1 draft
Uploaded
author | testtool |
---|---|
date | Mon, 14 Aug 2017 09:44:57 -0400 |
parents | |
children | cb14dbc2fd60 |
comparison
equal
deleted
inserted
replaced
70:759073309c9c | 71:81b5c08c21e1 |
---|---|
1 require("data.table", quietly = TRUE) | |
2 require("GEOquery", quietly = TRUE) | |
3 | |
4 | |
5 options(warn = -1) | |
6 options("download.file.method"="wget") | |
7 args <- commandArgs(trailingOnly = TRUE) | |
8 GSMTable = args[1] | |
9 MetaTable = args[2] | |
10 | |
11 TAB = fread(GSMTable) | |
12 | |
13 | |
14 if (is.null(TAB)) { | |
15 stop("Must specify input files") | |
16 } else { | |
17 options(download.file.method.GEOquery = "wget") | |
18 | |
19 | |
20 GEODataTable <- getGEO(TAB$ID[1], getGPL = FALSE) | |
21 MetaData <- data.frame(Meta(GEODataTable)) | |
22 | |
23 write.table(MetaData, MetaTable, row.names = FALSE, sep = "\t") | |
24 } | |
25 |