diff getMETAdata/getMETAdata.R @ 71:81b5c08c21e1 draft

Uploaded
author testtool
date Mon, 14 Aug 2017 09:44:57 -0400
parents
children cb14dbc2fd60
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/getMETAdata/getMETAdata.R	Mon Aug 14 09:44:57 2017 -0400
@@ -0,0 +1,25 @@
+require("data.table", quietly = TRUE)
+require("GEOquery", quietly = TRUE)
+
+
+options(warn = -1)
+options("download.file.method"="wget")
+args <- commandArgs(trailingOnly = TRUE)
+GSMTable = args[1]
+MetaTable = args[2]
+
+TAB = fread(GSMTable)
+
+
+if (is.null(TAB)) {
+  stop("Must specify input files")
+} else {
+  options(download.file.method.GEOquery = "wget") 
+
+
+  GEODataTable <- getGEO(TAB$ID[1], getGPL = FALSE)
+  MetaData <- data.frame(Meta(GEODataTable))
+
+  write.table(MetaData, MetaTable, row.names = FALSE, sep = "\t")
+}
+