0
|
1 <tool id="deeptools_computeGCBias" name="computeGCBias" version="1.0.1">
|
|
2 <description>to see whether your samples should be normalized for GC bias</description>
|
|
3 <expand macro="requirements" />
|
|
4 <stdio>
|
|
5 <exit_code range="0" level="warning" description="Warning" />
|
|
6 </stdio>
|
|
7 <macros>
|
|
8 <import>deepTools_macros.xml</import>
|
|
9 </macros>
|
|
10 <command>
|
5
|
11 ln -s $bamInput local_bamInput.bam;
|
|
12 ln -s $bamInput.metadata.bam_index local_bamInput.bam.bai;
|
0
|
13
|
5
|
14 computeGCBias
|
0
|
15
|
5
|
16 @THREADS@
|
0
|
17
|
5
|
18 --bamfile 'local_bamInput.bam'
|
|
19 --GCbiasFrequenciesFile $outFileName
|
|
20 --fragmentLength $fragmentLength
|
0
|
21
|
5
|
22 @reference_genome_source@
|
0
|
23
|
5
|
24 #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
|
|
25 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
|
|
26 #else:
|
|
27 --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
|
|
28 #end if
|
0
|
29
|
5
|
30 #if $advancedOpt.showAdvancedOpt == "yes":
|
|
31 #if str($advancedOpt.region.value) != '':
|
|
32 --region '$advancedOpt.region'
|
|
33 #end if
|
0
|
34
|
5
|
35 --sampleSize '$advancedOpt.sampleSize'
|
|
36 --regionSize '$advancedOpt.regionSize'
|
|
37
|
|
38 #if $advancedOpt.filterOut:
|
|
39 --filterOut $advancedOpt.filterOut
|
|
40 #end if
|
0
|
41
|
5
|
42 #if $advancedOpt.extraSampling:
|
|
43 --extraSampling $advancedOpt.extraSampling
|
|
44 #end if
|
|
45 #end if
|
0
|
46
|
5
|
47 #if $saveBiasPlot:
|
|
48 --biasPlot $biasPlot
|
|
49 #end if
|
0
|
50
|
5
|
51 ## #if $output.showOutputSettings == "yes"
|
|
52 ## #if $output.saveBiasPlot:
|
|
53 ## --biasPlot biasPlot.png ;
|
|
54 ## mv biasPlot.png $biasPlot
|
|
55 ## #end if
|
|
56 ## #end if
|
0
|
57
|
|
58 </command>
|
|
59 <inputs>
|
|
60
|
9
|
61 <param name="bamInput" format="bam" type="data" label="BAM file"
|
0
|
62 help="The BAM file must be sorted."/>
|
|
63
|
|
64 <expand macro="reference_genome_source" />
|
|
65 <expand macro="effectiveGenomeSize" />
|
|
66
|
|
67 <param name="fragmentLength" type="integer" value="300" min="1"
|
|
68 label="Fragment length used for the sequencing"
|
|
69 help ="If paired-end reads are used, the fragment length is computed from the BAM file."/>
|
|
70
|
|
71 <conditional name="advancedOpt">
|
|
72 <param name="showAdvancedOpt" type="select" label="Show advanced options" >
|
|
73 <option value="no" selected="true">no</option>
|
|
74 <option value="yes">yes</option>
|
|
75 </param>
|
|
76 <when value="no" />
|
|
77 <when value="yes">
|
|
78 <param name="region" type="text" value=""
|
|
79 label="Region of the genome to limit the operation to"
|
|
80 help="This is useful when testing parameters to reduce the computing time. The format is chr:start:end, for example "chr10" or "chr10:456700:891000"" />
|
|
81
|
|
82 <param name="sampleSize" type="integer" value="50000000" min="1"
|
|
83 label="Number of sampling points to be considered" />
|
|
84
|
|
85 <param name="regionSize" type="integer" value="300" min="1"
|
|
86 label="Region size"
|
|
87 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."/>
|
|
88
|
|
89 <param name="filterOut" type="data" format="bed" optional="true"
|
|
90 label="BED file containing genomic regions to be excluded from the estimation of the correction"
|
|
91 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." />
|
|
92 <param name="extraSampling" type="data" format="bed" optional="true"
|
|
93 label="BED file containing genomic regions for which extra sampling is required because they are underrepresented in the genome"
|
|
94 help="" />
|
|
95 </when>
|
|
96 </conditional>
|
|
97
|
|
98 <param name="saveBiasPlot" type="boolean" truevalue="--biasPlot" falsevalue="" checked="True" label="Save a diagnostic image summarizing the GC bias found on the sample"/>
|
|
99 <!--
|
|
100 <conditional name="output" >
|
|
101 <param name="showOutputSettings" type="select" label="Show additional output options" >
|
|
102 <option value="no" selected="true">no</option>
|
|
103 <option value="yes">yes</option>
|
|
104 </param>
|
|
105 <when value="no" />
|
|
106 <when value="yes">
|
|
107 <param name="saveBiasPlot" type="boolean" label="Save a diagnostic image summarizing the GC bias found on the sample"/>
|
|
108 </when>
|
|
109 </conditional>
|
|
110 -->
|
|
111 </inputs>
|
|
112 <outputs>
|
|
113 <data format="tabular" name="outFileName" />
|
|
114 <data format="png" name="biasPlot" label="${tool.name} on ${on_string}: bias plot">
|
|
115 <filter>saveBiasPlot is True</filter>
|
|
116 <!--<filter>(output['showOutputSettings'] == 'yes' and output['saveBiasPlot'] == True)</filter>-->
|
|
117 </data>
|
|
118 </outputs>
|
|
119 <help>
|
|
120
|
|
121 **What it does**
|
|
122
|
|
123 This tool computes the GC bias using the method proposed by Benjamini and Speed (2012). Nucleic Acids Res. (see below for more explanations)
|
|
124 The output is used to plot the bias and can also be used later on to correct the bias with the tool correctGCbias.
|
|
125 There are two plots produced by the tool: a boxplot showing the absolute read numbers per genomic-GC bin and an x-y plot
|
|
126 depicting the ratio of observed/expected reads per genomic GC content bin.
|
|
127
|
|
128 -----
|
|
129
|
|
130 **Summary of the method used**
|
|
131
|
|
132 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
|
|
133 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...).
|
|
134 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
|
|
135 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).
|
|
136 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.
|
|
137 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
|
|
138 usually shows a significant bias towards reads with high GC content (>50%)
|
|
139
|
|
140 .. image:: $PATH_TO_IMAGES/QC_GCplots_input.png
|
|
141
|
|
142
|
|
143 **Output files**:
|
|
144
|
|
145 - Diagnostic plot
|
|
146
|
|
147 - box plot of absolute read numbers per genomic GC bin
|
|
148 - x-y plot of observed/expected read ratios per genomic GC content bin
|
|
149
|
|
150 - Data matrix
|
|
151
|
|
152 - to be used for GC correction with correctGCbias
|
|
153
|
|
154
|
|
155 -----
|
|
156
|
|
157 .. class:: infomark
|
|
158
|
|
159 @REFERENCES@
|
|
160
|
|
161 </help>
|
|
162 </tool>
|