annotate computeGCBias.xml @ 20:69ff16ba27bd draft

Uploaded
author bgruening
date Mon, 03 Feb 2014 15:47:26 -0500
parents 5ea8782d650c
children f85c85597f95
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
1 <tool id="deeptools_computeGCBias" name="computeGCBias" version="1.0.3">
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>
18
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
6 <token name="@BINARY@">computeGCBias</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>
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
10 ln -s $bamInput local_bamInput.bam;
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
11 ln -s $bamInput.metadata.bam_index local_bamInput.bam.bai;
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
12
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
13 computeGCBias
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
20
69ff16ba27bd Uploaded
bgruening
parents: 18
diff changeset
28 #if str($region).strip() != '':
18
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
29 --region 'region'
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
30 #end if
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
31
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
32 #if $advancedOpt.showAdvancedOpt == "yes":
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
33
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
34 --sampleSize '$advancedOpt.sampleSize'
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
35 --regionSize '$advancedOpt.regionSize'
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
36
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
37 #if $advancedOpt.filterOut:
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
38 --filterOut $advancedOpt.filterOut
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
39 #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
40
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
41 #if $advancedOpt.extraSampling:
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
42 --extraSampling $advancedOpt.extraSampling
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
43 #end if
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
44 #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
45
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
46 #if str($image_format) != 'none':
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
47 --biasPlot $outImageName
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
48 --plotFileFormat $image_format
5
c54d31467be4 Uploaded
bgruening
parents: 0
diff changeset
49 #end if
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
50 </command>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
51 <inputs>
9
c53a73b8eef9 Uploaded
bgruening
parents: 5
diff changeset
52 <param name="bamInput" format="bam" type="data" label="BAM file"
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
53 help="The BAM file must be sorted."/>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
54
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
55 <expand macro="reference_genome_source" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
56 <expand macro="effectiveGenomeSize" />
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
57
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
58 <param name="fragmentLength" type="integer" value="300" min="1"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
59 label="Fragment length used for the sequencing"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
60 help ="If paired-end reads are used, the fragment length is computed from the BAM file."/>
18
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
61
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
62 <expand macro="region_limit_operation" />
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
63
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
64 <conditional name="advancedOpt">
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
65 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
66 <option value="no" selected="true">no</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
67 <option value="yes">yes</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
68 </param>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
69 <when value="no" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
70 <when value="yes">
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
71 <param name="sampleSize" type="integer" value="50000000" min="1"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
72 label="Number of sampling points to be considered" />
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
73
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
74 <param name="regionSize" type="integer" value="300" min="1"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
75 label="Region size"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
76 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."/>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
77
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
78 <param name="filterOut" type="data" format="bed" optional="true"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
79 label="BED file containing genomic regions to be excluded from the estimation of the correction"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
80 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." />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
81 <param name="extraSampling" type="data" format="bed" optional="true"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
82 label="BED file containing genomic regions for which extra sampling is required because they are underrepresented in the genome"
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
83 help="" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
84 </when>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
85 </conditional>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
86 <param name="image_format" type="select" label="GC bias plot" help="If given, a diagnostic image summarizing the GC bias found on the sample will be created.">
16
16310f8b24d5 Uploaded
bgruening
parents: 13
diff changeset
87 <option value="none">No image</option>
16310f8b24d5 Uploaded
bgruening
parents: 13
diff changeset
88 <option value="png" selected="true">Image in png format</option>
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
89 <option value="pdf">Image in pdf format</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
90 <option value="svg">Image in svg format</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
91 <option value="eps">Image in eps format</option>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
92 <option value="emf">Image in emf format</option>
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
93 </param>
13
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
94 </inputs>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
95 <outputs>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
96 <data format="tabular" name="outFileName" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
97 <data format="png" name="outImageName" label="${tool.name} GC-bias Plot">
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
98 <filter>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
99 ((
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
100 image_format != 'none'
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
101 ))
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
102 </filter>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
103 <change_format>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
104 <when input="image_format" value="pdf" format="pdf" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
105 <when input="image_format" value="svg" format="svg" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
106 <when input="image_format" value="eps" format="eps" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
107 <when input="image_format" value="emf" format="emf" />
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
108 </change_format>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
109 </data>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
110 </outputs>
b4c5dd45778a Uploaded
bgruening
parents: 10
diff changeset
111 <help>
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
112
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
113 **What it does**
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
114
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
115 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
116 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
117 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
118 depicting the ratio of observed/expected reads per genomic GC content bin.
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
119
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
120 -----
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
121
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
122 **Summary of the method used**
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
123
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
124 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
125 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
126 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
127 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
128 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
129 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
130 usually shows a significant bias towards reads with high GC content (>50%)
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
131
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
132 .. image:: $PATH_TO_IMAGES/QC_GCplots_input.png
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
133
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
134
18
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
135 You can find more details in the `computeGCBias wiki`_.
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
136
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
137 .. _computeGCBias wiki: https://github.com/fidelram/deepTools/wiki/QC#wiki-computeGCbias
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
138
5ea8782d650c Uploaded
bgruening
parents: 16
diff changeset
139
0
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
140 **Output files**:
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
141
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
142 - Diagnostic plot
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
143
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
144 - box plot of absolute read numbers per genomic GC bin
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
145 - x-y plot of observed/expected read ratios per genomic GC content bin
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
146
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
147 - Data matrix
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
148
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
149 - to be used for GC correction with correctGCbias
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
150
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 @REFERENCES@
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
155
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
156 </help>
d957e25e18a3 Uploaded
bgruening
parents:
diff changeset
157 </tool>