annotate computeGCBias.xml @ 110:fa6ef7619bbd draft default tip

Uploaded
author bgruening
date Mon, 26 Jan 2015 13:10:16 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
110
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
1 <tool id="deeptools_computeGCBias" name="computeGCBias" version="@WRAPPER_VERSION@.0">
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
2 <description>to see whether your samples should be normalized for GC bias</description>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
3 <expand macro="requirements" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
4 <expand macro="stdio" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
5 <macros>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
6 <token name="@BINARY@">computeGCBias</token>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
7 <import>deepTools_macros.xml</import>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
8 </macros>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
9 <command>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
10 <![CDATA[
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
11 ln -s $bamInput local_bamInput.bam;
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
12 ln -s $bamInput.metadata.bam_index local_bamInput.bam.bai;
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
13
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
14 computeGCBias
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
15 @THREADS@
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
16
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
17 --bamfile 'local_bamInput.bam'
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
18 --GCbiasFrequenciesFile $outFileName
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
19 --fragmentLength $fragmentLength
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
20
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
21 @reference_genome_source@
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
22
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
23 #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
24 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
25 #else:
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
26 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
27 #end if
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
28
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
29 #if str($region).strip() != '':
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
30 --region '$region'
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
31 #end if
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
32
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
33 #if $advancedOpt.showAdvancedOpt == "yes":
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
34
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
35 --sampleSize '$advancedOpt.sampleSize'
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
36 --regionSize '$advancedOpt.regionSize'
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
37
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
38 #if $advancedOpt.filterOut:
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
39 --filterOut $advancedOpt.filterOut
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
40 #end if
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
41
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
42 #if $advancedOpt.extraSampling:
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
43 --extraSampling $advancedOpt.extraSampling
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
44 #end if
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
45 #end if
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
46
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
47 #if str($image_format) != 'none':
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
48 --biasPlot $outImageName
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
49 --plotFileFormat $image_format
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
50 #end if
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
51 ]]>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
52 </command>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
53 <inputs>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
54 <param name="bamInput" format="bam" type="data" label="BAM file"
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
55 help="The BAM file must be sorted."/>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
56
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
57 <expand macro="reference_genome_source" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
58 <expand macro="effectiveGenomeSize" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
59 <expand macro="fragmentLength" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
60 <expand macro="region_limit_operation" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
61
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
62 <conditional name="advancedOpt">
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
63 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
64 <option value="no" selected="true">no</option>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
65 <option value="yes">yes</option>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
66 </param>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
67 <when value="no" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
68 <when value="yes">
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
69 <param name="sampleSize" type="integer" value="50000000" min="1"
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
70 label="Number of sampling points to be considered" help="(--sampleSize)" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
71 <param name="regionSize" type="integer" value="300" min="1"
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
72 label="Region size"
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
73 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. (--regionSize)"/>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
74 <param name="filterOut" type="data" format="bed" optional="true"
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
75 label="BED file containing genomic regions to be excluded from the estimation of the correction"
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
76 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. (--filterOut)" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
77 <param name="extraSampling" type="data" format="bed" optional="true"
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
78 label="BED file containing genomic regions for which extra sampling is required because they are underrepresented in the genome"
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
79 help="(--extraSampling)" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
80 </when>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
81 </conditional>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
82 <param name="image_format" type="select"
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
83 label="GC bias plot"
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
84 help="If given, a diagnostic image summarizing the GC bias found on the sample will be created. (--plotFileFormat)">
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
85 <option value="none">No image</option>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
86 <option value="png" selected="true">Image in png format</option>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
87 <option value="pdf">Image in pdf format</option>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
88 <option value="svg">Image in svg format</option>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
89 <option value="eps">Image in eps format</option>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
90 <option value="emf">Image in emf format</option>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
91 </param>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
92 </inputs>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
93 <outputs>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
94 <data name="outFileName" format="tabular" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
95 <data name="outImageName" format="png" label="${tool.name} GC-bias Plot">
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
96 <filter>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
97 ((
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
98 image_format != 'none'
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
99 ))
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
100 </filter>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
101 <change_format>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
102 <when input="image_format" value="pdf" format="pdf" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
103 <when input="image_format" value="svg" format="svg" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
104 <when input="image_format" value="eps" format="eps" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
105 <when input="image_format" value="emf" format="emf" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
106 </change_format>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
107 </data>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
108 </outputs>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
109 <tests>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
110 <test>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
111 <param name="bamInput" value="phiX.bam" ftype="bam" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
112 <param name="image_format" value="png" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
113 <param name="showAdvancedOpt" value="yes" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
114 <param name="regionSize" value="1" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
115 <param name="fragmentLength" value="100" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
116 <param name="ref_source" value="history" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
117 <param name="input1" value="phiX.2bit" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
118 <output name="outFileName" file="computeGCBias_result1.tabular" ftype="tabular" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
119 <output name="outImageName" file="computeGCBias_result1.png" ftype="png" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
120 </test>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
121 </tests>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
122 <help>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
123 <![CDATA[
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
124 **What it does**
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
125
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
126 This tool computes the GC bias using the method proposed by Benjamini and Speed (2012) Nucleic Acids Res. (see below for more explanations)
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
127 The output is used to plot the bias and can also be used later on to correct the bias with the tool correctGCbias.
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
128 There are two plots produced by the tool: a boxplot showing the absolute read numbers per genomic-GC bin and an x-y plot
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
129 depicting the ratio of observed/expected reads per genomic GC content bin.
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
130
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
131 -----
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
132
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
133 **Summary of the method used**
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
134
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
135 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
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
136 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...).
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
137 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
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
138 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).
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
139 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.
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
140 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
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
141 usually shows a significant bias towards reads with high GC content (>50%)
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
142
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
143 .. image:: $PATH_TO_IMAGES/QC_GCplots_input.png
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
144
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
145
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
146 You can find more details on the computeGCBias wiki page: computeGCBias wiki: https://github.com/fidelram/deepTools/wiki/QC#wiki-computeGCbias
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
147
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
148
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
149 **Output files**:
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
150
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
151 - Diagnostic plot
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
152
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
153 - box plot of absolute read numbers per genomic GC bin
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
154 - x-y plot of observed/expected read ratios per genomic GC content bin
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
155
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
156 - Data matrix
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
157
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
158 - to be used for GC correction with correctGCbias
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
159
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
160
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
161 -----
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
162
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
163 @REFERENCES@
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
164 ]]>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
165 </help>
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
166 <expand macro="citations" />
fa6ef7619bbd Uploaded
bgruening
parents:
diff changeset
167 </tool>