Mercurial > repos > sblanck > smagexp
diff MetaMA.R @ 20:a4015af2ae12 draft
planemo upload for repository https://github.com/sblanck/smagexp/tree/master/smagexp_tools commit a25677963b28019d4434bbe411b28168c912d71d
author | sblanck |
---|---|
date | Mon, 15 Jan 2018 04:50:08 -0500 |
parents | 56267e3293b2 |
children | f953fdee364c |
line wrap: on
line diff
--- a/MetaMA.R Sat Dec 16 10:46:19 2017 -0500 +++ b/MetaMA.R Mon Jan 15 04:50:08 2018 -0500 @@ -9,7 +9,8 @@ ##### Read options option_list=list( - make_option("--input",type="character",default="NULL",help="list of rdata objects containing eset objects"), + make_option("--input",type="character",default="NULL",help="List of rdata objects containing eset objects"), + make_option("--species",type="character",default="NULL",help="Species for annotations"), make_option("--htmloutput",type="character",default=NULL,help="Output html report"), make_option("--htmloutputpath",type="character",default="NULL",help="Path of output html report"), make_option("--htmltemplate",type="character",default=NULL,help="html template)") @@ -22,6 +23,10 @@ print_help(opt_parser) stop("input required.", call.=FALSE) } +if(is.null(opt$species)){ + print_help(opt_parser) + stop("input required.", call.=FALSE) +} #loading libraries @@ -32,6 +37,7 @@ suppressPackageStartupMessages(require(GEOquery)) listInput <- trimws( unlist( strsplit(trimws(opt$input), ",") ) ) +species=opt$species rdataList=list() condition1List=list() @@ -61,7 +67,12 @@ dev.off() } -library("org.Hs.eg.db") +if(!species %in% installed.packages()[,"Package"]) { + source("https://bioconductor.org/biocLite.R") + biocLite(species) +} + +#library("org.Hs.eg.db") x <- org.Hs.egUNIGENE mapped_genes <- mappedkeys(x) link <- as.list(x[mapped_genes])