view 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 source

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")
}