comparison PileOMeth.xml @ 0:c88df21da662 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pileometh commit 7d50a5c7393176dcf1d25e5cc2f22544b1f6712c-dirty
author bgruening
date Fri, 18 Sep 2015 05:58:18 -0400
parents
children 25f127efaf7e
comparison
equal deleted inserted replaced
-1:000000000000 0:c88df21da662
1 <tool id="pileometh" name="PileOMeth" version="0.1.5">
2 <description>A tool for processing bisulfite sequencing alignments</description>
3 <requirements>
4 <requirement type="package" version="0.1.5">pileometh</requirement>
5 </requirements>
6 <stdio>
7 <!-- Anything other than zero is an error -->
8 <exit_code range="1:" />
9 <exit_code range=":-1" />
10 <!-- In case the return code has not been set propery check stderr too -->
11 <regex match="Error:" />
12 <regex match="Exception:" />
13 </stdio>
14 <version_command>PileOMeth --version</version_command>
15 <command><![CDATA[
16 PileOMeth
17 $main_task.task
18
19 #if $main_task.task == "extract":
20 -o output
21 $main_task.mergeContext
22 #end if
23
24 #if $advanced_options.options=="yes":
25 #if $advanced_options.mbias_regionString:
26 -r $advanced_options.mbias_regionString
27 #end if
28 $advanced_options.keepDupes
29 $advanced_options.keepSingleton
30 -q $advanced_options.min_MAPQ
31 -p $advanced_options.min_Phred
32 -D $advanced_options.max_pbdepth
33 $advanced_options.CHG
34 $advanced_options.CHH
35 #end if
36
37 $input_refFASTA
38 $input_sortedAlignBAM
39
40 #if $main_task.task == "mbias":
41 out_mbias
42 #end if
43 ]]></command>
44 <inputs>
45 <param name="input_refFASTA" multiple="False" type="data" format="fasta" label="Reference.fasta"/>
46 <param name="input_sortedAlignBAM" multiple="False" type="data" format="bam" label="sorted_alignments.bam"/>
47 <conditional name="main_task">
48 <param name="task" type="select" label="What do you want to do?" >
49 <option value="extract">Extract methylation metrics from an alignment file in BAM/CRAM format</option>
50 <option value="mbias">Determine the position-dependent methylation bias in a dataset, producing diagnostic SVG images</option>
51 </param>
52 <when value="extract">
53 <param name="mergeContext" type="boolean" checked="false" truevalue="--mergeContext" falsevalue=""
54 label="Merge per-Cytosine metrics from CpG and CHG contexts into per-CPG or per-CHG metrics" />
55 </when>
56 <when value="mbias"/>
57 </conditional>
58 <conditional name="advanced_options">
59 <param name="options" type="select" label="Advanced options">
60 <option value="">Hide advanced options</option>
61 <option value="yes">Display advanced options</option>
62 </param>
63 <when value="yes">
64 <param name="mbias_regionString" type="text" value="" label="Region string in which to extract methylation"/>
65 <param name="keepDupes" type="boolean" checked="false" truevalue="--keepDupes" falsevalue=""
66 label="By default, any alignment marked as a duplicate is ignored. This option causes them to be incorporated" />
67 <param name="keepSingleton" type="boolean" checked="false" truevalue=" --keepSingleton" falsevalue=""
68 label="By default, if only one read in a pair aligns (a singleton) then it's ignored." />
69 <param name="min_MAPQ" type="integer" value="10" label="Minimum MAPQ threshold to include an alignment (default 10)"/>
70 <param name="min_Phred" type="integer" value="5" label="Minimum Phred threshold to include a base (default 5). This must be >0."/>
71 <param name="max_pbdepth" type="integer" value="2000" label="Maximum per-base depth (default 2000)"/>
72
73 <param name="CHG" type="boolean" checked="false" truevalue="--CHG" falsevalue=""
74 label="Additional output file with CHG methylation metrics" />
75 <param name="CHH" type="boolean" checked="false" truevalue="--CHH" falsevalue=""
76 label="Additional output file with CHH methylation metrics" />
77 </when>
78 <when value="">
79 </conditional>
80 </inputs>
81 <outputs>
82 <data name="outFileExtractCpG" format="bedgraph" from_work_dir="output_CpG.bedGraph"
83 label="${tool.name} on ${on_string} (--extract default file)">
84 <filter>main_task['task'] == "extract"</filter>
85 </data>
86 <data name="outFileExtractCHG" format="bedgraph" from_work_dir="output_CHG.bedGraph"
87 label="${tool.name} on ${on_string} (--CHG file)">
88 <filter>main_task['task'] == 'extract'</filter>
89 <filter>advanced_options['options'] == "yes"</filter>
90 <filter>advanced_options['CHG'] == "--CHG"</filter>
91 </data>
92 <data name="outFileExtractCHH" format="bedgraph" from_work_dir="output_CHH.bedGraph"
93 label="${tool.name} on ${on_string} (--CHH file)">
94 <filter>main_task['task'] == 'extract'</filter>
95 <filter>advanced_options['options'] == "yes"</filter>
96 <filter>advanced_options['CHH'] == "--CHH" </filter>
97 </data>
98 <data name="outFileMbiasCpG" format="svg" from_work_dir="out_mbias_OT.svg"
99 label="${tool.name} on ${on_string} (--mbias default file)">
100 <filter>main_task['task'] == 'mbias'</filter>
101 </data>
102 </outputs>
103 <tests>
104 <test>
105 <param name="task" value="extract" />
106 <param name="min_MAPQ" value="2" />
107 <param name="input_refFASTA" value="cg100.fa" ftype="fasta" />
108 <param name="input_sortedAlignBAM" value="cg_aln.bam" ftype="bam"/>
109 <param name="mergeContext" value=""/>
110 <param name="options" value="yes"/>
111 <output name="outFileExtractCpG" file="test_1.bedGraph" ftype="bedgraph" compare="diff"/>
112 </test>
113 <test>
114 <param name="task" value="mbias" />
115 <param name="min_MAPQ" value="2" />
116 <param name="options" value="yes"/>
117 <param name="input_refFASTA" value="cg100.fa" ftype="fasta" />
118 <param name="input_sortedAlignBAM" value="cg_aln.bam" ftype="bam"/>
119 <output name="outFileMbiasCpG" file="test_2_output.svg" ftype="svg" compare="diff"/>
120 </test>
121 </tests>
122 <help><![CDATA[
123 **What it does**
124
125 PileOMeth (using a PILEup to extract METHylation metrics) will process a coordinate-sorted and indexed BAM or CRAM file containing some form of BS-seq alignments and extract per-base methylation metrics from them. PileOMeth requires an indexed fasta file containing the reference genome as well.
126
127 By default, PileOMeth will only calculate metrics for Cytosines in a CpG context, but metrics for those in CHG and CHH contexts are supported as well.
128
129 **Methylation context**
130
131 PileOMeth groups all Cytosines into one of three sequence contexts: CpG, CHG, and CHH. Here, H is the IUPAC ambiguity code for any nucleotide other than G. If an N is encountered in the reference sequence, then the context will be assigned to CHG or CHH, as appropriate (e.g., CNG would be categorized as in a CHG context and CNC as in a CHH context). If a Cytosine is close enough to the end of a chromosome/contig such that its context can't be inferred, then it is categorized as CHH (e.g., a Cytosine as the last base of a chromosome is considered as being in a CHH context).
132
133
134 **Output information**
135
136 If no methylation can be found, the output will be empty.
137
138 Otherwise a variant of bedGraph that's similar to the "coverage" file is produced. In short, each line consists of 6 tab separated columns:
139
140 1. The chromosome/contig/scaffold name
141 2. The start coordinate
142 3. The end coordinate
143 4. The methylation percentage rounded to an integer
144 5. The number of alignments/pairs reporting methylated bases
145 6. The number of alignments/pairs reporting unmethylated bases
146
147 All coordinates are 0-based half open, which conforms to the bedGraph definition. When paired-end reads are aligned, it can often occur that their alignments overlap. In such cases, PileOMeth will not count both reads of the pair in its output, as doing so would lead to incorrect downstream statistical results.
148
149 An example of the output is below::
150
151 #track type="bedGraph" description="SRR1182519.sorted CpG methylation levels"
152 #1 25115 25116 100 3 0
153 #1 29336 29337 50 1 1
154
155 Note the header line, which starts with "track". The "description" field is used as a label in programs such as IGV. Each of the subsequent lines describe single Cytosines, the 25116th and 29337th base on chromosome 1, respectively. The first position has 3 alignments (or pairs of alignments) indicating methylation and 0 indicating unmethylation (100% methylation) and the second position has 1 alignment each supporting methylation and unmethylation (50% methylation).
156
157 **Per-CpG/CHG metrics**
158
159 In many circumstances, it's desireable for metrics from individual Cytosines in a CpG to be merged, producing per-CpG metrics rather than per-Cytosine metrics. This can be accomplished with the **Merge per-Cytosine** parameter. If this is used, then this output::
160
161 #track type="bedGraph" description="SRR1182519.sorted CpG methylation levels"
162 #1 25114 25115 100 2 1
163 #1 25115 25116 100 3 0
164
165 is changed to this::
166
167 #track type="bedGraph" description="SRR1182519.sorted merged CpG methylation levels"
168 #1 25114 25116 100 5 1
169
170 This also works for CHG-level metrics. If bedGraph files containing per-Cytosine metrics already exist, they can be converted to instead contain per-CpG/CHG metrics with PileOMeth mergeContext.
171
172 **Methylation bias plotting and correction**
173
174 In an ideal experiment, we expect that the probability of observing a methylated C is constant across the length of any given read. In practice, however, there are often increases/decreases in observed methylation rate at the ends of reads and/or more global changes. These are termed methylation bias and including such regions in the extracted methylation metrics will result in noisier and less accurate data. For this reason, users are strongly encouraged to make a methylation bias plot.
175
176 That command will create a methylation bias (mbias for short) plot for each of the strands for which there are valid alignments.
177 The resulting mbias graphs are in SVG format and can be viewed in most modern web browsers:
178
179 .. image:: example.svg
180
181
182 If you have paired-end data, both reads in the pair will be shown separately, as is the case above. The program will suggest regions for inclusion ("--OT 2,0,0,98" above) and mark them on the plot, if applicable. The format of this output is described in PileOMeth extract -h. These suggestions should not be accepted blindly; users are strongly encouraged to have a look for themselves and tweak the actual bounds as appropriate. The lines indicate the average methylation percentage at a given position and the shaded regions the 99.9% confidence interval around it. This is useful in gauging how many methylation calls a given position has relative to its neighbors. Note the spike in methylation at the end of read #2 and the corresponding dip at the beginning of read #1. This is common and these regions can be ignored with the suggested trimming bounds. Note also that the numbers refer to the first and last base that should be included during methylation extraction, not the last and first base to ignore!.
183
184 -----
185
186 **PileOMeth** is a Free and Open Source Software, see more details on the PileOMeth_ Website.
187
188 .. _PileOMeth: https://github.com/dpryan79/PileOMeth
189 ]]></help>
190 <citations>
191 </citations>
192 </tool>