diff sarscov2formatter.xml @ 1:e3a7995dce75 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sarscov2formatter commit 1bd215457a39296c069caa6be30939f4f1bdadeb"
author iuc
date Fri, 20 Nov 2020 18:21:33 +0000
parents 1c664ff29354
children 2e993ff8e7dc
line wrap: on
line diff
--- a/sarscov2formatter.xml	Mon May 04 05:39:35 2020 -0400
+++ b/sarscov2formatter.xml	Fri Nov 20 18:21:33 2020 +0000
@@ -1,10 +1,10 @@
-<tool id="sarscov2formatter" name="sarscov2formatter" version="0.1" profile="18.01">
+<tool id="sarscov2formatter" name="sarscov2formatter" version="0.5.3+galaxy1" profile="18.01">
     <requirements>
-        <requirement type="package" version="0.5.2">sarscov2formatter</requirement>
+        <requirement type="package" version="0.5.3">sarscov2formatter</requirement>
     </requirements>
     <command><![CDATA[
 sarscov2formatter
--a $align
+-a '$align'
 #if $source.source_choice == 'ncbi':
     -m ncbi
 #else:
@@ -20,7 +20,7 @@
             </param>
             <when value="ncbi" />
             <when value="other" >
-                 <param name="meta" type="data" format='tabular' label="Metadata source" help="Tabular file with metadata with the correct columns (see below)" />
+                 <param name="meta" type="data" format="tabular" label="Metadata source" help="Tabular file with metadata with the correct columns (see below)" />
             </when>
         </conditional>
     </inputs>
@@ -30,13 +30,42 @@
         <data name="outmeta" format="json" from_work_dir="meta.json" label="${tool.name}: Metadata" />
     </outputs>
     <tests>
+        <!-- note: test with ncbi yields unstable results for meta -> assert contents.
+             also needs a surprising amount memory (1.7G) which might
+             become impractival in the future -->
         <test>
             <param name="align" ftype="fasta" value="align.fasta" />
             <param name="source_choice" value="ncbi" />
             <output name="msa" ftype="fasta" compare="diff" value="msa.fasta" />
             <output name="dups" ftype="json" compare="diff" value="dups.json" />
-            <output name="outmeta" ftype="json" compare="diff" value="meta.json" />
+            <output name="outmeta" ftype="json">
+                <assert_contents>
+                    <has_line_matching expression="\{"/>
+                    <has_line_matching expression="\}"/>
+                    <has_text_matching expression='"LR757995": \{'/>
+                    <has_text_matching expression='"collected": '/>
+                    <has_text_matching expression='"collected": '/>
+                    <has_text_matching expression='"location": '/>
+                    <has_text_matching expression='"country": '/>
+                    <has_text_matching expression='"locality": '/>
+                    <has_text_matching expression='"state": '/>
+                    <has_text_matching expression='"subregion": '/>
+                </assert_contents>
+            </output>
         </test>
+        <!-- TODO test with tabular input, does not work yet
+             test.tsv has been generated with test.py
+             https://github.com/nickeener/sarscov2formatter/issues/2 -->
+<!--        <test>-->
+<!--            <param name="align" ftype="fasta" value="align.fasta" />-->
+<!--            <conditional name="source" >-->
+<!--                <param name="source_choice" value="other" />-->
+<!--                <param name="meta" ftype="tabular" value="test.tsv" />-->
+<!--            </conditional>-->
+<!--            <output name="msa" ftype="fasta" compare="diff" value="msa-other.fasta" />-->
+<!--            <output name="dups" ftype="json" compare="diff" value="dups-other.json" />-->
+<!--            <output name="outmeta" ftype="json" compare="diff" value="meta-other.json" />-->
+<!--        </test>-->
     </tests>
         <help><![CDATA[