diff snippy-core.xml @ 2:776ebd1239da draft

planemo upload commit dcedcb76831fd639d1468a308a78ac359ecd2496
author iuc
date Mon, 18 Mar 2019 10:59:29 -0400
parents c9a8ef2aa380
children 9bccc8404a3c
line wrap: on
line diff
--- a/snippy-core.xml	Sat Jan 26 14:36:48 2019 -0500
+++ b/snippy-core.xml	Mon Mar 18 10:59:29 2019 -0400
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
 <tool id="snippy_core" name="snippy-core" version="@VERSION@">
     <description>
         Combine multiple Snippy outputs into a core SNP alignment
@@ -7,16 +8,19 @@
     </macros>
     <expand macro="requirements" />
     <command detect_errors="exit_code"><![CDATA[
-
-        perl '$__tool_directory__/snippy_core_wrapper.pl'
-            '$is_reference'
-            --indirs '${" ".join(map(str, $indirs))}'
-
+        #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([os.path.splitext(os.path.basename(str($indir.name)))[0] for $indir in $indirs])
+        snippy-core
+            --ref '$ref'
+            ${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="is_reference" type="boolean" checked="true" truevalue="--noref" falsevalue="" label="Exclude reference" help="Don't include the reference file in the 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" />
         <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>
@@ -42,11 +46,11 @@
     </outputs>
 
     <tests>
-        <test><!-- Test #1 - test with 2 zipped directories -->
-            <param name="indirs" value="S1.tgz,S2.tgz" />
-            <param name="is_reference" value="false" />
+        <test><!-- Test #1 - test with 3 zipped directories -->
+            <param name="indirs" value="a.tgz,b.tgz,c.tgz" />
+            <param name="ref" value="reference.fasta" />
             <param name="outputs" value="outtxt" />
-            <output name="alignment_summary" ftype="txt" file="core/core.txt" />
+            <output name="alignment_summary" ftype="txt" file="a_b_c.core.txt" />
         </test>
     </tests>
 
@@ -71,6 +75,5 @@
 snippy **must** have been run with --cleanup False
 
     ]]></help>
-
     <expand macro="citations" />
 </tool>