diff melt.xml @ 0:df64c1491508 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
author iuc
date Tue, 22 Aug 2017 07:29:32 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/melt.xml	Tue Aug 22 07:29:32 2017 -0400
@@ -0,0 +1,59 @@
+<tool id="melt" name="melt" version="@VERSION@">
+    <description>collapse combinations of variables:values to single lines</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"></expand>
+    <command detect_errors="exit_code"><![CDATA[
+cat '$script' &&
+Rscript '$script'
+    ]]></command>
+    <configfiles>
+        <configfile name="script"><![CDATA[
+## Setup R error handling to go to stderr
+options(show.error.messages=F, error=function(){cat(geterrmessage(),file=stderr());q("no",1,F)})
+loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")
+
+## Import library
+library("reshape2")
+
+input <- read.csv('$input', sep='\t', header=TRUE)
+minput <- melt(input)
+write.table(minput, "output.tabular", sep="\t", quote=FALSE, row.names=FALSE)
+
+        ]]></configfile>
+    </configfiles>
+    <inputs>
+        <param name="input" type="data" format="tabular" label="Input should have column headers - these will be the variable IDs that are summarized"/>
+       
+    </inputs>
+    <outputs>
+        <data name="output" format="tabular" from_work_dir="output.tabular"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="mtcars.txt"/>
+            <output name="output" file="melt_result1.tabular"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+This tool will apply the melt function of the reshape2 R package. 
+
+The melt function summarizes each unique variable:value combination on a single line. An example can be found here: http://www.statmethods.net/management/reshape.html
+
+    ]]></help>
+    <citations>
+        <citation type="bibtex">
+@Article{,
+    title = {Reshaping Data with the {reshape} Package},
+    author = {Hadley Wickham},
+    journal = {Journal of Statistical Software},
+    year = {2007},
+    volume = {21},
+    number = {12},
+    pages = {1--20},
+    url = {http://www.jstatsoft.org/v21/i12/},
+  }
+        </citation>
+    </citations>
+</tool>