Mercurial > repos > wolma > mimodd
annotate cloudmap.xml @ 17:b658c34ee3fd draft
Uploaded
author | wolma |
---|---|
date | Tue, 26 Apr 2016 07:03:26 -0400 |
parents | 93db2f9bca12 |
children | aba6d9b1c1f1 |
rev | line source |
---|---|
9
93db2f9bca12
upgrade to v0.1.7.2
Wolfgang Maier wolfgang.maier@biologie.uni-freiburg.de
parents:
8
diff
changeset
|
1 <tool id="nacreousmap" name="NacreousMap" version="0.1.7.2"> |
6 | 2 <description>Map causative mutations by multi-variant linkage analysis.</description> |
2 | 3 <expand macro="requirements"/> |
0 | 4 <version_command>mimodd version -q</version_command> |
5 <command> | |
7 | 6 mimodd map ${opt.mode} "${opt.source.ifile}" |
6 | 7 #if $str($opt.source.sample): |
8 -m "${opt.source.sample}" | |
9 #end if | |
10 #if $str($opt.source.related_parent_sample): | |
11 -r "${opt.source.related_parent_sample}" | |
12 #end if | |
13 #if $str($opt.source.unrelated_parent_sample): | |
14 -u "${opt.source.unrelated_parent_sample}" | |
15 #end if | |
16 $opt.source.infer_missing | |
17 -o "$ofile" | |
18 #if $str($opt.source.seqdict_required.required) == "yes": | |
19 -s "${opt.source.seqdict_required.seqdict}" | |
20 #end if | |
21 $opt.source.norm | |
22 #if $len($opt.source.bin_sizes): | |
23 --bin-sizes | |
24 #for $size in $opt.source.bin_sizes: | |
25 "${size.bin_size}" | |
26 #end for | |
27 #end if | |
28 #if $str($opt.source.tabfile): | |
29 $str($opt.source.tabfile) $tfile | |
4 | 30 #end if |
6 | 31 #if $str($opt.source.plotopts.plots): |
32 $str($opt.source.plotopts.plots) "$pfile" | |
33 $str($opt.source.plotopts.xlim) | |
34 #if $str($opt.source.plotopts.hylim): | |
35 --ylim-hist $str($opt.source.plotopts.hylim) | |
36 #end if | |
37 #if $str($opt.source.plotopts.hcols) and $len($opt.source.plotopts.hcols): | |
38 --hist-colors | |
39 #for $color in $opt.source.plotopts.hcols: | |
40 "${color.hcolor}" | |
41 #end for | |
42 #end if | |
43 #if $str($opt.source.plotopts.sylim): | |
44 --ylim-scatter $str($opt.source.plotopts.sylim) | |
45 #end if | |
46 #if $str($opt.source.plotopts.pcol): | |
47 --points-color "$str($opt.source.plotopts.pcol)" | |
48 #end if | |
49 #if $str($opt.source.plotopts.lcol): | |
50 --loess-color "$str($opt.source.plotopts.lcol)" | |
51 #end if | |
52 #if $str($opt.source.plotopts.span): | |
53 --loess-span "$str($opt.source.plotopts.span)" | |
54 #end if | |
0 | 55 #end if |
56 | |
57 </command> | |
58 | |
6 | 59 <macros> |
7 | 60 <import>toolshed_macros.xml</import> |
6 | 61 <macro name="svd_unconditional"> |
62 <expand macro="hidden_vaf_algo_params" /> | |
63 <expand macro="seqdict_param" /> | |
64 <expand macro="bins" /> | |
65 <param name="norm" type="boolean" label="normalize variant counts to bin-width" truevalue="" falsevalue="--no-normalize" checked="true" help="without normalization the tool will just report the number of nucleotides per bin; with normalization the results for different bin-widths will be comparable." /> | |
66 <conditional name="plotopts"> | |
67 <param name="plots" type="select" label="graphical output settings"> | |
68 <option value="">Do not generate graphs.</option> | |
69 <option value="-p">Give me graphics.</option> | |
70 </param> | |
71 <when value="-p"> | |
72 <expand macro="scatter_default" /> | |
73 <param name="hylim" type="text" label="upper limit for the histogram y-axis (leave blank for automatic scaling)" /> | |
74 <param name="xlim" type="select" label="x-axis scaling"> | |
75 <option value="">preserve relative contig sizes</option> | |
76 <option value="--fit-width">scale each contig to fit the plot width</option> | |
77 </param> | |
78 <expand macro="hist_colors" /> | |
79 </when> | |
80 </conditional> | |
81 </macro> | |
82 <macro name="vaf_unconditional"> | |
83 <expand macro="bins" /> | |
84 <param name="norm" type="boolean" label="normalize variant counts to bin-width" truevalue="" falsevalue="--no-normalize" checked="true" /> | |
85 <conditional name="plotopts"> | |
86 <param name="plots" type="select" label="graphical output settings"> | |
87 <option value="">Do not generate graphs.</option> | |
88 <option value="--no-scatter -p">Generate only histograms</option> | |
89 <option value="--no-hist -p">Generate only scatter plots</option> | |
90 <option value="-p">Give me everything (scatter plots and histograms)</option> | |
91 </param> | |
92 <when value="--no-scatter -p"> | |
93 <expand macro="scatter_default" /> | |
94 <param name="hylim" type="text" label="upper limit for the histogram y-axis (leave blank for automatic scaling)" /> | |
95 <param name="xlim" type="select" label="x-axis scaling"> | |
96 <option value="">preserve relative contig sizes</option> | |
97 <option value="--fit-width">scale each contig to fit the plot width</option> | |
98 </param> | |
99 <expand macro="hist_colors" /> | |
100 </when> | |
101 <when value="--no-hist -p"> | |
102 <expand macro="hist_default" /> | |
103 <param name="sylim" type="text" label="upper limit for the scatter plot y-axis (default: 1)" /> | |
104 <param name="xlim" type="select" label="x-axis scaling"> | |
105 <option value="">preserve relative contig sizes</option> | |
106 <option value="--fit-width">scale each contig to fit the plot width</option> | |
107 </param> | |
8 | 108 <param name="span" type="text" label="span value to be used in calculating the Loess regression line through the scatter data (default=0.1, specify 0 to prevent calculation)" help="smaller values give a more responsive curve that often picks up local evidence for tight linkage better, but too small values lead to plotting failures (in that case just rerun the tool with a larger value)." /> |
6 | 109 <expand macro="scatter_colors" /> |
110 </when> | |
111 <when value="-p"> | |
112 <expand macro="plot_all" /> | |
113 </when> | |
114 </conditional> | |
115 </macro> | |
116 <macro name="hidden_vaf_algo_params"> | |
117 <param name="sample" type="hidden" value="" /> | |
118 <param name="related_parent_sample" type="hidden" value="" /> | |
119 <param name="unrelated_parent_sample" type="hidden" value="" /> | |
120 <param name="infer_missing" type="hidden" value="" /> | |
121 </macro> | |
122 <macro name="bins"> | |
7 | 123 <repeat name="bin_sizes" title="bin sizes to analyze variants in (defaults to: 1Mb and 500Kb)" default="0" min="0" help="Values can be entered in bases (e.g., 1000000), kilobases (e.g., 500Kb) or megabases (e.g., 1Mb), but must be integral, i.e. no decimal numbers are allowed."> |
6 | 124 <param name="bin_size" type="text" /> |
125 </repeat> | |
126 </macro> | |
127 <macro name="scatter_default"> | |
128 <param name="sylim" type="hidden" value="" /> | |
129 <param name="span" type="hidden" value="" /> | |
130 <param name="pcol" type="hidden" value="" /> | |
131 <param name="lcol" type="hidden" value="" /> | |
132 </macro> | |
133 <macro name="hist_default"> | |
134 <param name="hylim" type="hidden" value="" /> | |
135 <param name="hcols" type="hidden" value="" /> | |
136 </macro> | |
137 <macro name="hist_colors"> | |
138 <repeat name="hcols" title="histogram colors" default="0" min="0" help="For each bin size chosen above a histogram will be generated with its color selected from the list provided here (defaults to alternating darkgrey, red)."> | |
139 <param name="hcolor" type="color" value="darkgrey"> | |
140 <sanitizer><valid><add value="#" /></valid></sanitizer> | |
141 </param> | |
142 </repeat> | |
143 </macro> | |
144 <macro name="scatter_colors"> | |
145 <param name="pcol" type="color" value="#454545" label="color to be used for the scatter plot data points (default: gray27)"> | |
146 <sanitizer><valid><add value="#" /></valid></sanitizer> | |
147 </param> | |
148 <param name="lcol" type="color" value="red" label="color to be used for the regression line (default: red)"> | |
149 <sanitizer><valid><add value="#" /></valid></sanitizer> | |
150 </param> | |
151 </macro> | |
152 <macro name="plot_all"> | |
153 <param name="hylim" type="text" label="upper limit for the histogram y-axis (leave blank for automatic scaling)" /> | |
154 <param name="sylim" type="text" label="upper limit for the scatter plot y-axis (default: 1)" /> | |
155 <param name="xlim" type="select" label="x-axis scaling"> | |
156 <option value="">preserve relative contig sizes</option> | |
157 <option value="--fit-width">scale each contig to fit the plot width</option> | |
158 </param> | |
8 | 159 <param name="span" type="text" label="span value to be used in calculating the Loess regression line through the scatter data (default=0.1, specify 0 to prevent calculation)" help="smaller values give a more responsive curve that often picks up local evidence for tight linkage better, but too small values lead to plotting failures (in that case just rerun the tool with a larger value)." /> |
6 | 160 <expand macro="hist_colors" /> |
161 <expand macro="scatter_colors" /> | |
162 </macro> | |
163 <macro name="seqdict_param"> | |
164 <conditional name="seqdict_required"> | |
165 <param name="required" type="select" label="does this input file require a CloudMap-style sequence dictionary?" help="A sequence dictionary file is required ONLY if the input file does not provide information about the sizes of the chromosomes defined in it. It is NEVER needed for MiModD-generated input files."> | |
166 <option value="no">No</option> | |
167 <option value="yes">Yes</option> | |
168 </param> | |
169 <when value="yes"> | |
170 <param name="seqdict" type="data" format="tabular" label="CloudMap-style sequence dictionary file" /> | |
171 </when> | |
172 </conditional> | |
173 </macro> | |
174 </macros> | |
175 | |
0 | 176 <inputs> |
6 | 177 <conditional name="opt"> |
178 <param name="mode" type="select" label="type of mapping analysis to perform" help="Select Simple Variant Density (SVD) Mapping to map mutations based on linked inheritance in near isogenic populations, Variant Allele Frequency (VAF) Mapping for bulk segregant analysis. Select Reprocess for rapidly replotting the result of a previous VAF analysis."> | |
4 | 179 <option value="SVD">Simple Variant Density Mapping</option> |
180 <option value="VAF">Variant Allele Frequency Mapping</option> | |
0 | 181 </param> |
182 <when value="SVD"> | |
6 | 183 <conditional name="source"> |
184 <param name="inputtype" type="select" label="data source to use"> | |
185 <option value="vcf">VCF file of variants (for de-novo mapping)</option> | |
186 <option value="rep">per-variant report file (for remapping a previous analysis)</option> | |
187 </param> | |
188 <when value="vcf"> | |
189 <param name="ifile" type="data" format="vcf" label="input file with variants to analyze" /> | |
190 <expand macro="svd_unconditional" /> | |
191 <param name="tabfile" type="select" label="additional per-variant output file" help="You can either choose to produce a tabular per-variant report, which is useful for fast replotting with different plot settings or a vcf-like CloudMap-compatibility file that can be used as input for the CloudMap EMS Variant Density Mapping tool as an alternative plotting tool."> | |
192 <option value="">Do not generate per-variant output</option> | |
193 <option value="-t">Tabular per-variant report</option> | |
194 <option value="--cloudmap -t">CloudMap compatibility file</option> | |
195 </param> | |
196 </when> | |
197 <when value="rep"> | |
198 <param name="ifile" type="data" format="tabular" label="input file with variants to analyze" /> | |
199 <param name="tabfile" type="hidden" value="" /> | |
200 <expand macro="svd_unconditional" /> | |
201 </when> | |
202 </conditional> | |
0 | 203 </when> |
204 <when value="VAF"> | |
6 | 205 <conditional name="source"> |
206 <param name="inputtype" type="select" label="data source to use"> | |
207 <option value="vcf">VCF file of variants (for de-novo mapping)</option> | |
208 <option value="rep">per-variant report file (for remapping a previous analysis)</option> | |
209 </param> | |
210 <when value="vcf"> | |
211 <param name="ifile" type="data" format="vcf" label="input file with variants to analyze" /> | |
212 <expand macro="seqdict_param" /> | |
213 <param name="sample" type="text" label="mapping sample name" help="the sample to perform mutation mapping for" /> | |
214 <param name="related_parent_sample" type="text" label="name of the related parent sample" help="the sample that provides variants present in your original mutant strain or in an ancestor (like the pre-mutagenesis strain); leave blank if not available" /> | |
215 <param name="unrelated_parent_sample" type="text" label="name of the unrelated parent sample" help="the sample that provides variants present in the unrelated mapping strain (or in an ancestor of it) used in the mapping cross; leave blank if not available" /> | |
8 | 216 <param name="infer_missing" type="boolean" checked="false" truevalue="--infer-missing" falsevalue="" label="Infer alleles for missing parent" help="if variant data for either the related or the unrelated parent strain is not available, the tool can try to infer the alleles present in that parent from the allele spectrum found in the mapping sample. Use with caution on carefully filtered variant lists only!" /> |
6 | 217 <expand macro="vaf_unconditional" /> |
218 <param name="tabfile" type="select" label="additional per-variant output file" help="You can either choose to produce a tabular per-variant report, which is useful for fast replotting with different plot settings or a vcf-like CloudMap-compatibility file that can be used as input for the CloudMap Hawaiian Variant Mapping tool as an alternative plotting tool."> | |
219 <option value="">Do not generate per-variant output</option> | |
220 <option value="-t">Tabular per-variant report</option> | |
221 <option value="--cloudmap -t">CloudMap compatibility file</option> | |
222 </param> | |
223 </when> | |
224 <when value="rep"> | |
225 <param name="ifile" type="data" format="tabular" label="input file with variants to analyze" /> | |
226 <expand macro="seqdict_param" /> | |
227 <param name="tabfile" type="hidden" value="" /> | |
228 <expand macro="hidden_vaf_algo_params" /> | |
229 <expand macro="vaf_unconditional" /> | |
230 </when> | |
231 </conditional> | |
0 | 232 </when> |
233 </conditional> | |
234 </inputs> | |
235 | |
236 <outputs> | |
6 | 237 <data name="ofile" format="tabular" label="MiModD ${opt.mode} Mapping - binned variant counts for ${on_string}" /> |
238 <data name="tfile" format="tabular" label="MiModD ${opt.mode} Mapping - per-variant report for ${on_string}"> | |
239 <filter>(opt['source']['tabfile'])</filter> | |
240 </data> | |
241 <data name="pfile" format="pdf" label="MiModD ${opt.mode} Mapping - linkage plots for ${on_string}"> | |
242 <filter>(opt['source']['plotopts']['plots'])</filter> | |
0 | 243 </data> |
244 </outputs> | |
245 | |
246 <help> | |
247 .. class:: infomark | |
248 | |
249 **What it does** | |
250 | |
6 | 251 This tool is a complete rewrite of and improves the EMS Variant Density and Hawaiian Variant Mapping tools of `CloudMap`_. It is the most downstream tool in `mapping-by-sequencing analysis workflows in MiModD`_. |
252 | |
253 It can be used to analyze and visualize the inheritance pattern of variants detected and selected by other MiModD tools or as an alternative (and more versatile) plotting engine for data generated with `CloudMap`_. | |
254 | |
255 ------------- | |
256 | |
257 **Usage Modes:** | |
0 | 258 |
6 | 259 This tool can be run in one of two different modes depending on the type of mapping analysis that should be performed: |
260 | |
261 1) *Simple Variant Density (SVD) Mapping* mode analyzes the density of variants along the reference genome by dividing each chromosome into regions of user-defined size (bins) and counting the variants found in each bin. | |
262 | |
263 All variants listed in the input file are analyzed in this mode, which means that as input you will typically want to use filtered lists of variants (as produced by the VCF Filter tool). | |
264 | |
265 The aim of SVD analysis is to identify clusters of variants in an outcrossed strain carrying a selectable unknown mutation, which is interpreted as linkage between the corresponding genomic region and the unknown mutation. | |
266 | |
267 This mode corresponds roughly to EMS Variant Density Mapping in CloudMap. | |
0 | 268 |
6 | 269 2) *Variant Allele Frequency (VAF) Mapping** mode analyzes the inheritance pattern in cross-progeny at sites, at which the parents are homozygous for different alleles. |
270 | |
271 The aim of VAF analysis is to identify clusters of variants with (near) homozygous inheritance in a F2 (or later generation) population obtained from a cross between a strain carrying a selectable unknown mutation and an unrelated mapping strain. Such a cluster is interpreted as linkage between the corresponding genomic region and the unknown mutation selected for in the F2 generation. | |
272 | |
273 This mode corresponds roughly to Hawaiian Variant Mapping in CloudMap, but can simultaneously take into account non-reference alleles found in either parent strain (CloudMap users may think of this as a combined Hawaiian Variant and Variant Discovery Mapping analysis). | |
274 | |
275 ------------- | |
276 | |
277 **Input:** | |
0 | 278 |
6 | 279 Valid input for this tool are VCF files (any VCF file in SVD mode, a MiModD-generated multi-sample VCF file in VAF mode) or a CloudMap tabular report file as generated by the Hawaiian Variant Mapping tool. Alternatively, the tool can generate (in both modes) its own tabular report file, which can be used as input instead of the original VCF file when rerunning the tool with different plotting parameters to reduce analysis time. |
280 | |
281 .. class:: infomark | |
282 | |
283 CloudMap-generated tabular input files require, as additional input, a CloudMap-style sequence dictionary (even if the original CloudMap analysis was possible without one) as described in the original CloudMap paper. This file has a simple two-column tab-delimited format, in which each line lists the chromosome name (as it appears in the input VCF file) and the up-rounded length of the chromosome in megabases. | |
284 | |
285 ------------- | |
286 | |
287 **Output:** | |
288 | |
289 The tool produces up to three output files: | |
0 | 290 |
6 | 291 1) a default tabular file of binned variant counts that can be used to plot the data with external software such as Excel, |
292 | |
293 | |
294 2) an optional pdf containing linkage plots, which should look just like the plots produced by CloudMap, but are optimized for file size and display speed and offer more user-configurable parameters and | |
295 | |
296 | |
297 3) an optional tabular per-variant report file, which can be configured to be either a valid input file for the corresponding original CloudMap tool (for users who really, really want to continue using CloudMap for plotting) or to be reusable in fast reruns of the tool (which can be useful to experiment with different plotting parameters). | |
4 | 298 |
6 | 299 ------------- |
4 | 300 |
6 | 301 **Settings:** |
302 | |
303 1) Analysis settings | |
0 | 304 |
6 | 305 *bin size to analyze variants in* - determines the width of the regions along each chromosome, in which variants are counted and analyzed together. |
306 | |
307 Several bin sizes can be specified and for each size you will get a corresponding report section in the binned variant counts file and a histogram plot in the linkage plots file. | |
308 | |
309 *normalize variant counts to bin-width* - if selected (as per default) the variant counts for different bin sizes are not absolute, but normalized to the bin width | |
310 | |
311 *sample names (in VAF mode only)* - to analyze inheritance patterns, VAF mode needs information about the relationship between the samples defined in the input VCF file: | |
312 | |
313 The *mapping sample name* should be set to the name of the sample for which the inheritance pattern is to be analyzed (the pooled progeny population). | |
314 | |
315 The *name of the related sample* should be that of the parent sample that carried and brought in the unknown mutation to be mapped (or, alternatively, that of a closely related ancestor). | |
316 | |
317 Finally, the *name of the unrelated sample* should be that of the other parent strain used in the cross. | |
318 | |
319 At least one of the parent samples MUST be specified, but if the input file contains variant information for both parents, they can be analyzed together for higher mapping accuracy. If you are reanalyzing a tabular report file from a previous tool run or from CloudMap, the association between variants and samples is already incorporated into the input file and cannot be specified again. | |
0 | 320 |
6 | 321 2) Graphical output settings |
322 | |
323 .. class:: warningmark | |
324 | |
325 To be able to generate plots the system running MiModD needs to have the statistical programming environment R and its Python interface rpy2 installed. | |
326 | |
4 | 327 |
6 | 328 *y-axes scaling* - if you want to override the defaults |
329 | |
330 *x-axis scaling* - choose *preserve relative contig sizes* if you want the largest chromosome to fit the page width and smaller chromosomes to appear according to their relative size or choose *scale each contig to fit the plot width* if all chromosomes should exploit the available space | |
331 | |
332 *span value to be used in calculating the Loess regression line* - this value determines the degree of smoothing of the regression line through the scatterplot data. Information on loess regression and the loess span parameter can be found at http://en.wikipedia.org/wiki/Local_regression. The default is 0.1 as in CloudMap. | |
333 | |
334 *colors used for plotting* - can be selected freely from the offered palette. For histogram colors, the list of selected colors will be used to provide the colors for the different histograms plotted. If less colors than histograms (determined by the number of bin sizes selected) are specified, colors from the list will be recycled. | |
335 | |
0 | 336 |
337 .. _CloudMap: https://usegalaxy.org/u/gm2123/p/cloudmap | |
6 | 338 .. _mapping-by-sequencing analysis workflows in MiModD: http://mimodd.readthedocs.org/en/latest/cloudmap.html |
0 | 339 </help> |
340 </tool> |