45
|
1 <tool id="deeptools_bamCorrelate" name="bamCorrelate" version="@WRAPPER_VERSION@.0">
|
10
|
2 <description>correlates pairs of BAM files</description>
|
|
3 <expand macro="requirements" />
|
22
|
4 <expand macro="stdio" />
|
10
|
5 <macros>
|
34
|
6 <token name="@BINARY@">bamCorrelate</token>
|
10
|
7 <import>deepTools_macros.xml</import>
|
|
8 </macros>
|
|
9 <command>
|
52
|
10 <![CDATA[
|
10
|
11 #set files=[]
|
|
12 #set labels=[]
|
1
|
13
|
14
|
14 @multiple_input_bams@
|
1
|
15
|
10
|
16 bamCorrelate
|
|
17
|
16
|
18 $mode.modeOpt
|
15
|
19
|
10
|
20 @THREADS@
|
1
|
21
|
10
|
22 --bamfiles #echo " ".join($files)
|
|
23 --labels #echo " ".join($labels)
|
|
24 --fragmentLength $fragmentLength
|
|
25 --corMethod $corMethod
|
|
26
|
24
|
27 --plotFile $outFileName
|
10
|
28
|
29
|
29 #if $output.showOutputSettings == "yes"
|
10
|
30 --outRawCounts '$outFileRawCounts'
|
|
31 --outFileCorMatrix '$outFileCorMatrix'
|
24
|
32 --plotFileFormat $output.outFileFormat
|
|
33 #else:
|
|
34 --plotFileFormat 'png'
|
10
|
35 #end if
|
|
36
|
16
|
37 #if $mode.modeOpt == "bins":
|
|
38 --binSize '$mode.binSize'
|
45
|
39 --distanceBetweenBins '$mode.distanceBetweenBins'
|
|
40 $mode.doNotRemoveOutliers
|
|
41
|
16
|
42 #else:
|
|
43 --BED $mode.region_file
|
|
44 #end if
|
|
45
|
30
|
46 #### options available in both modes
|
|
47 #if str($mode.region.value) != '':
|
|
48 --region '$mode.region'
|
|
49 #end if
|
10
|
50
|
30
|
51 #if $mode.advancedOpt.showAdvancedOpt == "yes":
|
10
|
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
|
0
|
60
|
10
|
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'
|
1
|
68
|
10
|
69 #end if
|
52
|
70 ]]>
|
10
|
71 </command>
|
|
72
|
|
73 <inputs>
|
|
74 <expand macro="multiple_input_bams" />
|
|
75
|
52
|
76 <param name="fragmentLength" type="integer" value="200" min="1"
|
14
|
77 label="Length of the average fragment size"
|
52
|
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)"/>
|
10
|
79
|
14
|
80 <param name="corMethod" type="select" label="Correlation method">
|
45
|
81 <option value="spearman" selected="True">Spearman</option>
|
14
|
82 <option value="pearson">Pearson</option>
|
|
83 </param>
|
0
|
84
|
14
|
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."/>
|
0
|
95
|
45
|
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
|
14
|
118 <expand macro="bamCorrelate_mode_actions" />
|
|
119 </when>
|
|
120 <when value="BED-file">
|
52
|
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."/>
|
14
|
124 <expand macro="bamCorrelate_mode_actions" />
|
|
125 </when>
|
|
126 </conditional>
|
0
|
127
|
29
|
128 <conditional name="output">
|
|
129 <param name="showOutputSettings" type="select" label="Show advanced output settings" >
|
14
|
130 <option value="no" selected="true">no</option>
|
|
131 <option value="yes">yes</option>
|
|
132 </param>
|
|
133 <when value="no" />
|
|
134 <when value="yes">
|
25
|
135 <expand macro="input_image_file_format"/>
|
14
|
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>
|
0
|
140
|
10
|
141 </inputs>
|
|
142 <outputs>
|
25
|
143 <expand macro="output_image_file_format" />
|
10
|
144 <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
|
29
|
145 <filter>
|
|
146 ((
|
|
147 output['showOutputSettings'] == 'yes' and
|
|
148 output['saveRawCounts'] is True
|
|
149 ))
|
|
150 </filter>
|
10
|
151 </data>
|
|
152 <data format="tabular" name="outFileCorMatrix" label="${tool.name} on ${on_string}: correlation matrix">
|
29
|
153 <filter>
|
|
154 ((
|
|
155 output['showOutputSettings'] == 'yes' and
|
|
156 output['saveCorMatrix'] is True
|
|
157 ))
|
|
158 </filter>
|
10
|
159 </data>
|
|
160 </outputs>
|
52
|
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>
|
10
|
175 <help>
|
52
|
176 <![CDATA[
|
0
|
177 **What it does**
|
|
178
|
5
|
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
|
6
|
182 The tool splits the genomes into bins of given length. For each bin, the number of reads
|
43
|
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.
|
0
|
185
|
10
|
186
|
|
187 .. image:: $PATH_TO_IMAGES/QC_bamCorrelate_humanSamples.png
|
|
188 :alt: Heatmap of RNA Polymerase II ChIP-seq
|
|
189
|
|
190
|
43
|
191 You can find more details on the bamCorrelate wiki page: https://github.com/fidelram/deepTools/wiki/QC#wiki-bamCorrelate
|
37
|
192
|
|
193
|
10
|
194 **Output files**:
|
|
195
|
43
|
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
|
10
|
198
|
|
199
|
0
|
200 -----
|
|
201
|
10
|
202 @REFERENCES@
|
52
|
203 ]]>
|
10
|
204 </help>
|
48
|
205 <expand macro="citations" />
|
0
|
206 </tool>
|