annotate bamCorrelate.xml @ 24:d7c9fd76e41e draft

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