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