Mercurial > repos > sblanck > smagexp
diff ImportDataFromMatrix.R @ 6:3ce32282f6a4 draft
planemo upload for repository https://github.com/sblanck/smagexp/tree/master/smagexp_tools commit 228bd64b01f184d5d8ebc9f65fe0add2d45ed4fe
author | sblanck |
---|---|
date | Tue, 26 Jun 2018 08:54:45 -0400 |
parents | 1024245abc70 |
children |
line wrap: on
line diff
--- 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("<h2>Venn diagram</h2>"),file.conn) #writeLines(c("<img src='venn.png'><br/><br/>"),file.conn) #writeLines(c("</body></html>"),file.conn) -#close(file.conn) \ No newline at end of file +#close(file.conn)