# HG changeset patch # User sblanck # Date 1516009808 18000 # Node ID a4015af2ae12cb2fb670f94d3079f4cbde7b0163 # Parent c08d47a36c1ff4c621c22077d8180ce12696c55d planemo upload for repository https://github.com/sblanck/smagexp/tree/master/smagexp_tools commit a25677963b28019d4434bbe411b28168c912d71d diff -r c08d47a36c1f -r a4015af2ae12 MetaMA.R --- 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]) diff -r c08d47a36c1f -r a4015af2ae12 MetaMA.xml --- a/MetaMA.xml Sat Dec 16 10:46:19 2017 -0500 +++ b/MetaMA.xml Mon Jan 15 04:50:08 2018 -0500 @@ -22,6 +22,7 @@ Rscript ${__tool_directory__}/MetaMA.R --input $input + --species $species --htmloutput $result_html --htmloutputpath $result_html.extra_files_path --htmltemplate ${__tool_directory__}/MetaMa_tpl.html @@ -30,6 +31,18 @@ + + + + + + + + + + + +