annotate bamCorrelate.xml @ 28:f7712a057440 draft

new bugfix release
author bgruening
date Wed, 02 Apr 2014 09:15:44 -0400
parents bf1b1dcdd67b
children 3a2aab18a217
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
1 <tool id="deeptools_bamCorrelate" name="bamCorrelate" version="@WRAPPER_VERSION@.0">
26
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
2 <description>correlates pairs of BAM files</description>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
3 <expand macro="requirements" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
4 <expand macro="stdio" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
5 <macros>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
6 <token name="@BINARY@">bamCorrelate</token>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
7 <import>deepTools_macros.xml</import>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
8 </macros>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
9 <command>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
10 #set files=[]
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
11 #set labels=[]
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
12
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
13 @multiple_input_bams@
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
14
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
15 bamCorrelate
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
16
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
17 $mode.modeOpt
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
18
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
19 @THREADS@
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
20
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
21 --bamfiles #echo " ".join($files)
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
22 --labels #echo " ".join($labels)
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
23 --fragmentLength $fragmentLength
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
24 --corMethod $corMethod
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
25
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
26 --plotFile $outFileName
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
27
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
28 #if $output.showOutputSettings == "yes"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
29 --outRawCounts '$outFileRawCounts'
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
30 --outFileCorMatrix '$outFileCorMatrix'
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
31 --plotFileFormat $output.outFileFormat
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
32 #else:
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
33 --plotFileFormat 'png'
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
34 #end if
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
35
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
36 #if $mode.modeOpt == "bins":
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
37 --binSize '$mode.binSize'
28
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
38 --distanceBetweenBins '$mode.distanceBetweenBins'
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
39 $mode.doNotRemoveOutliers
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
40
26
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
41 #else:
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
42 --BED $mode.region_file
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
43 #end if
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
44
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
45 #### options available in both modes
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
46 #if str($mode.region.value) != '':
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
47 --region '$mode.region'
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
48 #end if
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
49
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
50 #if $mode.advancedOpt.showAdvancedOpt == "yes":
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
51
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
52 $mode.advancedOpt.doNotExtendPairedEnds
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
53 $mode.advancedOpt.ignoreDuplicates
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
54 $mode.advancedOpt.includeZeros
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
55
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
56 #if $mode.advancedOpt.minMappingQuality:
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
57 --minMappingQuality '$mode.advancedOpt.minMappingQuality'
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
58 #end if
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
59
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
60 #if $mode.advancedOpt.zMin:
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
61 --zMin $mode.advancedOpt.zMin
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
62 #end if
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
63 #if $mode.advancedOpt.zMax:
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
64 --zMax $mode.advancedOpt.zMax
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
65 #end if
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
66 --colorMap '$mode.advancedOpt.colorMap'
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
67
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
68 #end if
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
69 </command>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
70
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
71 <inputs>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
72 <expand macro="multiple_input_bams" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
73
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
74 <param name="fragmentLength" type="integer" value="300" min="1"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
75 label="Length of the average fragment size"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
76 help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length."/>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
77
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
78 <param name="corMethod" type="select" label="Correlation method">
28
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
79 <option value="spearman" selected="True">Spearman</option>
26
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
80 <option value="pearson">Pearson</option>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
81 </param>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
82
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
83 <conditional name="mode">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
84 <param name="modeOpt" type="select" label="Choose computation mode"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
85 help="In the bins mode, the correlation is computed based on equal length bins. In the BED file mode, as list of genomic regions in BED format has to be given. For each region in the BED file the number of overlapping reads is counted in each of the BAM files. Then the correlation is computed.">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
86 <option value="bins" selected="true">Bins</option>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
87 <option value="BED-file">Limit correlation to certain regions (BED file)</option>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
88 </param>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
89 <when value="bins">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
90 <param name="binSize" type="integer" value="10000" min="1"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
91 label="Bin size in bp"
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
92 help="Length in base pairs for a window used to sample the genome."/>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
93
28
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
94 <param name="distanceBetweenBins" type="integer" value="0" min="0"
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
95 label="Distance between bins"
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
96 help="By default, bamCorrelate considers consecutive bins of
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
97 the specified 'Bin size'. However, to reduce the
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
98 computation time, a larger distance between bins can
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
99 by given. Larger distances result in less bins being
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
100 considered"/>
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
101
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
102 <param name="doNotRemoveOutliers" type="boolean"
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
103 truevalue="--doNotRemoveOutliers" falsevalue="" label="Do not filter outliers"
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
104 help="By default, bins with very large counts are removed.
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
105 By setting this option, outliers will not be
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
106 removed. Bins with unusually large counts normally
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
107 correspond to regions in the genome that accumulate
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
108 lot of reads like satellite regions. If outliers are not
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
109 removed the pearson correlation will wrongly report a
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
110 very high correlation; that's why, by default,
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
111 bamCorrelate tries to remove outliers using
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
112 the median absolute deviation (MAD) method applying a
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
113 threshold of 200 to only consider extremely large
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
114 deviations from the median."/>
f7712a057440 new bugfix release
bgruening
parents: 27
diff changeset
115
26
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
116 <expand macro="bamCorrelate_mode_actions" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
117 </when>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
118 <when value="BED-file">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
119 <param name="region_file" type="data" format="bed" label="Region file in BED format" help="Correlation is computed for the number of reads that overlap such regions."/>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
120 <expand macro="bamCorrelate_mode_actions" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
121 </when>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
122
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
123 </conditional>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
124
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
125 <conditional name="output">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
126 <param name="showOutputSettings" type="select" label="Show advanced output settings" >
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
127 <option value="no" selected="true">no</option>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
128 <option value="yes">yes</option>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
129 </param>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
130 <when value="no" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
131 <when value="yes">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
132 <expand macro="input_image_file_format"/>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
133 <param name="saveRawCounts" type="boolean" label="Save the bin counts"/>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
134 <param name="saveCorMatrix" type="boolean" label="Save the correlation matrix"/>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
135 </when>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
136 </conditional>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
137
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
138 </inputs>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
139 <outputs>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
140 <expand macro="output_image_file_format" />
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
141 <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
142 <filter>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
143 ((
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
144 output['showOutputSettings'] == 'yes' and
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
145 output['saveRawCounts'] is True
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
146 ))
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
147 </filter>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
148 </data>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
149 <data format="tabular" name="outFileCorMatrix" label="${tool.name} on ${on_string}: correlation matrix">
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
150 <filter>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
151 ((
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
152 output['showOutputSettings'] == 'yes' and
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
153 output['saveCorMatrix'] is True
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
154 ))
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
155 </filter>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
156 </data>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
157 </outputs>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
158 <help>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
159
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
160 **What it does**
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
161
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
162 This tool is useful to assess the overall similarity of different BAM files. A typical application
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
163 is to check the correlation between replicates or published data sets.
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
164
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
165 The tool splits the genomes into bins of given length. For each bin, the number of reads
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
166 found in each BAM file is counted and a correlation (either Pearson or Spearman) is computed for all
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
167 pairs of BAM files. Finally, a heatmap is drawn based on the similarity of the samples.
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
168
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
169
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
170 .. image:: $PATH_TO_IMAGES/QC_bamCorrelate_humanSamples.png
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
171 :alt: Heatmap of RNA Polymerase II ChIP-seq
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
172
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
173
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
174 You can find more details on the bamCorrelate wiki page: https://github.com/fidelram/deepTools/wiki/QC#wiki-bamCorrelate
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
175
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
176
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
177 **Output files**:
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
178
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
179 - **diagnostic plot**: clustered heatmap displaying the values for each pair-wise correlation, see below for an example
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
180 - data matrix (optional): if you want to plot the correlation values using a different program, e.g. R, this matrix can be used
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
181
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
182
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
183 -----
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
184
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
185 @REFERENCES@
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
186
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
187 </help>
2ad3b027dfcd Uploaded
bgruening
parents:
diff changeset
188 </tool>