|
1
|
1 <tool id="computeGCBias" name="computeGCBias" version="1.0.1">
|
|
5
|
2 <description>to see whether your samples should be normalized for GC bias</description>
|
|
|
3
|
|
0
|
4 <requirements>
|
|
1
|
5 <requirement type="package" version="1.5.1_59e067cce039cb93add04823c9f51cab202f8c2b">deepTools</requirement>
|
|
0
|
6 </requirements>
|
|
|
7 <stdio>
|
|
|
8 <exit_code range="0" level="warning" description="Warning" />
|
|
|
9 </stdio>
|
|
|
10 <command>
|
|
1
|
11 #import tempfile
|
|
|
12 #set $temp_dir = os.path.abspath(tempfile.mkdtemp())
|
|
|
13
|
|
|
14 #set $temp_bam_handle = tempfile.NamedTemporaryFile( dir=$temp_dir )
|
|
|
15 #set $temp_bam_path = $temp_bam_handle.name + '.bam'
|
|
|
16 #silent $temp_bam_handle.close()
|
|
|
17 #silent os.system("ln -s %s %s" % (str($bamInput), $temp_bam_path))
|
|
|
18 #silent os.system("ln -s %s %s.bai" % (str($bamInput.metadata.bam_index), $temp_bam_path))
|
|
|
19
|
|
0
|
20 computeGCBias
|
|
1
|
21
|
|
|
22 ##ToDo
|
|
|
23 --numberOfProcessors 4
|
|
|
24
|
|
|
25 --bamfile '$temp_bam_path'
|
|
0
|
26 --species '$species'
|
|
|
27 --GCbiasFrequenciesFile $outFileName
|
|
|
28 --fragmentLength $fragmentLength
|
|
1
|
29
|
|
0
|
30 #if $source.ref_source=="history":
|
|
|
31 --genome $source.input1
|
|
|
32 #else:
|
|
|
33 --genome "${source.input1_2bit.fields.path}"
|
|
|
34 #end if
|
|
1
|
35
|
|
0
|
36 #if $advancedOpt.showAdvancedOpt == "yes":
|
|
|
37 #if str($advancedOpt.region.value) != '':
|
|
|
38 --region '$advancedOpt.region'
|
|
|
39 #end if
|
|
|
40
|
|
|
41 --binSize '$advancedOpt.binSize'
|
|
|
42 --sampleSize '$advancedOpt.sampleSize'
|
|
|
43 --regionSize '$advancedOpt.regionSize'
|
|
1
|
44
|
|
0
|
45 #if $advancedOpt.filterOut:
|
|
|
46 --filterOut $advancedOpt.filterOut
|
|
|
47 #end if
|
|
1
|
48
|
|
0
|
49 #if $advancedOpt.extraSampling:
|
|
|
50 --extraSampling $advancedOpt.extraSampling
|
|
|
51 #end if
|
|
1
|
52
|
|
0
|
53 #end if
|
|
1
|
54
|
|
5
|
55 #if $saveBiasPlot:
|
|
|
56 --biasPlot $biasPlot
|
|
0
|
57 #end if
|
|
1
|
58
|
|
5
|
59 ## #if $output.showOutputSettings == "yes"
|
|
|
60 ## #if $output.saveBiasPlot:
|
|
|
61 ## --biasPlot biasPlot.png ;
|
|
|
62 ## mv biasPlot.png $biasPlot
|
|
|
63 ## #end if
|
|
|
64 ## #end if
|
|
|
65
|
|
1
|
66 ; rm $temp_dir -rf
|
|
0
|
67
|
|
|
68 </command>
|
|
1
|
69 <inputs>
|
|
0
|
70
|
|
1
|
71 <param name="bamInput" format="bam" type="data" label="Input BAM file"
|
|
|
72 help="The BAM file must be sorted and indexed."/>
|
|
|
73 <!--<param name="species" type="text" value="" label="Species name abbreviation" />-->
|
|
|
74
|
|
|
75 <param name="species" type="select" label="Species name abbreviation">
|
|
|
76 <option value="hg19">hg19</option>
|
|
|
77 <option value="ce10">ce10</option>
|
|
|
78 <option value="dm3">dm3</option>
|
|
|
79 <option value="mm9">mm9</option>
|
|
|
80 </param>
|
|
|
81
|
|
|
82 <conditional name="source">
|
|
|
83 <param name="ref_source" type="select" label="Reference genome">
|
|
|
84 <option value="cached">locally cached</option>
|
|
|
85 <option value="history">in your history</option>
|
|
0
|
86 </param>
|
|
1
|
87 <when value="cached">
|
|
|
88 <param name="input1_2bit" type="select" label="Using reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
|
|
|
89 <options from_data_table="deepTools_seqs" />
|
|
|
90 </param>
|
|
|
91 </when>
|
|
|
92 <when value="history">
|
|
|
93 <param name="input1" type="data" format="twobit" label="Select a reference dataset in 2bit format" />
|
|
|
94 </when>
|
|
|
95 </conditional>
|
|
|
96 <param name="fragmentLength" type="integer" value="300" min="1"
|
|
|
97 label="Fragment length used for the sequencing"
|
|
|
98 help ="If paired-end reads are used the fragment length is computed based from the bam file."/>
|
|
|
99
|
|
|
100 <conditional name="advancedOpt">
|
|
|
101 <param name="showAdvancedOpt" type="select" label="Show advanced 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">
|
|
0
|
107 <param name="region" type="text" value=""
|
|
|
108 label="Region of the genome to limit the operation to"
|
|
|
109 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"" />
|
|
|
110
|
|
|
111 <param name="binSize" type="integer" value="50" min="1"
|
|
|
112 label="Bin size in bp"
|
|
|
113 help="Size of the bins in bp for the ouput of the bigwig/bedgraph file."/>
|
|
|
114
|
|
|
115 <param name="sampleSize" type="integer" value="50000000" min="1"
|
|
|
116 label="Number of sampling points to be considered" />
|
|
|
117
|
|
|
118 <param name="regionSize" type="integer" value="300" min="1"
|
|
|
119 label="Region size"
|
|
|
120 help ="To plot the reads per GC over a region the size of the region is required. By default, the bin size is set to 300bp, which is close to the standard fragment size for Illumina machines. However, if the depth of sequencing is low a larger bin size will be required, otherwise many bins will not overlap with any read."/>
|
|
|
121
|
|
|
122 <param name="filterOut" type="data" format="bed" optional="true"
|
|
|
123 label="BED file containing genomic regions to be excluded from the estimation of the correction"
|
|
|
124 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." />
|
|
|
125 <param name="extraSampling" type="data" format="bed" optional="true"
|
|
|
126 label="BED file containing genomic regions for which extra sampling is required because they are underrepresented in the genome"
|
|
|
127 help="" />
|
|
1
|
128 </when>
|
|
|
129 </conditional>
|
|
0
|
130
|
|
5
|
131 <param name="saveBiasPlot" type="boolean" truevalue="--biasPlot" falsevalue="" checked="True" label="Save a diagnostic image summarizing the GC bias found on the sample"/>
|
|
|
132 <!--
|
|
1
|
133 <conditional name="output" >
|
|
0
|
134 <param name="showOutputSettings" type="select" label="Show additional output options" >
|
|
|
135 <option value="no" selected="true">no</option>
|
|
|
136 <option value="yes">yes</option>
|
|
|
137 </param>
|
|
|
138 <when value="no" />
|
|
|
139 <when value="yes">
|
|
|
140 <param name="saveBiasPlot" type="boolean" label="Save a diagnostic image summarizing the GC bias found on the sample"/>
|
|
|
141 </when>
|
|
|
142 </conditional>
|
|
5
|
143 -->
|
|
0
|
144 </inputs>
|
|
|
145 <outputs>
|
|
|
146 <data format="tabular" name="outFileName" />
|
|
|
147 <data format="png" name="biasPlot" label="${tool.name} on ${on_string}: bias plot">
|
|
|
148 <filter>(output['showOutputSettings'] == 'yes' and output['saveBiasPlot'] == True)</filter>
|
|
|
149 </data>
|
|
|
150 </outputs>
|
|
|
151 <help>
|
|
|
152
|
|
|
153 **What it does**
|
|
|
154
|
|
5
|
155 This tool computes the GC bias ussing the method proposed by Benjamini and Speed (2012). Nucleic Acids Res.
|
|
|
156 The output is used to plot the bias and can also be used later on to correct the bias with the tool correctGCbias.
|
|
0
|
157
|
|
|
158 -----
|
|
|
159
|
|
|
160 .. class:: infomark
|
|
|
161
|
|
|
162 Please acknowledge that this tool **is still in development** and we will be very happy to receive feedback from the users. If you run into any trouble please sent an email to `Fidel Ramirez`_.
|
|
|
163
|
|
|
164 This tool is developed by the `Bioinformatics and Deep-Sequencing Unit`_ at the `Max Planck Institute for Immunobiology and Epigenetics`_.
|
|
|
165
|
|
|
166
|
|
|
167 .. _Bioinformatics and Deep-Sequencing Unit: http://www3.ie-freiburg.mpg.de/facilities/research-facilities/bioinformatics-and-deep-sequencing-unit/
|
|
|
168 .. _Max Planck Institute for Immunobiology and Epigenetics: http://www3.ie-freiburg.mpg.de
|
|
|
169 .. _Fidel Ramirez: ramirez@ie-freiburg.mpg.de
|
|
|
170
|
|
|
171 </help>
|
|
|
172 </tool>
|