annotate cast.xml @ 0:8bdfdef5fcb7 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:56 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
1 <tool id="cast" name="cast" version="@VERSION@">
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
2 <description>expand combinations of variables:values to columnar format</description>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
3 <macros>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
4 <import>macros.xml</import>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
5 </macros>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
6 <expand macro="requirements"></expand>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
7 <command detect_errors="exit_code"><![CDATA[
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
8 cat '$script' &&
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
9 Rscript '$script'
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
10 ]]></command>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
11 <configfiles>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
12 <configfile name="script"><![CDATA[
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
13 ## Setup R error handling to go to stderr
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
14 options(show.error.messages=F, error=function(){cat(geterrmessage(),file=stderr());q("no",1,F)})
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
15 loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
16
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
17 ## Import library
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
18 library("reshape2")
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
19
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
20 input <- read.csv('$input', sep='\t', header=TRUE)
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
21 cinput <- dcast(input, ... ~ variable)
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
22 write.table(cinput, "output.tabular", sep="\t", quote=FALSE, row.names=FALSE)
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
23
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
24 ]]></configfile>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
25 </configfiles>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
26 <inputs>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
27 <param name="input" type="data" format="tabular" label="Input should be molten data"/>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
28 </inputs>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
29 <outputs>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
30 <data name="output" format="tabular" from_work_dir="output.tabular"/>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
31 </outputs>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
32 <tests>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
33 <test>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
34 <param name="input" value="melt_result1.tabular"/>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
35 <output name="output" file="cast_result1.tabular"/>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
36 </test>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
37 </tests>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
38 <help><![CDATA[
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
39 This tool will apply the dcast function of the reshape2 R package. The input data should be in a 'long' format or molten by the melt tool. The output will be in a wide format.
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
40 The cast function expands each unique variable:value combination on a single line to columnar format. Documantation on the reshape2 package can be found here: https://cran.r-project.org/web/packages/reshape2/reshape2.pdf
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
41 ]]></help>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
42 <citations>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
43 <citation type="bibtex">
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
44 @Article{,
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
45 title = {Reshaping Data with the {reshape} Package},
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
46 author = {Hadley Wickham},
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
47 journal = {Journal of Statistical Software},
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
48 year = {2007},
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
49 volume = {21},
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
50 number = {12},
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
51 pages = {1--20},
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
52 url = {http://www.jstatsoft.org/v21/i12/},
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
53 }
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
54 </citation>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
55 </citations>
8bdfdef5fcb7 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reshape2 commit 6e466ce83e2e5c0dd0ba30356d0488cf74574b8f
iuc
parents:
diff changeset
56 </tool>