changeset 5:201302fa7651 draft default tip

"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/blob/master/tools/snippy_clean commit 66a9f18802686a105b392e73e82c0078d0cdf2a4"
author dfornika
date Thu, 30 Jan 2020 01:20:57 +0000
parents 0bd30a111a55
children
files snippy_clean_full_aln.xml test-data/core.full.nonclean.aln
diffstat 2 files changed, 23 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/snippy_clean_full_aln.xml	Thu Jan 30 00:02:46 2020 +0000
+++ b/snippy_clean_full_aln.xml	Thu Jan 30 01:20:57 2020 +0000
@@ -10,22 +10,30 @@
     <command detect_errors="exit_code"><![CDATA[
         snippy-clean_full_aln
             '${full_aln}'
-            --to '${to_char}'
+            #if $custom_char.custom_char_selector:
+              --to '${custom_char.to_char}'
+            #end if
             > '${clean_full_aln}'
     ]]></command>
 
     <inputs>
         <param name="full_aln" type="data" format="fasta" label="Snippy core.full.aln file" help="" />
-        <param name="to_char" type="text" default="N" label="Replacement character" help="Replace non-[AGTCN-] chars with this character" >
-            <sanitizer>
-                <valid initial="string.printable">
-                    <remove value="&apos;" />
-                </valid>
-                <mapping initial="none">
-                    <add source="&apos;" target="&apos;&quot;&apos;&quot;&apos;" />
-                </mapping>
-            </sanitizer>
-        </param>
+        <conditional name="custom_char">
+            <param name="custom_char_selector" type="boolean" display="radio" label="Use custom replacement character" />
+            <when value="false" />
+            <when value="true">
+                <param name="to_char" type="text" label="Replacement character" help="Replace non-[AGTCN-] chars with this character, defaults to 'N' if none entered" >
+                    <sanitizer>
+                        <valid initial="string.printable">
+                            <remove value="&apos;" />
+                        </valid>
+                        <mapping initial="none">
+                            <add source="&apos;" target="&apos;&quot;&apos;&quot;&apos;" />
+                        </mapping>
+                    </sanitizer>
+                </param>
+            </when>
+        </conditional>
     </inputs>
     <outputs>
         <data name="clean_full_aln" format="fasta" label="${tool.name} on ${on_string} cleaned core alignment" />
@@ -35,16 +43,17 @@
             <param name="full_aln" value="core.full.nonclean.aln" />
             <output name="clean_full_aln">
                 <assert_contents>
-                    <has_line line="GCNNGC" />
+                    <has_line line="GCNNCG" />
                 </assert_contents>
             </output>
         </test>
         <test>
             <param name="full_aln" value="core.full.nonclean.aln" />
+            <param name="custom_char_selector" value="true" />
             <param name="to_char" value="X" />
             <output name="clean_full_aln">
                 <assert_contents>
-                    <has_line line="GCXXGC" />
+                    <has_line line="GCXXCG" />
                 </assert_contents>
             </output>
         </test>
--- a/test-data/core.full.nonclean.aln	Thu Jan 30 00:02:46 2020 +0000
+++ b/test-data/core.full.nonclean.aln	Thu Jan 30 01:20:57 2020 +0000
@@ -1,4 +1,4 @@
 >Reference
 CGATGC
 >S1
-GC--GC
+GCXXCG