comparison bamCorrelate.xml @ 0:d957e25e18a3 draft

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