changeset 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 c08d47a36c1f
children f953fdee364c
files MetaMA.R MetaMA.xml
diffstat 2 files changed, 26 insertions(+), 2 deletions(-) [+]
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])
--- 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 @@
 
     <inputs>
         <param format="rdata" name="input" multiple="true" type="data" optional="false" label="rdata files" help="rdata files containing the results of the analysis to be used in the meta-analysis"/>
+        <param name="species" type="select" optionnal="false" label="species" help="species for annotation">
+            <option value="org.Bt.eg.db">Bovine</option>
+            <option value="org.Cf.eg.db">Canine</option>
+            <option value="org.Gg.eg.db">Chicken</option>
+            <option value="org.Dm.eg.db">Fly</option>
+            <option value="org.Hs.eg.db">Human</option>
+            <option value="org.Mm.eg.db">Mouse</option>
+            <option value="org.Ss.eg.db">Pig</option>
+            <option value="org.Rn.eg.db">Rat</option>
+            <option value="org.Ce.eg.db">Worm</option>
+            <option value="org.Dr.eg.db">Zebrafish</option>
+        </param>
     </inputs>
 
     <outputs>