diff snippy-core.xml @ 5:0aa87d97847f draft

"planemo upload commit 13d17dd18915767d3ca5bbd92ce3e5e80a287112"
author iuc
date Fri, 13 Sep 2019 05:45:21 -0400
parents 9bccc8404a3c
children 32f2211eeec3
line wrap: on
line diff
--- a/snippy-core.xml	Thu Jul 11 09:41:13 2019 -0400
+++ b/snippy-core.xml	Fri Sep 13 05:45:21 2019 -0400
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<tool id="snippy_core" name="snippy-core" version="@VERSION@">
+<tool id="snippy_core" name="snippy-core" version="@VERSION@+galaxy0">
     <description>
         Combine multiple Snippy outputs into a core SNP alignment
     </description>
@@ -8,19 +8,20 @@
     </macros>
     <expand macro="requirements" />
     <command detect_errors="exit_code"><![CDATA[
+        @REFERENCE_SOURCE_FILE@
         #for $indir in $indirs
             #set $sample_name = os.path.splitext(os.path.basename(str($indir.name)))[0]
             mkdir '$sample_name' && tar -xf '$indir' -C '$sample_name' --strip-components=1 &&
         #end for
         #set snippy_dirs = " ".join(["'{0}'".format(os.path.splitext(os.path.basename(str($indir.name)))[0]) for $indir in $indirs])
         snippy-core
-            --ref '$ref'
+            @REFERENCE_COMMAND@
             ${snippy_dirs}
     ]]></command>
 
     <inputs>
         <param name="indirs" type="data" multiple="true" format="zip" label="Snippy input zipped dirs" help="Select all the snippy inputs for alignment" />
-        <param name="ref" type="data" format="fasta,genbank" label="Reference File (either in fasta or genbank format)" help="Fasta or Genbank file to use as the reference" />
+        <expand macro="reference_selector" />
         <param name="outputs" type="select" multiple="true" display="checkboxes" label="Output selection">
             <option value="outaln" selected="True">A core SNP alignment in the fasta format</option>
             <option value="outfull" selected="False">A whole genome SNP alignment (includes invariant sites)</option>
@@ -48,7 +49,19 @@
     <tests>
         <test><!-- Test #1 - test with 3 zipped directories -->
             <param name="indirs" value="a.tgz,b.tgz,c.tgz" />
-            <param name="ref" value="reference.fasta" />
+            <conditional name="reference_source">
+                <param name="reference_source_selector" value="history"/>
+                <param name="ref_file" value="reference.fasta" ftype="fasta"/>
+            </conditional>
+            <param name="outputs" value="outtxt" />
+            <output name="alignment_summary" ftype="txt" file="a_b_c.core.txt" />
+        </test>
+        <test><!-- Test #2 - test with 3 zipped directories -->
+            <param name="indirs" value="a.tgz,b.tgz,c.tgz" />
+            <conditional name="reference_source">
+                <param name="reference_source_selector" value="cached"/>
+                <param name="ref_file" value="test_id"/>
+            </conditional>
             <param name="outputs" value="outtxt" />
             <output name="alignment_summary" ftype="txt" file="a_b_c.core.txt" />
         </test>