changeset 1:1425ea794026 draft default tip

planemo upload for repository https://github.com/wm75/mimodd_galaxy_wrappers commit 24cc567ad105450d1c554f09a3467eff671d9864
author wolma
date Mon, 18 Dec 2017 03:39:07 -0500
parents aa82b2e54055
children
files cloudmap.xml macros.xml reheader.xml sam_header.xml varreport.xml vcf_filter.xml
diffstat 6 files changed, 146 insertions(+), 118 deletions(-) [+]
line wrap: on
line diff
--- a/cloudmap.xml	Sat Nov 11 18:19:22 2017 -0500
+++ b/cloudmap.xml	Mon Dec 18 03:39:07 2017 -0500
@@ -18,8 +18,8 @@
                     <param name="show_kde" type="boolean" truevalue="" falsevalue="--no-kde" checked="true"
                     label="show kde line in histogram plots"
                     help="The tool can calculate a kernel density estimate for the linkage data based on a bin size of 10 kilobases and display it as a solid line in the histogram plots." />
-                    <param name="hylim" type="text" 
-                    label="upper limit for the histogram y-axis (leave blank for automatic scaling)" />
+                    <param name="hylim" type="float" value="0.0"
+                    label="upper limit for the histogram y-axis (leave at 0.0 for automatic scaling)" />
                     <param name="xlim" type="select" label="x-axis scaling">
                         <option value="">preserve relative contig sizes</option>
                         <option value="--fit-width">scale each contig to fit the plot width</option>
@@ -44,8 +44,8 @@
                     <param name="show_kde" type="boolean" truevalue="" falsevalue="--no-kde" checked="true"
                     label="show kde line in histogram plots"
                     help="The tool can calculate a kernel density estimate for the linkage data based on a bin size of 10 kilobases and display it as a solid line in the histogram plots." />
-                    <param name="hylim" type="text" 
-                    label="upper limit for the histogram y-axis (leave blank for automatic scaling)" />
+                    <param name="hylim" type="float" value="0.0" 
+                    label="upper limit for the histogram y-axis (leave at 0.0 for automatic scaling)" />
                     <param name="xlim" type="select" label="x-axis scaling">
                         <option value="">preserve relative contig sizes</option>
                         <option value="--fit-width">scale each contig to fit the plot width</option>
@@ -54,13 +54,13 @@
                 </when>
                 <when value="--no-hist -p">
                     <expand macro="hist_default" />
-                    <param name="sylim" type="text" 
+                    <param name="sylim" type="float" value="1.0" 
                     label="upper limit for the scatter plot y-axis (default: 1)" />
                     <param name="xlim" type="select" label="x-axis scaling">
                         <option value="">preserve relative contig sizes</option>
                         <option value="--fit-width">scale each contig to fit the plot width</option>
                     </param>
-                    <param name="span" type="text" 
+                    <param name="span" type="float" value="0.1" 
                     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)." />
                     <expand macro="scatter_colors" />
@@ -84,8 +84,8 @@
                     <param name="show_kde" type="boolean" truevalue="" falsevalue="--no-kde" checked="true"
                     label="show kde line in histogram plots"
                     help="The tool can calculate a kernel density estimate for the linkage data based on a bin size of 10 kilobases and display it as a solid line in the histogram plots." />
-                    <param name="hylim" type="text" 
-                    label="upper limit for the histogram y-axis (leave blank for automatic scaling)" />
+                    <param name="hylim" type="float" value="0.0" 
+                    label="upper limit for the histogram y-axis (leave at 0.0 for automatic scaling)" />
                     <param name="xlim" type="select" label="x-axis scaling">
                         <option value="">preserve relative contig sizes</option>
                         <option value="--fit-width">scale each contig to fit the plot width</option>
@@ -107,14 +107,16 @@
         <macro name="bins">
             <repeat name="bin_sizes" default="0" min="0" title="bin sizes to analyze variants in (defaults to: 1Mb and 500Kb)" 
             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.">
-                <param name="bin_size" type="text" />
+                <param name="bin_size" type="text">
+                     <validator type="empty_field" />
+                     <validator type="expression" message="Malformed bin size">not value or all(c.isdigit() or c in 'KMb' for c in value)</validator>
+                </param>
             </repeat>
         </macro>
         <macro name="scatter_default">
             <param name="sylim" type="hidden" value="" />
             <param name="span" type="hidden" value="" />
