Mercurial > repos > iuc > reshape2_melt
annotate melt.xml @ 0:317ed0ee8bf2 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
author | iuc |
---|---|
date | Tue, 22 Aug 2017 07:44:24 -0400 |
parents | |
children |
rev | line source |
---|---|
0
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
1 <tool id="melt" name="melt" version="@VERSION@"> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
2 <description>collapse combinations of variables:values to single lines</description> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
3 <macros> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
4 <import>macros.xml</import> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
5 </macros> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
6 <expand macro="requirements"></expand> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
7 <command detect_errors="exit_code"><![CDATA[ |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
8 cat '$script' && |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
9 Rscript '$script' |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
10 ]]></command> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
11 <configfiles> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
12 <configfile name="script"><![CDATA[ |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
13 ## Setup R error handling to go to stderr |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
14 options(show.error.messages=F, error=function(){cat(geterrmessage(),file=stderr());q("no",1,F)}) |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
15 loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
16 |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
17 ## Import library |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
18 library("reshape2") |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
19 |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
20 input <- read.csv('$input', sep='\t', header=TRUE) |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
21 minput <- melt(input) |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
22 write.table(minput, "output.tabular", sep="\t", quote=FALSE, row.names=FALSE) |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
23 |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
24 ]]></configfile> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
25 </configfiles> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
26 <inputs> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
27 <param name="input" type="data" format="tabular" label="Input should have column headers - these will be the variable IDs that are summarized"/> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
28 |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
29 </inputs> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
30 <outputs> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
31 <data name="output" format="tabular" from_work_dir="output.tabular"/> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
32 </outputs> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
33 <tests> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
34 <test> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
35 <param name="input" value="mtcars.txt"/> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
36 <output name="output" file="melt_result1.tabular"/> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
37 </test> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
38 </tests> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
39 <help><![CDATA[ |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
40 This tool will apply the melt function of the reshape2 R package. |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
41 |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
42 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 |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
43 |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
44 ]]></help> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
45 <citations> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
46 <citation type="bibtex"> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
47 @Article{, |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
48 title = {Reshaping Data with the {reshape} Package}, |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
49 author = {Hadley Wickham}, |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
50 journal = {Journal of Statistical Software}, |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
51 year = {2007}, |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
52 volume = {21}, |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
53 number = {12}, |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
54 pages = {1--20}, |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
55 url = {http://www.jstatsoft.org/v21/i12/}, |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
56 } |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
57 </citation> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
58 </citations> |
317ed0ee8bf2
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 62172bde663955b6c3cb86dc22c47739824f014a
iuc
parents:
diff
changeset
|
59 </tool> |