# HG changeset patch # User sblanck # Date 1530017685 14400 # Node ID 3ce32282f6a404f741a43c79317e546ce24f2b94 # Parent ca46ad51fe5a76add555db41606d04adda8b8500 planemo upload for repository https://github.com/sblanck/smagexp/tree/master/smagexp_tools commit 228bd64b01f184d5d8ebc9f65fe0add2d45ed4fe diff -r ca46ad51fe5a -r 3ce32282f6a4 ImportDataFromMatrix.R --- a/ImportDataFromMatrix.R Thu Mar 22 11:16:24 2018 -0400 +++ b/ImportDataFromMatrix.R Tue Jun 26 08:54:45 2018 -0400 @@ -10,7 +10,6 @@ ##### Read options option_list=list( make_option("--input",type="character",default="NULL",help="rdata object containing eset object"), - make_option("--conditions",type="character",default=NULL,help="Text file summarizing conditions of the experiment (required)"), make_option("--normalization",type="character",default=NULL,help="log2 transformation"), make_option("--annotations",type="character",default="NULL",help="rdata object containing eset object"), make_option("--rdataoutput",type="character",default="NULL",help="output rdata object containing eset object"), @@ -30,18 +29,10 @@ stop("input required.", call.=FALSE) } -if(is.null(opt$conditions)){ - print_help(opt_parser) - stop("conditions input required.", call.=FALSE) -} #loading libraries -suppressPackageStartupMessages(require(GEOquery)) - suppressPackageStartupMessages(require(Biobase)) -suppressPackageStartupMessages(require(GEOquery)) -suppressPackageStartupMessages(require(GEOmetadb)) suppressPackageStartupMessages(require(limma)) suppressPackageStartupMessages(require(jsonlite)) suppressPackageStartupMessages(require(affy)) @@ -60,19 +51,16 @@ dir.create(result.path, showWarnings = TRUE, recursive = FALSE) data=as.matrix(read.table(file = dataFile,row.names=1,header=TRUE)) -conditions=read.table(file=conditionsFile,sep = "\t",row.names=1) +#conditions=read.table(file=conditionsFile,sep = "\t",row.names=1) htmlfile=readChar(result.template, file.info(result.template)$size) -colnames(conditions)=c("source_name_ch1","description") -phenodata<-new("AnnotatedDataFrame",data=conditions) +#colnames(conditions)=c("source_name_ch1","description") +#phenodata<-new("AnnotatedDataFrame",data=conditions) -head(data) -conditions - -eset=ExpressionSet(assayData=data,phenoData=phenodata,annotation=annotation) +eset=ExpressionSet(assayData=data,annotation=annotation) if (normalization == "quantile") { - eset <- normalize.ExpressionSet.quantiles(eset, transfn="log2") + eset <- normalize.ExpressionSet.quantiles(eset, transfn="log") } else if (normalization == "log2") { exprs(eset) = log2(exprs(eset)) } @@ -111,4 +99,4 @@ #writeLines(c("