annotate bamCorrelate.xml @ 26:2ad3b027dfcd draft

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