comparison calculate_contrast_threshold.xml @ 0:7371bb087d86 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/calculate_contrast_threshold commit 6ba8e678f8cedabaf9b4759cddb81b8b3cd9ec31"
author iuc
date Wed, 11 Sep 2019 09:28:55 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:7371bb087d86
1 <tool id="calculate_contrast_threshold" name="Calculate Contrast threshold" version="1.0.0">
2 <description>from tag pileup CDT
3 </description>
4 <requirements>
5 <requirement type="package" version="1.15.4">numpy</requirement>
6 <requirement type="package" version="3.7.4">python</requirement>
7 </requirements>
8 <command detect_errors="exit_code">
9 <![CDATA[
10 python '$__tool_directory__/calculate_contrast_threshold.py' -i '$input_file'
11
12 ## Setting the quantile values properly.
13 #if str($quantile_type.quantile_type_selector) == "b_option":
14 -q '${quantile_type.quantile}'
15 -m '${quantile_type.min_contrast}'
16 #else if str($quantile_type.quantile_type_selector) == "t_option":
17 -t '${quantile_type.quantile2}'
18 #end if
19
20 -d '$header' -s '$start_col' -r '$row_num' -l '$col_num'
21 ]]>
22 </command>
23
24 <inputs>
25 <param name="input_file" argument="-i" type="data" format="txt" label="Pileup Data Matrix "/>
26 <param name="header" argument="-d" type="boolean" truevalue="T" falsevalue="F" checked="true" label="Does the input file have a Header ?" help="Standard CDT file have headers."/>
27 <param name="start_col" argument="-s" type="integer" value="2" label="Valid Data Start Column" help="Valid data values start from this column"/>
28 <param name="col_num" argument="-l" type="integer" value="300" label="Plot Width in pixels" help="Equal to the heatmap width you plan to create"/>
29 <param name="row_num" argument="-r" type="integer" value="600" label="Plot Height in pixels" help="Equal to the heatmap height you plan to create"/>
30
31
32 <conditional name="quantile_type">
33 <param name="quantile_type_selector" type="select" display="radio" label="Choose the Contrast paramter">
34 <option value="b_option" selected="true">Calculate thresholds from data (-b)</option>
35 <option value="t_option">Enforce absolute thresholds (-t)
36 </option>
37 </param>
38
39 <when value="b_option">
40 <param name="quantile" argument="-b" type="float" min="0" max="100" value="95" label="Quantile" help="Enter your quantile value above."/>
41 <param name="min_contrast" type="float" min="0" value="0" label="Minimum upper limit after Quantile calculation" help="This value will be used as the upper limit if the calculated quantile is below this value" argument="-m"/>
42 </when>
43
44 <when value="t_option">
45 <param name="quantile2" argument="-t" type="float" min="0" value="0.0" label="Absolute tag threshold" help="Enter your custom tag threshold value above. takes real values (>= 0)"/>
46 </when>
47 </conditional>
48
49 </inputs>
50
51 <outputs>
52 <data name="threshold_output" format="txt" from_work_dir="calcThreshold.txt"/>
53 </outputs>
54
55 <tests>
56 <test>
57 <param name="input_file" value="sample.tabular"/>
58 <param name="header" value="T"/>
59 <param name="start_col" value="2"/>
60 <param name="col_num" value="300"/>
61 <param name="row_num" value="600"/>
62 <conditional name="quantile_type">
63 <param name="quantile_type_selector" value="b_option"/>
64 <param name="quantile" value="95"/>
65 <param name="min_contrast" value="5"/>
66 </conditional>
67 <output name="threshold_output" file="calcThreshold_b.txt" />
68 </test>
69 <test>
70 <param name="input_file" value="sample.tabular"/>
71 <param name="header" value="T"/>
72 <param name="start_col" value="2"/>
73 <param name="col_num" value="300"/>
74 <param name="row_num" value="600"/>
75 <conditional name="quantile_type">
76 <param name="quantile_type_selector" value="t_option"/>
77 <param name="quantile2" value="10.0"/>
78 </conditional>
79 <output name="threshold_output" file="calcThreshold_t.txt" />
80 </test>
81 </tests>
82
83 <help>
84 <![CDATA[
85
86 **What it does**
87
88 ----
89
90 Calculates a contrast threshold from the CDT file generated by ``tag_pileup_frequency``. The calculated values are then used to set a uniform contrast for all the heatmaps generated downstream.
91
92 **Choosing Plot Width & Height**
93
94 If your trying to create heatmaps with dimensions (Width x Height)px = (300 x 600)px. Use Plot width = 300, height = 600. This not only helps in generating unbiased heatmaps but also helps in reusing the calculated contrasts for heatmaps of same dimensions.
95
96 **Understanding contrast parameters**
97
98 `-b`
99
100 Calculates a percentile value (for example 95th percentile) from the input CDT data matrix to report upper-limit and lower-limit for setting heatmap contrasts.
101
102 Also can set a minimum upper-limit to fall-back, incase the calculated percentile is <= specified minimum.
103
104 `-t`
105
106 Takes the absolute value entered and reports an upper_limit and lower_limit.
107
108 ]]>
109 </help>
110
111 <citations>
112 <citation type="bibtex">
113 @unpublished{None,
114 author = {Kuntala, Prashant Kumar and Lai, William KM },
115 title = {None},
116 year = {None},
117 eprint = {None},
118 url = {http://www.pughlab.psu.edu/}
119 }</citation>
120 </citations>
121
122 </tool>