comparison bamCorrelate.xml @ 0:b2886915ce68 draft default tip

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