-            <param name="pcols" type="hidden" value="" />
-            <param name="lcols" type="hidden" value="" />
+            <param name="scols" type="hidden" value="" />
         </macro>
         <macro name="hist_default">
             <param name="show_kde" type="hidden" value="" />
@@ -130,16 +132,13 @@
             </repeat>
         </macro>
         <macro name="scatter_colors">
-            <repeat name="pcols" default="0" min="0" title="data point colors"
-            help="Series of data points will be plotted based on the colors selected here.">
-                <param name="pcol" type="color" value="black">
+            <repeat name="scols" default="0" min="0" max="1" title="custom scatter plot colors">
+                <param name="pcol" type="color" value="black"
+                label="data points base color">
                     <sanitizer><valid><add value="#" /></valid></sanitizer>
                 </param>
-            </repeat>
-            <repeat name="lcols" default="0" min="0"
-            title="regression line colors"
-            help="Regression lines through series of data will be plotted in the colors selected here.">
-                <param name="lcol" type="color" value="red">
+                <param name="lcol" type="color" value="red"
+                label="regression line color">
                     <sanitizer><valid><add value="#" /></valid></sanitizer>
                 </param>
             </repeat>
@@ -148,15 +147,15 @@
             <param name="show_kde" type="boolean" truevalue="" falsevalue="--no-kde" checked="true"
             label="show kde line in histogram plots"
             help="The tool can calculate a kernel density estimate for the linkage data based on a bin size of 10 kilobases and display it as a solid line in the histogram plots." />
-            <param name="hylim" type="text" 
-            label="upper limit for the histogram y-axis (leave blank for automatic scaling)" />
-            <param name="sylim" type="text" 
+            <param name="hylim" type="float" value="0.0"
+            label="upper limit for the histogram y-axis (leave at 0.0 for automatic scaling)" />
+            <param name="sylim" type="float" value="1.0"
             label="upper limit for the scatter plot y-axis (default: 1)" />
             <param name="xlim" type="select" label="x-axis scaling">
                 <option value="">preserve relative contig sizes</option>
                 <option value="--fit-width">scale each contig to fit the plot width</option>
             </param>
-            <param name="span" type="text" 
+            <param name="span" type="float" value="0.1"
             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)." />
             <expand macro="hist_colors" />
