annotate computeGCBias.xml @ 11:baf4283e2d7f draft

Uploaded
author bgruening
date Sat, 14 Dec 2013 07:00:55 -0500
parents 135f3bae5c56
children b4c5dd45778a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
135f3bae5c56 Uploaded
bgruening
parents: 9
diff changeset
1 <tool id="deeptools_computeGCBias" name="computeGCBias" version="1.0.2">
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
2 <description>to see whether your samples should be normalized for GC bias</description>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
3 <expand macro="requirements" />
10
135f3bae5c56 Uploaded
bgruening
parents: 9
diff changeset
4 <expand macro="stdio" />
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
5 <macros>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
6 <import>deepTools_macros.xml</import>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
7 </macros>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
8 <command>
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
9 ln -s $bamInput local_bamInput.bam;
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
10 ln -s $bamInput.metadata.bam_index local_bamInput.bam.bai;
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
11
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
12 computeGCBias
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
13
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
14 @THREADS@
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
15
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
16 --bamfile 'local_bamInput.bam'
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
17 --GCbiasFrequenciesFile $outFileName
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
18 --fragmentLength $fragmentLength
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
19
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
20 @reference_genome_source@
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
21
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
22 #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
23 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
24 #else:
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
25 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
26 #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
27
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
28 #if $advancedOpt.showAdvancedOpt == "yes":
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
29 #if str($advancedOpt.region.value) != '':
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
30 --region '$advancedOpt.region'
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
31 #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
32
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
33 --sampleSize '$advancedOpt.sampleSize'
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
34 --regionSize '$advancedOpt.regionSize'
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
35
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
36 #if $advancedOpt.filterOut:
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
37 --filterOut $advancedOpt.filterOut
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
38 #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
39
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
40 #if $advancedOpt.extraSampling:
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
41 --extraSampling $advancedOpt.extraSampling
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
42 #end if
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
43 #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
44
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
45 #if $saveBiasPlot:
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
46 --biasPlot $biasPlot
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
47 #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
48
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
49 ## #if $output.showOutputSettings == "yes"
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
50 ## #if $output.saveBiasPlot:
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
51 ## --biasPlot biasPlot.png ;
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
52 ## mv biasPlot.png $biasPlot
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
53 ## #end if
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
54 ## #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
55
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
56 </command>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
57 <inputs>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
58
9
c53a73b8eef9 Uploaded
bgruening
parents: 5
diff changeset
59 <param name="bamInput" format="bam" type="data" label="BAM file"
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
60 help="The BAM file must be sorted."/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
61
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
62 <expand macro="reference_genome_source" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
63 <expand macro="effectiveGenomeSize" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
64
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
65 <param name="fragmentLength" type="integer" value="300" min="1"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
66 label="Fragment length used for the sequencing"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
67 help ="If paired-end reads are used, the fragment length is computed from the BAM file."/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
68
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
69 <conditional name="advancedOpt">
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
70 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
71 <option value="no" selected="true">no</option>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
72 <option value="yes">yes</option>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
73 </param>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
74 <when value="no" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
75 <when value="yes">
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
76 <param name="region" type="text" value=""
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
77 label="Region of the genome to limit the operation to"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
78 help="This is useful when testing parameters to reduce the computing time. The format is chr:start:end, for example &quot;chr10&quot; or &quot;chr10:456700:891000&quot;" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
79
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
80 <param name="sampleSize" type="integer" value="50000000" min="1"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
81 label="Number of sampling points to be considered" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
82
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
83 <param name="regionSize" type="integer" value="300" min="1"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
84 label="Region size"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
85 help ="To plot the reads per GC over a region, the size of the region is required (see below for more details of the mthod). By default, the bin size is set to 300 bp, which is close to the standard fragment size many sequencing applications. However, if the depth of sequencing is low, a larger bin size will be required, otherwise many bins will not overlap with any read."/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
86
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
87 <param name="filterOut" type="data" format="bed" optional="true"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
88 label="BED file containing genomic regions to be excluded from the estimation of the correction"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
89 help="Such regions usually contain repetitive regions and peaks that if included will bias the correction. It is recommended to filter out known repetitive regions if multi-reads (reads that map to more than one genomic position) were excluded. In the case of ChIP-seq data, it is recommended to first use a peak caller to identify and filter out the identified peaks." />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
90 <param name="extraSampling" type="data" format="bed" optional="true"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
91 label="BED file containing genomic regions for which extra sampling is required because they are underrepresented in the genome"
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
92 help="" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
93 </when>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
94 </conditional>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
95
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
96 <param name="saveBiasPlot" type="boolean" truevalue="--biasPlot" falsevalue="" checked="True" label="Save a diagnostic image summarizing the GC bias found on the sample"/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
97 <!--
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
98 <conditional name="output" >
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
99 <param name="showOutputSettings" type="select" label="Show additional output options" >
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
100 <option value="no" selected="true">no</option>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
101 <option value="yes">yes</option>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
102 </param>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
103 <when value="no" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
104 <when value="yes">
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
105 <param name="saveBiasPlot" type="boolean" label="Save a diagnostic image summarizing the GC bias found on the sample"/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
106 </when>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
107 </conditional>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
108 -->
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
109 </inputs>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
110 <outputs>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
111 <data format="tabular" name="outFileName" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
112 <data format="png" name="biasPlot" label="${tool.name} on ${on_string}: bias plot">
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
113 <filter>saveBiasPlot is True</filter>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
114 <!--<filter>(output['showOutputSettings'] == 'yes' and output['saveBiasPlot'] == True)</filter>-->
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
115 </data>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
116 </outputs>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
117 <help>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
118
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
119 **What it does**
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
120
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
121 This tool computes the GC bias using the method proposed by Benjamini and Speed (2012). Nucleic Acids Res. (see below for more explanations)
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
122 The output is used to plot the bias and can also be used later on to correct the bias with the tool correctGCbias.
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
123 There are two plots produced by the tool: a boxplot showing the absolute read numbers per genomic-GC bin and an x-y plot
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
124 depicting the ratio of observed/expected reads per genomic GC content bin.
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
125
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
126 -----
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
127
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
128 **Summary of the method used**
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
129
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
130 In order to estimate how many reads with what kind of GC content one should have sequenced, we first need to determine how many regions the specific
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
131 reference genome contains for each amount of GC content, i.e. how many regions in the genome have 50% GC (or 10% GC or 90% GC or...).
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
132 We then sample a large number of equally sized genome bins and count how many times we see a bin with 50% GC (or 10% GC or 90% or...). These EXPECTED values are independent of any
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
133 sequencing as it only depends on the respective reference genome (i.e. it will most likely vary between mouse and fruit fly due to their genome's different GC contents).
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
134 The OBSERVED values are based on the reads from the sequenced sample. Instead of noting how many genomic regions there are per GC content, we now count the reads per GC content.
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
135 In an ideal sample without GC bias, the ratio of OBSERVED/EXPECTED values should be close to 1 regardless of the GC content. Due to PCR (over)amplifications, the majority of ChIP samples
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
136 usually shows a significant bias towards reads with high GC content (>50%)
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
137
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
138 .. image:: $PATH_TO_IMAGES/QC_GCplots_input.png
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
139
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
140
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
141 **Output files**:
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
142
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
143 - Diagnostic plot
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
144
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
145 - box plot of absolute read numbers per genomic GC bin
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
146 - x-y plot of observed/expected read ratios per genomic GC content bin
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
147
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
148 - Data matrix
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
149
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
150 - to be used for GC correction with correctGCbias
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
151
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
152
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
153 -----
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
154
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
155 .. class:: infomark
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
156
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
157 @REFERENCES@
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
158
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
159 </help>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
160 </tool>