changeset 5:5a39fa8a235a draft

planemo upload for repository https://github.com/caleb-easterly/galaxytools/peca
author caleb-easterly
date Thu, 22 Feb 2018 11:45:43 -0500
parents 07bd2582526b
children e16cd77cf9f7
files peca.R peca.xml
diffstat 2 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/peca.R	Thu Feb 22 11:35:33 2018 -0500
+++ b/peca.R	Thu Feb 22 11:45:43 2018 -0500
@@ -20,8 +20,11 @@
     group1_ind_file <- as.vector(as.matrix(read.csv(args[2], header = FALSE)[1, ]))
     group2_ind_file <- as.vector(as.matrix(read.csv(args[3], header = FALSE)[1, ]))
 
+    # test type
+    ttype <- args[4]
+
     # read 4th argument, which is output file name
-    out_file <- args[4]
+    out_file <- args[5]
 
     # get vectors of column names
     df_names <- colnames(quant_file)
@@ -30,7 +33,11 @@
  
     # run PECA_df
     # id column is first column (hard-coded)
-    results <- PECA_df(quant_file, group1_names, group2_names, id = df_names[1])
+    results <- PECA_df(quant_file,
+                group1_names,
+                group2_names,
+                type=ttype,
+                id = df_names[1])
 
     # put add protein names column
     results$prot <- row.names(results)
--- a/peca.xml	Thu Feb 22 11:35:33 2018 -0500
+++ b/peca.xml	Thu Feb 22 11:45:43 2018 -0500
@@ -7,12 +7,17 @@
         ## write groups to file
         echo '$group1' > group1.txt &&
         echo '$group2' > group2.txt && 
-        Rscript --vanilla '$__tool_directory__/peca.R' '$input' group1.txt group2.txt '$output'
+        Rscript --vanilla '$__tool_directory__/peca.R' '$input' group1.txt group2.txt '$test_type' '$output'
     ]]></command>
     <inputs>
         <param name="input" type="data" format="tabular"/>
         <param name="group1" type="data_column" data_ref="input" multiple="true"/>
         <param name="group2" type="data_column" data_ref="input" multiple="true"/> 
+        <param name="test_type" type="select">
+            <option value="t" selected="true">Standard t-test</option>
+            <option value="modt">Modified t-test</option>
+            <option value="rots">Reproducibility-optimized test statistic</option>
+        <param>
     </inputs>
     <outputs>
         <data format="tabular" name="output"/>
@@ -22,6 +27,7 @@
             <param name="input" value="test.tab" ftype="tabular"/>
             <param name="group1" value="2,3,4"/>
             <param name="group2" value="5,6,7"/>
+            <param name="test_type" value="t"/>
             <output name="output" file="out.tab" ftype="tabular"/>
         </test>
     </tests>