Mercurial > repos > nml > csvtk_correlation
comparison corr.xml @ 0:62448f26c3fa draft default tip
"planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
author | nml |
---|---|
date | Tue, 19 May 2020 17:25:59 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:62448f26c3fa |
---|---|
1 <tool id="csvtk_correlation" name="csvtk-correlation" version="@VERSION@+@GALAXY_VERSION@"> | |
2 <description> calculate pearson correlation</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
6 <expand macro="requirements" /> | |
7 <expand macro="version_cmd" /> | |
8 <command detect_errors="exit_code"><![CDATA[ | |
9 | |
10 ################### | |
11 ## Start Command ## | |
12 ################### | |
13 | |
14 csvtk corr --num-cpus "\${GALAXY_SLOTS:-1}" | |
15 | |
16 ## Add additional flags as specified ## | |
17 ####################################### | |
18 $global_param.illegal_rows | |
19 $global_param.empty_rows | |
20 $global_param.header | |
21 $global_param.lazy_quotes | |
22 | |
23 ## Set Tabular input/output flag if input is tabular ## | |
24 ####################################################### | |
25 #if $in_1.is_of_type("tabular"): | |
26 -t -T | |
27 #end if | |
28 | |
29 ## Specify fields ## | |
30 #################### | |
31 -f '$in_text' | |
32 | |
33 ## Set Input ## | |
34 ############### | |
35 '$in_1' | |
36 | |
37 ## other ## | |
38 ########### | |
39 $ignore_nan | |
40 $log_values | |
41 $passthrough | |
42 | |
43 ## To output ## | |
44 ############### | |
45 &> corr | |
46 | |
47 ]]></command> | |
48 <inputs> | |
49 <expand macro="singular_input" /> | |
50 <param name="in_text" type="text" argument="-f" | |
51 label="Specify *two* column names" | |
52 help="Input the exact spelling of the two input column names wanted with a comma (,) separating them. Ex. 'Length,GC Content'"> | |
53 <expand macro="text_sanitizer" /> | |
54 </param> | |
55 <param name="ignore_nan" type="boolean" checked="false" argument="-i" | |
56 truevalue="-i" | |
57 falsevalue="" | |
58 label="Ignore non-numeric values in columns" | |
59 help="Needed to be set to yes to avoid returning NaN if there is a non-numeric value" | |
60 /> | |
61 <param name="log_values" type="boolean" checked="false" argument="-L" | |
62 truevalue="-L" | |
63 falsevalue="" | |
64 label="Log10 transformed Data" | |
65 help="Calcute correlations on Log10 transformed data" | |
66 /> | |
67 <param name="passthrough" type="boolean" checked="false" argument="-x" | |
68 truevalue="-x" | |
69 falsevalue="" | |
70 label="passthrough mode (forward input to output)" | |
71 /> | |
72 <expand macro="global_parameters" /> | |
73 </inputs> | |
74 <outputs> | |
75 <data format_source="in_1" name="corr" from_work_dir="corr" label="${in_1.name} correlation of ${in_text}" /> | |
76 </outputs> | |
77 <tests> | |
78 <test> | |
79 <param name="in_1" value="XY_converted.csv" /> | |
80 <param name="in_text" value="X,Y" /> | |
81 <output name="corr" value="corr_1.csv" /> | |
82 </test> | |
83 <test> | |
84 <param name="in_1" value="XY_converted.tsv" /> | |
85 <param name="in_text" value="X,Y" /> | |
86 <param name="ignore_nan" value="true" /> | |
87 <param name="log_values" value="true" /> | |
88 <param name="passthrough" value="true" /> | |
89 <output name="corr" value="corr_2.tsv" /> | |
90 </test> | |
91 </tests> | |
92 <help><![CDATA[ | |
93 | |
94 Csvtk - Correlation Help | |
95 ------------------------ | |
96 | |
97 Info | |
98 #### | |
99 | |
100 Csvtk Correlation calculates the pearson correlation between two columns specified by the column header | |
101 | |
102 .. class:: warningmark | |
103 | |
104 Single quotes are not allowed in text inputs! | |
105 | |
106 @HELP_INPUT_DATA@ | |
107 | |
108 | |
109 Usage | |
110 ##### | |
111 | |
112 To run csvtk-correlation, all you need is a valid (as defined above) CSV or TSV file with two numeric columns that you want to | |
113 find the pearson correlation between. If the input data is Log10 transformed, remember to set the "Log10 transformed Data" | |
114 slider to "Yes" | |
115 | |
116 Output will be a singular line with the input column names, and the pearson correlation (integer between -1 to 1). | |
117 | |
118 | |
119 **Example Correlation Input** | |
120 | |
121 Input table: | |
122 | |
123 +-------+--------+ | |
124 | Group | Length | | |
125 +=======+========+ | |
126 | 1 | 1500 | | |
127 +-------+--------+ | |
128 | 2 | 1000 | | |
129 +-------+--------+ | |
130 | 1 | 1500 | | |
131 +-------+--------+ | |
132 | 3 | 2000 | | |
133 +-------+--------+ | |
134 | |
135 Our input for this would require us to specify our column input (-f) as "Group,Length" to allow the program to run | |
136 | |
137 Our output would then look as such: | |
138 | |
139 +-------+--------+--------+ | |
140 | Group | Length | 0.9999 | | |
141 +-------+--------+--------+ | |
142 | |
143 -------- | |
144 | |
145 | |
146 @HELP_COLUMNS@ | |
147 | |
148 | |
149 @HELP_END_STATEMENT@ | |
150 | |
151 | |
152 ]]></help> | |
153 <expand macro="citations" /> | |
154 </tool> |