3
|
1 <tool id="bismark_methylation_extractor" name="Bismark Meth. Extractor" version="0.10.1">
|
|
2 <!-- Wrapper compatible with Bismark version 0.10 -->
|
|
3 <description>Reports on methylation status of reads mapped by Bismark</description>
|
0
|
4 <!--<version_command>bismark_methylation_extractor version</version_command>-->
|
|
5 <requirements>
|
|
6 <requirement type="set_environment">SCRIPT_PATH</requirement>
|
|
7 <requirement type="package" version="0.12.8">bowtie</requirement>
|
3
|
8 <requirement type="package" version="2.1.0">bowtie2</requirement>
|
0
|
9 </requirements>
|
|
10 <parallelism method="basic"></parallelism>
|
|
11 <command interpreter="python">
|
|
12 bismark_methylation_extractor.py
|
|
13
|
|
14 --infile $input
|
|
15
|
|
16 --bismark_path \$SCRIPT_PATH
|
|
17
|
|
18 #if $singlePaired.sPaired == "single":
|
|
19 --single-end
|
|
20 #else:
|
|
21 --paired-end
|
|
22 $singlePaired.no_overlap
|
|
23 #end if
|
|
24
|
|
25 #if str($ignore_bps) != "0":
|
|
26 --ignore $ignore_bps
|
|
27 #end if
|
|
28
|
|
29 #if $report:
|
|
30 --report-file $o_report
|
|
31 #end if
|
|
32
|
|
33 #if $comprehensive:
|
|
34 --comprehensive
|
|
35 #end if
|
|
36
|
|
37 #if $merge_non_cpg:
|
|
38 --merge-non-cpg
|
|
39 #end if
|
|
40
|
|
41 #if $compress:
|
|
42 --compress $compressed_output
|
|
43 #else:
|
|
44 #if $comprehensive == False and $merge_non_cpg == False:
|
|
45 ##twelfe files
|
|
46 --cpg_ot $cpg_ot
|
|
47 --chg_ot $chg_ot
|
|
48 --chh_ot $chh_ot
|
|
49 --cpg_ctot $cpg_ctot
|
|
50 --chg_ctot $chg_ctot
|
|
51 --chh_ctot $chh_ctot
|
|
52 --cpg_ob $cpg_ob
|
|
53 --chg_ob $chg_ob
|
|
54 --chh_ob $chh_ob
|
|
55 --cpg_ctob $cpg_ctob
|
|
56 --chg_ctob $chg_ctob
|
|
57 --chh_ctob $chh_ctob
|
|
58 #elif $merge_non_cpg and $comprehensive:
|
|
59 ## two files
|
|
60 --non_cpg_context $non_cpg_context
|
|
61 --cpg_context $cpg_context
|
|
62 #elif $comprehensive:
|
|
63 ## three files
|
|
64 --cpg_context $cpg_context
|
|
65 --chg_context $chg_context
|
|
66 --chh_context $chh_context
|
|
67 #elif $merge_non_cpg:
|
|
68 ## eight files
|
|
69 --non_cpg_context_ctot $non_cpg_context_ctot
|
|
70 --non_cpg_context_ot $non_cpg_context_ot
|
|
71 --non_cpg_context_ob $non_cpg_context_ob
|
|
72 --non_cpg_context_ctob $non_cpg_context_ctob
|
|
73 --cpg_ot $cpg_ot
|
|
74 --cpg_ctot $cpg_ctot
|
|
75 --cpg_ob $cpg_ob
|
|
76 --cpg_ctob $cpg_ctob
|
|
77 #end if
|
|
78 ## end compress
|
|
79 #end if
|
|
80
|
|
81 </command>
|
|
82 <inputs>
|
|
83 <!-- Input Parameters -->
|
3
|
84 <param name="input" type="data" format="sam,bam" label="SAM/BAM file from Bismark bisulfite mapper" />
|
0
|
85 <conditional name="singlePaired">
|
|
86 <param name="sPaired" type="select" label="Is this library mate-paired?">
|
|
87 <option value="single">Single-end</option>
|
|
88 <option value="paired">Paired-end</option>
|
|
89 </param>
|
|
90 <when value="single" />
|
|
91 <when value="paired">
|
|
92 <param name="no_overlap" type="boolean" truevalue="--no-overlap" falsevalue="" checked="False" label="This option avoids scoring overlapping methylation calls twice, in case of overlapping read one and read two" help="" />
|
|
93 </when>
|
|
94 </conditional>
|
|
95 <param name="ignore_bps" type="integer" value="0" label="Ignore the first N bp when processing the methylation call string" />
|
|
96 <param name="comprehensive" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Merge all four possible strand-specific methylation info
|
|
97 into context-dependent output files" help="" />
|
|
98 <param name="merge_non_cpg" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Merge all non-CpG contexts into one file" help="This will produce eight strand-specific output files, or two output files in comprehensive mode." />
|
|
99 <param name="report" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Short methylation summary output" />
|
|
100 <param name="compress" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Compress all result files and output one single file" />
|
|
101
|
|
102 </inputs>
|
|
103 <outputs>
|
|
104 <!--
|
|
105 OT – original top strand
|
|
106 CTOT – complementary to original top strand
|
|
107 OB – original bottom strand
|
|
108 CTOB – complementary to original bottom strand
|
|
109 -->
|
|
110 <data format="tabular" name="o_report" label="${tool.name} on ${on_string}: Report file">
|
|
111 <filter> ( report is True ) </filter>
|
|
112 </data>
|
|
113
|
|
114 <!-- default output 12 files -->
|
|
115 <data format="tabular" name="cpg_ot" label="${tool.name} on ${on_string}: CpG original top strand">
|
|
116 <filter> ( compress == False and comprehensive == False and merge_non_CpG == False) </filter>
|
|
117 </data>
|
|
118 <data format="tabular" name="chg_ot" label="${tool.name} on ${on_string}: CHG original top strand">
|
|
119 <filter> ( compress == False and comprehensive == False and merge_non_CpG == False) </filter>
|
|
120 </data>
|
|
121 <data format="tabular" name="chh_ot" label="${tool.name} on ${on_string}: CHH original top strand">
|
|
122 <filter> ( compress == False and comprehensive == False and merge_non_CpG == False) </filter>
|
|
123 </data>
|
|
124 <data format="tabular" name="cpg_ctot" label="${tool.name} on ${on_string}: CpG complementary to top strand">
|
|
125 <filter> ( compress == False and comprehensive == False and merge_non_CpG == False) </filter>
|
|
126 </data>
|
|
127 <data format="tabular" name="chg_ctot" label="${tool.name} on ${on_string}: CHG complementary to top strand">
|
|
128 <filter> ( compress == False and comprehensive == False and merge_non_CpG == False) </filter>
|
|
129 </data>
|
|
130 <data format="tabular" name="chh_ctot" label="${tool.name} on ${on_string}: CHH complementary to top strand">
|
|
131 <filter> ( compress == False and comprehensive == False and merge_non_CpG == False) </filter>
|
|
132 </data>
|
|
133
|
|
134 <data format="tabular" name="cpg_ob" label="${tool.name} on ${on_string}: CpG original bottom strand">
|
|
135 <filter> ( compress == False and comprehensive == False and merge_non_CpG == False) </filter>
|
|
136 </data>
|
|
137 <data format="tabular" name="chg_ob" label="${tool.name} on ${on_string}: CHG original bottom strand">
|
|
138 <filter> ( compress == False and comprehensive == False and merge_non_CpG == False) </filter>
|
|
139 </data>
|
|
140 <data format="tabular" name="chh_ob" label="${tool.name} on ${on_string}: CHH original bottom strand">
|
|
141 <filter> ( compress == False and comprehensive == False and merge_non_CpG == False) </filter>
|
|
142 </data>
|
|
143 <data format="tabular" name="cpg_ctob" label="${tool.name} on ${on_string}: CpG complementary to bottom strand">
|
|
144 <filter> ( compress == False and comprehensive == False and merge_non_CpG == False) </filter>
|
|
145 </data>
|
|
146 <data format="tabular" name="chg_ctob" label="${tool.name} on ${on_string}: CHG complementary to bottom strand">
|
|
147 <filter> ( compress == False and comprehensive == False and merge_non_CpG == False) </filter>
|
|
148 </data>
|
|
149 <data format="tabular" name="chh_ctob" label="${tool.name} on ${on_string}: CHH complementary to bottom strand">
|
|
150 <filter> ( compress == False and comprehensive == False and merge_non_CpG == False) </filter>
|
|
151 </data>
|
|
152
|
|
153 <!-- Context-dependent methylation output files (comprehensive option) -->
|
|
154 <data format="tabular" name="cpg_context" label="${tool.name} on ${on_string}: CpG context dependent">
|
|
155 <filter> ( compress == False and comprehensive) </filter>
|
|
156 </data>
|
|
157 <data format="tabular" name="chg_context" label="${tool.name} on ${on_string}: CHG context dependent">
|
|
158 <filter> ( compress == False and comprehensive and merge_non_CpG == False) </filter>
|
|
159 </data>
|
|
160 <data format="tabular" name="chh_context" label="${tool.name} on ${on_string}: CHH context dependent">
|
|
161 <filter> ( compress == False and comprehensive and merge_non_CpG == False) </filter>
|
|
162 </data>
|
|
163
|
|
164 <data format="tabular" name="non_cpg_context" label="${tool.name} on ${on_string}: Non CpG context dependent">
|
|
165 <filter> ( compress == False and comprehensive and merge_non_cpg) </filter>
|
|
166 </data>
|
|
167
|
|
168 <data format="tabular" name="non_cpg_context_ot" label="${tool.name} on ${on_string}: Non CpG context dependent on original top strand">
|
|
169 <filter> ( compress == False and comprehensive == False and merge_non_cpg) </filter>
|
|
170 </data>
|
|
171 <data format="tabular" name="non_cpg_context_ctot" label="${tool.name} on ${on_string}: Non CpG context dependent on complementary to top strand">
|
|
172 <filter> ( compress == False and comprehensive == False and merge_non_cpg) </filter>
|
|
173 </data>
|
|
174 <data format="tabular" name="non_cpg_context_ob" label="${tool.name} on ${on_string}: Non CpG context dependent on bottom top strand">
|
|
175 <filter> ( compress == False and comprehensive == False and merge_non_cpg) </filter>
|
|
176 </data>
|
|
177 <data format="tabular" name="non_cpg_context_ctob" label="${tool.name} on ${on_string}: Non CpG context dependent on complementary to bottom strand">
|
|
178 <filter> ( compress == False and comprehensive == False and merge_non_cpg) </filter>
|
|
179 </data>
|
|
180
|
|
181 <data format="gzipped" name="compressed_output" label="${tool.name} on ${on_string}: Result archive.">
|
|
182 <filter> ( compress ) </filter>
|
|
183 </data>
|
|
184 </outputs>
|
|
185
|
|
186 <tests>
|
|
187 </tests>
|
|
188
|
|
189 <help>
|
|
190
|
|
191 **What it does**
|
|
192
|
|
193 The following is a brief description of all options to control the Bismark_
|
|
194 methylation extractor. The script reads in a bisulfite read alignment results file
|
|
195 produced by the Bismark bisulfite mapper and extracts the methylation information
|
|
196 for individual cytosines. This information is found in the methylation call field
|
|
197 which can contain the following characters:
|
|
198
|
|
199
|
|
200 - X = for methylated C in CHG context (was protected)
|
|
201 - x = for not methylated C CHG (was converted)
|
|
202 - H = for methylated C in CHH context (was protected)
|
|
203 - h = for not methylated C in CHH context (was converted)
|
|
204 - Z = for methylated C in CpG context (was protected)
|
|
205 - z = for not methylated C in CpG context (was converted)
|
|
206 - . = for any bases not involving cytosines
|
|
207
|
|
208
|
|
209 The methylation extractor outputs result files for cytosines in CpG, CHG and CHH
|
|
210 context (this distinction is actually already made in Bismark itself). As the methylation
|
|
211 information for every C analysed can produce files which easily have tens or even hundreds of
|
|
212 millions of lines, file sizes can become very large and more difficult to handle. The C
|
|
213 methylation info additionally splits cytosine methylation calls up into one of the four possible
|
|
214 strands a given bisulfite read aligned against:
|
|
215
|
|
216 - OT = original top strand
|
|
217 - CTOT = complementary to original top strand
|
|
218
|
|
219 - OB = original bottom strand
|
|
220 - CTOB = complementary to original bottom strand
|
|
221
|
|
222 Thus, by default twelve individual output files are being generated per input file (unless
|
|
223 --comprehensive is specified, see below). The output files can be imported into a genome
|
|
224 viewer, such as SeqMonk, and re-combined into a single data group if desired (in fact
|
|
225 unless the bisulfite reads were generated preserving directionality it doesn't make any
|
|
226 sense to look at the data in a strand-specific manner). Strand-specific output files can
|
|
227 optionally be skipped, in which case only three output files for CpG, CHG or CHH context
|
|
228 will be generated. For both the strand-specific and comprehensive outputs there is also
|
|
229 the option to merge both non-CpG contexts (CHG and CHH) into one single non-CpG context.
|
|
230
|
|
231
|
|
232 .. _Bismark: http://www.bioinformatics.babraham.ac.uk/projects/bismark/
|
|
233
|
|
234
|
|
235 It is developed by Krueger F and Andrews SR. at the Babraham Institute. Krueger F, Andrews SR. (2011) Bismark: a flexible aligner and methylation caller for Bisulfite-Seq applications. Bioinformatics, 27, 1571-2.
|
|
236
|
|
237 -------
|
|
238
|
|
239 **Bismark settings**
|
|
240
|
|
241 All of the options have a default value. You can change any of them. If any Bismark function is missing please contact the tool author or your Galaxy admin.
|
|
242
|
|
243 ------
|
|
244
|
|
245 **Outputs**
|
|
246
|
|
247 The output files are in the following format (tab delimited)::
|
|
248
|
|
249
|
|
250 Column Description
|
|
251 -------- --------------------------------------------------------
|
|
252 1 seq-ID
|
|
253 2 strand
|
|
254 3 chromosome
|
|
255 4 position
|
|
256 5 methylation call
|
|
257
|
|
258
|
|
259 * Methylated cytosines receive a '+' orientation,
|
|
260 * Unmethylated cytosines receive a '-' orientation.
|
|
261
|
|
262 ------
|
|
263
|
|
264 **OPTIONS**
|
|
265
|
|
266 Input::
|
|
267
|
|
268 -s/--single-end Input file(s) are Bismark result file(s) generated from single-end
|
|
269 read data. Specifying either --single-end or --paired-end is
|
|
270 mandatory.
|
|
271
|
|
272 -p/--paired-end Input file(s) are Bismark result file(s) generated from paired-end
|
|
273 read data. Specifying either --paired-end or --single-end is
|
|
274 mandatory.
|
|
275
|
|
276 --no_overlap For paired-end reads it is theoretically possible that read_1 and
|
|
277 read_2 overlap. This option avoids scoring overlapping methylation
|
|
278 calls twice. Whilst this removes a bias towards more methylation calls
|
|
279 towards the center of sequenced fragments it can de facto remove
|
|
280 a good proportion of the data.
|
|
281
|
|
282 --ignore INT Ignore the first INT bp at the 5' end of each read when processing the
|
|
283 methylation call string. This can remove e.g. a restriction enzyme site
|
|
284 at the start of each read.
|
|
285
|
|
286 Output::
|
|
287
|
|
288 --comprehensive Specifying this option will merge all four possible strand-specific
|
|
289 methylation info into context-dependent output files. The default
|
|
290 contexts are:
|
|
291 - CpG context
|
|
292 - CHG context
|
|
293 - CHH context
|
|
294
|
|
295 --merge_non_CpG This will produce two output files (in --comprehensive mode) or eight
|
|
296 strand-specific output files (default) for Cs in
|
|
297 - CpG context
|
|
298 - non-CpG context
|
|
299
|
|
300 --report Prints out a short methylation summary as well as the paramaters used to run
|
|
301 this script.
|
|
302
|
|
303
|
|
304 </help>
|
|
305 </tool>
|