@@ -208,7 +207,7 @@
     <expand macro="stdio" />
     <expand macro="version_command" />
     <command><![CDATA[
-    mimodd map ${opt.mode} "${opt.source.ifile}"
+    mimodd map ${opt.mode} '${opt.source.ifile}'
       #if $str($opt.source.sample):
         -m '${opt.source.sample}'
       #end if
@@ -241,7 +240,7 @@
         $str($opt.source.plotopts.plots) '$pfile'
         $opt.source.plotopts.show_kde
         $str($opt.source.plotopts.xlim)
-        #if $str($opt.source.plotopts.hylim):
+        #if $str($opt.source.plotopts.hylim) and $opt.source.plotopts.hylim != 0.0:
           --ylim-hist $str($opt.source.plotopts.hylim)
         #end if
         #if $str($opt.source.plotopts.hcols) and $len($opt.source.plotopts.hcols):
@@ -253,16 +252,10 @@
         #if $str($opt.source.plotopts.sylim):
           --ylim-scatter $str($opt.source.plotopts.sylim)
         #end if
-        #if $str($opt.source.plotopts.pcols) and $len($opt.source.plotopts.pcols):
-          --points-colors 
-          #for $color in $opt.source.plotopts.pcols:
-            '${color.pcol}'
-          #end for
-        #end if
-        #if $str($opt.source.plotopts.lcols) and $len($opt.source.plotopts.lcols):
-          --loess-colors
-          #for $color in $opt.source.plotopts.lcols:
-            '${color.lcol}'
+        #if $str($opt.source.plotopts.scols) and $len($opt.source.plotopts.scols):
+          #for $color_scheme in $opt.source.plotopts.scols:
+            --points-colors '${color_scheme.pcol}'
+            --loess-colors '${color_scheme.lcol}'
           #end for
         #end if
         #if $str($opt.source.plotopts.span):
@@ -318,13 +311,18 @@
                         <param name="sample" type="text" 
                         label="mapping sample name" help="the sample to perform mutation mapping for">
                             <validator type="empty_field" />
+                            <expand macro="lex_sam_header" />
                         </param>
                         <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" />
+                        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">
+                            <expand macro="lex_sam_header" />
+                        </param>
                         <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" />
+                        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">
+                            <expand macro="lex_sam_header" />
+                        </param>
                         <param name="infer_missing" type="boolean" truevalue="--infer-missing" falsevalue="" checked="false" 
                         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!" />
@@ -364,11 +362,13 @@
                         label="mapping sample name"
                         help="the sample to perform mutation mapping for">
                             <validator type="empty_field" />
+                            <expand macro="lex_sam_header" />
                         </param>
                         <param name="contrast_sample" type="text"
                         label="name of the contrast sample"
                         help="the sample that provides contrasting allele composition around the causal variant">
                             <validator type="empty_field" />
+                            <expand macro="lex_sam_header" />
                         </param>
                         <expand macro="vac_unconditional" />
                         <param name="tabfile" type="select"
--- a/macros.xml	Sat Nov 11 18:19:22 2017 -0500
+++ b/macros.xml	Mon Dec 18 03:39:07 2017 -0500
@@ -1,7 +1,7 @@
 <macros>
     <token name="@MIMODD_VERSION_REQUIRED@">0.1.8</token>
     <token name="@MIMODD_REAL_VERSION@">0.1.8</token>
-    <token name="@MIMODD_WRAPPER_VERSION@">0.1.8_0</token>
+    <token name="@MIMODD_WRAPPER_VERSION@">0.1.8_1</token>
     <token name="@HELP_FOOTER@"><![CDATA[
 ----
 
@@ -9,7 +9,7 @@
 
    For **additional help** see these resources: 
 
-- The complete `MiModD User Guide <http://mimodd.readthedocs.io/en/v0.1.8/usage_toc.html>`__
+- The complete `MiModD User Guide <http://mimodd.readthedocs.io/en/doc0.1.8/usage_toc.html>`__
 
 - The `MiModD help forum <https://groups.google.com/forum/#!forum/mimodd>`__ reachable also via `email <mailto:mimodd@googlegroups.com>`__
 
@@ -41,6 +41,34 @@
             </citation>
         </citations>
     </xml>
+    <macro name="YYYY-MM-DD_format_validator">
+        <validator type="expression" message="YYYY-MM-DD date format required">not value or (len(value.split('-')) == 3 and all(part.isdigit() and len(part)==expect_len for part, expect_len in zip(value.split('-'), [4,2,2])))</validator>
+    </macro>
+    <macro name="known_sequencing_platform options">
+        <option value="ILLUMINA">ILLUMINA</option>
+        <option value="PACBIO">PACBIO</option>
+        <option value="IONTORRENT">IONTORRENT</option>
+        <option value="ONT">ONT</option>
+        <option value="LS454">LS454</option>
+        <option value="SOLID">SOLID</option>
+        <option value="HELICOS">HELICOS</option>
+        <option value="CAPILLARY">CAPILLARY</option>
+    </macro>
+    <macro name="lex_sam_header" token_message="SAM header data may not contain non-ASCII characters.">
+        <validator type="expression" message="@MESSAGE@">not value or all(ord(c) &lt; 127 for c in value)</validator>
+        <sanitizer invalid_char="">
+            <valid initial="string.printable">
+                <remove preset="string.whitespace" value="&#39;" />
+                <add value=" " />
+            </valid>
+            <mapping initial="none">
+                <add source="&#39;" target="&#39;&quot;&#39;&quot;&#39;" />
+                <add source="&#09;" target="&#32;" />
+                <add source="&#10;" target="&#32;" />
+                <add source="&#13;" target="&#32;" />
+            </mapping>
+        </sanitizer>
+    </macro>
 </macros>
 
 
--- a/reheader.xml	Sat Nov 11 18:19:22 2017 -0500
+++ b/reheader.xml	Mon Dec 18 03:39:07 2017 -0500
@@ -29,24 +29,41 @@
                         label="read-group ID (will create the read-group if it does not exist)"
                         help="required field">
                             <validator type="empty_field" />
+                            <expand macro="lex_sam_header" />
                         </param>
                         <param name="rg_id" type="hidden" value="" />
                         <param name="rg_sm" type="text" label="sample name"
                         help="required field">
                             <validator type="empty_field" />
+                            <expand macro="lex_sam_header" />
                         </param>
-                        <param name="rg_ds" type="text" label="description" />
+                        <param name="rg_ds" type="text" label="description">
+                            <expand macro="lex_sam_header" />
+                        </param>
                         <param name="rg_date" type="text"
-                        label="date (YY-MM-DD format) the run was produced" />
+                        label="date (YY-MM-DD format) the run was produced">
+                            <expand macro="YYYY-MM-DD_format_validator" />
+                        </param>
                         <param name="rg_cn" type="text"
-                        label="name of sequencing center" />
-                        <param name="rg_lb" type="text" label="read-group library" />
+                        label="name of sequencing center">
+                            <expand macro="lex_sam_header" />
+                        </param>
+                        <param name="rg_lb" type="text" label="read-group library">
+                            <expand macro="lex_sam_header" />
+                        </param>
                         <param name="rg_pl" type="text"
-                        label="platform/technology used to produce the reads" />
+                        label="platform/technology used to produce the reads">
+                            <expand macro="known_sequencing_platform options" />
+                            <expand macro="lex_sam_header" />
+                        </param>
                         <param name="rg_pi" type="text"
-                        label="predicted median insert size" />
+                        label="predicted median insert size">
+                            <validator type="expression" message="an integer number is required">not value or value.isdigit()</validator>
+                        </param>
                         <param name="rg_pu" type="text" 
-                        label="platform unit; unique identifier" />
+                        label="platform unit; unique identifier">
+                            <expand macro="lex_sam_header" />
+                        </param>
                     </repeat>    
                 </when>
             </conditional>
@@ -180,12 +197,16 @@
             </param>
             <when value="update">
                 <repeat name="coinfo" title="comment line" default="0" min="0">
-                    <param name="line" type="text" size="80" />
+                    <param name="line" type="text" size="80">
+                        <expand macro="lex_sam_header" />
+                    </param>
                 </repeat>
             </when>
             <when value="replace">
                 <repeat name="coinfo" title="comment line" default="0" min="0">
-                    <param name="line" type="text" size="80" />
+                    <param name="line" type="text" size="80">
+                        <expand macro="lex_sam_header" />
+                    </param>
                 </repeat>
             </when>
             <when value="ignore">
@@ -194,14 +215,23 @@
         <repeat name="rg_renaming" title="rename read-group" default="0" min="0"
         help="Warning: changing read-group IDs may increase job runtime substantially.">
             <param name="from" type="text" size="30" label="old name"
-            help="as it appears in the current input file header"/>
-            <param name="to" type="text" size="30" label="new name" />
+            help="as it appears in the current input file header">
+                <expand macro="lex_sam_header" />
+            </param>
+            <param name="to" type="text" size="30" label="new name">
+                <expand macro="lex_sam_header" />
+            </param>
         </repeat>
         <repeat name="sq_renaming" title="rename sequence" default="0" min="0"
         help="Warning: changing sequence names may increase job runtime substantially.">
             <param name="from" type="text" size="30" label="old name"
-            help="as it appears in the current input file header"/>
-            <param name="to" type="text" size="30" label="new name" />
+            help="as it appears in the current input file header">
+                <expand macro="lex_sam_header" />
+            </param>
+            <param name="to" type="text" size="30" label="new name">
+                <validator type="expression" message="Sequence names may not contain non-ASCII, whitespace, non-printable characters, nor any of: &lt;&gt;[]*;=,">all((32 &lt; ord(c) &lt; 127 and c not in '&lt;&gt;[]*;=,') for c in value)</validator>
+                <expand macro="lex_sam_header" />
+            </param>
         </repeat>
     </inputs>
   
--- a/sam_header.xml	Sat Nov 11 18:19:22 2017 -0500
+++ b/sam_header.xml	Mon Dec 18 03:39:07 2017 -0500
@@ -41,84 +41,38 @@
         <param name="rg_id" type="text" size="80"
         label="read-group ID (required)">
             <validator type="empty_field" />
-            <sanitizer invalid_char="">
-                <valid initial="string.printable">
-                    <remove value="&quot;" />
-                </valid>
-                <mapping initial="none">
-                    <add source="&quot;" target="\&quot;"/>
-                </mapping>
-            </sanitizer>
+            <expand macro="lex_sam_header" />
         </param>
         <param name="rg_sm" type="text" size="80"
         label="sample name (required)">
             <validator type="empty_field" />
-            <sanitizer invalid_char="">
-                <valid initial="string.printable">
-                    <remove value="&quot;" />
-                </valid>
-                <mapping initial="none">
-                    <add source="&quot;" target="\&quot;"/>
-                </mapping>
-            </sanitizer>
+            <expand macro="lex_sam_header" />
         </param>
         <param name="rg_ds" type="text" size="80" label="description">
-            <sanitizer invalid_char="">
-                <valid initial="string.printable">
-                    <remove value="&quot;" />
-                </valid>
-                <mapping initial="none">
-                    <add source="&quot;" target="\&quot;"/>
-                </mapping>
-            </sanitizer>
+            <expand macro="lex_sam_header" />
         </param>
         <param name="rg_date" type="text"
         label="date (YYYY-MM-DD) the run was produced">
-            <validator type="expression" message="YYYY-MM-DD date format required">not value or (len(value.split('-')) == 3 and all(part.isdigit() and len(part)==expect_len for part, expect_len in zip(value.split('-'), [4,2,2])))</validator>
+            <expand macro="YYYY-MM-DD_format_validator" />
         </param>
         <param name="rg_cn" type="text" size="80"
         label="name of sequencing center">
-            <sanitizer invalid_char="">
-                <valid initial="string.printable">
-                    <remove value="&quot;" />
-                </valid>
-                <mapping initial="none">
-                    <add source="&quot;" target="\&quot;"/>
-                </mapping>
-            </sanitizer>
+            <expand macro="lex_sam_header" />
         </param>
         <param name="rg_lb" type="text" size="80" label="read-group library">
-            <sanitizer invalid_char="">
-                <valid initial="string.printable">
-                    <remove value="&quot;" />
-                </valid>
-                <mapping initial="none">
-                    <add source="&quot;" target="\&quot;"/>
-                </mapping>
-            </sanitizer>
+            <expand macro="lex_sam_header" />
         </param>
         <param name="rg_pl" type="text"
         label="platform/technology used to produce the reads">
-            <option value="ILLUMINA">ILLUMINA</option>
-            <option value="PACBIO">PACBIO</option>
-            <option value="IONTORRENT">IONTORRENT</option>
-            <option value="ONT">ONT</option>
-            <option value="LS454">LS454</option>
-            <option value="SOLID">SOLID</option>
-            <option value="HELICOS">HELICOS</option>
-            <option value="CAPILLARY">CAPILLARY</option>
+            <expand macro="known_sequencing_platform options" />
+            <expand macro="lex_sam_header" />
         </param>
-        <param name="rg_pi" type="text" label="predicted median insert size" />
+        <param name="rg_pi" type="text" label="predicted median insert size">
+            <validator type="expression" message="an integer number is required">not value or value.isdigit()</validator>
+        </param>
         <param name="rg_pu" type="text" size="80"
         label="platform unit; unique identifier">
-            <sanitizer invalid_char="">
-                <valid initial="string.printable">
-                    <remove value="&quot;" />
-                </valid>
-                <mapping initial="none">
-                    <add source="&quot;" target="\&quot;"/>
-                </mapping>
-            </sanitizer>
+            <expand macro="lex_sam_header" />
         </param>
     </inputs>
 
--- a/varreport.xml	Sat Nov 11 18:19:22 2017 -0500
+++ b/varreport.xml	Mon Dec 18 03:39:07 2017 -0500
@@ -42,7 +42,9 @@
             </param>
             <when value="html">
                 <param name="species" type="text" label="Species"
-                help="If you declare the species your input data comes from, variant reports in html format can have hyperlinks to species-specific databases and genome browsers added. If you have used the MiModD Variant Annotation tool to generate the input dataset, the species information will already be recorded in the dataset, but you can overwrite it if you wish." />
+                help="If you declare the species your input data comes from, variant reports in html format can have hyperlinks to species-specific databases and genome browsers added. If you have used the MiModD Variant Annotation tool to generate the input dataset, the species information will already be recorded in the dataset, but you can overwrite it if you wish.">
+                    <expand macro="lex_sam_header" message="Non-ASCII characters are not allowed in species names." />
+                </param>
                 <param name="link_formatter" type="data" format="txt" optional="true"
                 label="Optional file with species-specific hyperlink formatting instructions"
                 help="If the tool has no built-in support for your species, i.e., it does not know how to generate hyperlinks for it, you can provide a custom recipe here." />
--- a/vcf_filter.xml	Sat Nov 11 18:19:22 2017 -0500
+++ b/vcf_filter.xml	Mon Dec 18 03:39:07 2017 -0500
@@ -57,10 +57,14 @@
         <param name="inputfile" type="data" format="vcf" label="VCF input file" />
         <repeat name="datasets" title="Sample-specific Filter" default="0" min="0">
             <param name="sample" type="text" label="sample"
-            help="name of a sample as it appears in the VCF input file and that indicates the sample that this filter should be applied to." />
+            help="name of a sample as it appears in the VCF input file and that indicates the sample that this filter should be applied to.">
+                <expand macro="lex_sam_header" message="Non-ASCII characters are not valid in sample names." />
+            </param>
 	        <param name="GT" type="text" 
 	        label="genotype pattern(s) for the inclusion of variants"
-	        help="keep only variants for which the genotype of the sample matches the specified pattern; format: x/x where x = 0 is wildtype and x = 1 is mutant. Multiple genotypes can be specified as a comma-separated list." />
+	        help="keep only variants for which the genotype of the sample matches the specified pattern; format: x/x where x = 0 is wildtype and x = 1 is mutant. Multiple genotypes can be specified as a comma-separated list.">
+	            <validator type="expression" message="Malformed genotype pattern">not value or all(c.isdigit() or c in './|' for token in value.split(',') for c in token.strip(' '))</validator>
+	        </param>
 	        <param name="DP" type="integer" value="0" 
 	        label="depth of coverage for the sample at the variant site"
 	        help="keep only variants with at least this sample-specific coverage at the variant site" />
@@ -69,13 +73,21 @@
         	help="keep only variants for which the genotype prediction for the sample has at least this quality" />
 	        <param name="AF" type="text"
 	        label="allelic fraction filter"
-	        help="expected format: [allele number]:[minimal fraction]:[maximal fraction]; keep only variants for which the fraction of sample-specific reads supporting a given allele number is between minimal and maximal fraction; if allele number is omitted, the filter operates on the most frequent non-reference allele instead" />
+	        help="expected format: [allele number]:[minimal fraction]:[maximal fraction]; keep only variants for which the fraction of sample-specific reads supporting a given allele number is between minimal and maximal fraction; if allele number is omitted, the filter operates on the most frequent non-reference allele instead">
+	            <validator type="expression" message="Malformed allelic fraction filter">not value or all(c.isdigit() or c in '.:' for c in value)</validator>
+	        </param>
         </repeat>
         <repeat name="regions" title="Region Filter" default="0" min="0"
         help="Filter variant sites by their position in the genome. If multiple Region Filters are specified, all variants that fall in ONE of the regions are reported.">
-            <param name="chrom" type="text" label="Chromosome" />
-            <param name="start" type="text" label="Region Start" />
-            <param name="stop" type="text" label="Region End" />
+            <param name="chrom" type="text" label="Chromosome">
+                <expand macro="lex_sam_header" message="Non-ASCII characters are not valid in chromosome names." />
+            </param>
+            <param name="start" type="text" label="Region Start">
+                <validator type="expression" message="an integer number is required">not value or value.isdigit()</validator>
+            </param>
+            <param name="stop" type="text" label="Region End">
+                <validator type="expression" message="an integer number is required">not value or value.isdigit()</validator>
+            </param>
         </repeat>
         <param name="vartype" type="select" 
         label="Select the types of variants to include in the output">
@@ -84,7 +96,9 @@
             <option value="--indels-only">only indels</option>
         </param>
         <param name="vfilter" type="text" label="sample"
-        help="Filter output by sample name; only the sample-specific columns with their sample name matching any of the comma separated filters will be retained in the output." />
+        help="Filter output by sample name; only the sample-specific columns with their sample name matching any of the comma separated filters will be retained in the output.">
+            <expand macro="lex_sam_header" message="Non-ASCII characters are not valid in sample names." />
+        </param>
     </inputs>
   
     <outputs>