23
|
1 <tool id="deeptools_bamCorrelate" name="bamCorrelate" version="1.0.4">
|
0
|
2 <description>correlates pairs of BAM files</description>
|
|
3 <expand macro="requirements" />
|
10
|
4 <expand macro="stdio" />
|
0
|
5 <macros>
|
18
|
6 <token name="@BINARY@">bamCorrelate</token>
|
0
|
7 <import>deepTools_macros.xml</import>
|
|
8 </macros>
|
|
9 <command>
|
|
10 #set files=[]
|
|
11 #set labels=[]
|
|
12
|
|
13 @multiple_input_bams@
|
|
14
|
|
15 bamCorrelate
|
|
16
|
5
|
17 $mode.modeOpt
|
3
|
18
|
0
|
19 @THREADS@
|
|
20
|
|
21 --bamfiles #echo " ".join($files)
|
|
22 --labels #echo " ".join($labels)
|
|
23 --fragmentLength $fragmentLength
|
|
24 --corMethod $corMethod
|
|
25
|
10
|
26 --plotFile $outFileName
|
0
|
27
|
16
|
28 #if $output.showOutputSettings == "yes"
|
0
|
29 --outRawCounts '$outFileRawCounts'
|
|
30 --outFileCorMatrix '$outFileCorMatrix'
|
10
|
31 --plotFileFormat $output.outFileFormat
|
|
32 #else:
|
|
33 --plotFileFormat 'png'
|
0
|
34 #end if
|
|
35
|
5
|
36 #if $mode.modeOpt == "bins":
|
|
37 --binSize '$mode.binSize'
|
|
38 --numberOfSamples '$mode.numberOfSamples'
|
|
39 #else:
|
|
40 --BED $mode.region_file
|
|
41 #end if
|
|
42
|
18
|
43 #### options available in both modes
|
|
44 #if str($mode.region.value) != '':
|
|
45 --region '$mode.region'
|
|
46 #end if
|
0
|
47
|
18
|
48 #if $mode.advancedOpt.showAdvancedOpt == "yes":
|
0
|
49
|
|
50 $mode.advancedOpt.doNotExtendPairedEnds
|
|
51 $mode.advancedOpt.ignoreDuplicates
|
|
52 $mode.advancedOpt.includeZeros
|
|
53
|
|
54 #if $mode.advancedOpt.minMappingQuality:
|
|
55 --minMappingQuality '$mode.advancedOpt.minMappingQuality'
|
|
56 #end if
|
|
57
|
|
58 #if $mode.advancedOpt.zMin:
|
|
59 --zMin $mode.advancedOpt.zMin
|
|
60 #end if
|
|
61 #if $mode.advancedOpt.zMax:
|
|
62 --zMax $mode.advancedOpt.zMax
|
|
63 #end if
|
|
64 --colorMap '$mode.advancedOpt.colorMap'
|
|
65
|
|
66 #end if
|
|
67 </command>
|
|
68
|
|
69 <inputs>
|
|
70 <expand macro="multiple_input_bams" />
|
|
71
|
|
72 <param name="fragmentLength" type="integer" value="300" min="1"
|
|
73 label="Length of the average fragment size"
|
|
74 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."/>
|
|
75
|
|
76 <param name="corMethod" type="select" label="Correlation method">
|
|
77 <option value="pearson">Pearson</option>
|
|
78 <option value="spearman">Spearman</option>
|
|
79 </param>
|
|
80
|
|
81 <conditional name="mode">
|
|
82 <param name="modeOpt" type="select" label="Choose computation mode"
|
|
83 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.">
|
|
84 <option value="bins" selected="true">Bins</option>
|
|
85 <option value="BED-file">Limit correlation to certain regions (BED file)</option>
|
|
86 </param>
|
|
87 <when value="bins">
|
|
88 <param name="binSize" type="integer" value="10000" min="1"
|
|
89 label="Bin size in bp"
|
|
90 help="Length in base pairs for a window used to sample the genome."/>
|
|
91
|
|
92 <param name="numberOfSamples" type="integer" value="100000" min="1"
|
|
93 label="Number of samples"
|
|
94 help="Number of samples taken from the genome to compute the scaling factors"/>
|
|
95 <expand macro="bamCorrelate_mode_actions" />
|
|
96 </when>
|
|
97 <when value="BED-file">
|
|
98 <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."/>
|
|
99 <expand macro="bamCorrelate_mode_actions" />
|
|
100 </when>
|
|
101
|
|
102 </conditional>
|
|
103
|
16
|
104 <conditional name="output">
|
|
105 <param name="showOutputSettings" type="select" label="Show advanced output settings" >
|
0
|
106 <option value="no" selected="true">no</option>
|
|
107 <option value="yes">yes</option>
|
|
108 </param>
|
|
109 <when value="no" />
|
|
110 <when value="yes">
|
11
|
111 <expand macro="input_image_file_format"/>
|
0
|
112 <param name="saveRawCounts" type="boolean" label="Save the bin counts"/>
|
|
113 <param name="saveCorMatrix" type="boolean" label="Save the correlation matrix"/>
|
|
114 </when>
|
|
115 </conditional>
|
|
116
|
|
117 </inputs>
|
|
118 <outputs>
|
11
|
119 <expand macro="output_image_file_format" />
|
0
|
120 <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
|
16
|
121 <filter>
|
|
122 ((
|
|
123 output['showOutputSettings'] == 'yes' and
|
|
124 output['saveRawCounts'] is True
|
|
125 ))
|
|
126 </filter>
|
0
|
127 </data>
|
|
128 <data format="tabular" name="outFileCorMatrix" label="${tool.name} on ${on_string}: correlation matrix">
|
16
|
129 <filter>
|
|
130 ((
|
|
131 output['showOutputSettings'] == 'yes' and
|
|
132 output['saveCorMatrix'] is True
|
|
133 ))
|
|
134 </filter>
|
0
|
135 </data>
|
|
136 </outputs>
|
|
137 <help>
|
|
138
|
|
139 **What it does**
|
|
140
|
|
141 This tool is useful to assess the overall similarity of different BAM files. A typical application
|
|
142 is to check the correlation between replicates or published data sets.
|
|
143
|
|
144 The tool splits the genomes into bins of given length. For each bin, the number of reads
|
24
|
145 found in each BAM file is counted and a correlation (either Pearson or Spearman) is computed for all
|
|
146 pairs of BAM files. Finally, a heatmap is drawn based on the similarity of the samples.
|
0
|
147
|
|
148
|
|
149 .. image:: $PATH_TO_IMAGES/QC_bamCorrelate_humanSamples.png
|
|
150 :alt: Heatmap of RNA Polymerase II ChIP-seq
|
|
151
|
|
152
|
24
|
153 You can find more details on the bamCorrelate wiki page: https://github.com/fidelram/deepTools/wiki/QC#wiki-bamCorrelate
|
18
|
154
|
|
155
|
0
|
156 **Output files**:
|
|
157
|
24
|
158 - **diagnostic plot**: clustered heatmap displaying the values for each pair-wise correlation, see below for an example
|
|
159 - data matrix (optional): if you want to plot the correlation values using a different program, e.g. R, this matrix can be used
|
0
|
160
|
|
161
|
|
162 -----
|
|
163
|
|
164 @REFERENCES@
|
|
165
|
|
166 </help>
|
|
167 </tool>
|