annotate wiggle_correlation_in_bed.xml @ 0:3d1097835b2f draft default tip

Imported from capsule None
author jjohnson
date Mon, 22 Sep 2014 11:54:41 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
1 <tool name="Multiple wiggle files correlation in given regions" id="correlation_dataset_bed" version="0.1.0">
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
2 <description>Calculate the correlation coefficient on the genome scale using one bed file and multiple wiggle / bigwig files</description>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
3 <macros>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
4 <import>corr_macros.xml</import>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
5 </macros>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
6 <expand macro="requirements" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
7 <command>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
8 #if $maxscore and $minscore and ( $minscore > $maxscore ):
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
9 echo "maxscore has to be greater than minscore!"
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
10 exit 1;
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
11 #end if
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
12 #if $wfile1.extension == "wig"
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
13 wig_correlation_in_bed_file.py -d $wfile1.metadata.dbkey -m $method
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
14 #elif $wfile1.extension == "bigwig"
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
15 bigwig_correlation_in_bed_file.py
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
16 #end if
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
17 #if $maxscore.value
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
18 --max-score $maxscore
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
19 #end if
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
20 #if $minscore.value
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
21 --min-score $minscore
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
22 #end if
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
23 $heatmap -z $size -f PDF -r tmp.r
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
24 -b $bfile
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
25 -w $wfile1 -l '$wlabel1' -w $wfile2 -l '$wlabel2'
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
26 #for $m in $more
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
27 -w $m.wig -l "$m.label"
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
28 #end for
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
29 &amp;> $log &amp;&amp;
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
30 cp tmp.r $rscript &amp;&amp;
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
31 #if $imagetype.__str__ == "PNG":
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
32 convert tmp.r.pdf tmp.r.png &amp;&amp;
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
33 cp tmp.r.png $output
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
34 #else
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
35 cp tmp.r.pdf $output
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
36 #end if
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
37 </command>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
38 <inputs>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
39 <param name="bfile" type="data" format="bed" label="BED file(100,000 lines max)" >
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
40 <validator type="unspecified_build" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
41 </param>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
42 <param format="wig,bigwig" name="wfile1" type="data" label="Wiggle / bigwig file 1">
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
43 <validator type="unspecified_build" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
44 </param>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
45 <param name="wlabel1" type="text" label="Wiggle / bigwig label 1" optional="false">
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
46 <validator type="length" message="must be between 1 and 255 characters" min="1" max="255"/>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
47 </param>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
48 <param format="wig,bigwig" name="wfile2" type="data" label="Wiggle / bigwig file 2">
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
49 <validator type="unspecified_build" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
50 </param>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
51 <param name="wlabel2" type="text" label="Wiggle / bigwig label 2" optional="false">
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
52 <validator type="length" message="must be between 1 and 255 characters" min="1" max="255"/>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
53 </param>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
54 <repeat name="more" title="wiggle / bigwig file">
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
55 <param format="wig,bigwig" name="wig" type="data" label="Select another wiggle / bigwig file"/>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
56 <param name="label" type="text" label="Wiggle / bigwig label" optional="false">
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
57 <validator type="length" message="must be between 1 and 255 characters" min="1" max="255"/>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
58 </param>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
59 </repeat>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
60 <param name="method" type="select" label="method:" help="method to process the paired two sets of data in the sampling step." >
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
61 <option value="mean" selected="true">mean</option>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
62 <option value="median">median</option>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
63 <option value="sample">sample</option>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
64 </param>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
65 <param name="maxscore" type="float" label="Max Score" help="Maximum score in the calculation (optional)" value="10000" optional="true"/>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
66 <param name="minscore" type="float" label="Min Score" help="Minimum score in the calculation (optional)" value="-10000" optional="true"/>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
67 <param name="heatmap" type="boolean" label="Draw Heatmap instead?" checked="no"
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
68 truevalue="-H" falsevalue=" " />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
69 <param name="size" type="integer" label="image Size" value="10" help="Image size in inch. It must be ge 5 and le 20. Default: 10">
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
70 <validator type="in_range" max="20" min="5" message="image Size is out of range, image Size has to be between 5 to 20" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
71 </param>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
72 <param type="select" name="imagetype" display="radio" label="Image Type">
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
73 <option value="PDF">PDF format</option>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
74 <option value="PNG">PNG format</option>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
75 </param>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
76 </inputs>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
77 <outputs>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
78 <data format="png" name="output">
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
79 <change_format>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
80 <when input="imagetype" value="PDF" format="pdf" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
81 </change_format>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
82 </data>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
83 <data format="txt" name="log" label="correlation job log" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
84 <data format="txt" name="rscript" label="correlation job rscript" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
85 </outputs>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
86 <expand macro="stdio"/>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
87 <tests>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
88 <test>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
89 <param name="bfile" value="peaks.bed" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
90 <param name="wfile1" value="control.wig" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
91 <param name="wlabel1" value="control" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
92 <param name="wfile2" value="treatment.wig" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
93 <param name="wlabel2" value="treatment" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
94 <param name="step" value="100" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
95 <param name="method" value="mean" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
96 <param name="maxscore" value="10000" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
97 <param name="minscore" value="-10000" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
98 <param name="size" value="10" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
99 <param name="imagetype" value="PDF" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
100 <output name="log">
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
101 <assert_contents>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
102 <has_text_matching expression="Please check tmp.r" />
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
103 </assert_contents>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
104 </output>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
105 </test>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
106 </tests>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
107 <help>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
108 This tool calculates the correlation coefficient values on the genome
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
109 scale using many scores datasets (many wiggle files) within the
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
110 regions given by a BED file. The tool is written by Tao Liu. It calls
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
111 R for plotting.
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
112
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
113 .. class:: infomark
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
114
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
115 **TIP:** This can be used to evaluate the correlation between
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
116 biological replicates at union peak regions.
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
117
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
118 .. class:: warningmark
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
119
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
120 **NEED IMPROVEMENT**
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
121
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
122 -----
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
123
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
124 **Parameters**
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
125
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
126 - **BED file** contains the regions to extract scores.
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
127 - **Wiggle file 1 and 2** are the first two wiggle files to be
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
128 included. These two are required.
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
129 - **Wiggle label 1 and 2** are the first two wiggle labels to be
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
130 plotted in the correlation plot.
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
131 - **wiggle files** click *Add new wiggle file* to add more wiggle
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
132 files and labels.
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
133 - **Genome/Assembly** Genome assembly to be used. The tool will
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
134 download the chromosome information from UCSC database.
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
135 - **Method** When scores are extracted for a region in BED file, a
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
136 method will be applied to calculate a value to represent this
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
137 region. Options are *median* to use the median value or *mean* to
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
138 use the average value.
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
139 - **Max Score** is the maximum score in the calculation. It's
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
140 optional.
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
141 - **Min Score** is the minimum score in the calculation. It's
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
142 optional.
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
143
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
144 -----
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
145
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
146 **Outputs**
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
147
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
148 - **PNG file** is the correlation plot
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
149 - **LOG file** for job log. If you see errors, please attached this in
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
150 the bug report
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
151
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
152 </help>
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
153
3d1097835b2f Imported from capsule None
jjohnson
parents:
diff changeset
154 </tool>