diff vapor.xml @ 2:b1ca81ce88f9 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/vapor commit 4eb29c16fda3267d50f57448a28807b03c33a96f
author iuc
date Tue, 04 Oct 2022 21:13:05 +0000
parents 7bf891a13ace
children f11d2dd29b2b
line wrap: on
line diff
--- a/vapor.xml	Sat Oct 01 14:11:42 2022 +0000
+++ b/vapor.xml	Tue Oct 04 21:13:05 2022 +0000
@@ -12,6 +12,18 @@
         <requirement type="package" version="@TOOL_VERSION@">vapor</requirement>
     </requirements>
     <command detect_errors="exit_code"><![CDATA[
+        #set $fastq_files = []
+        mkdir fastq_files &&
+        #for $i, $fastq in enumerate($fastq_file)
+            #if $fastq.ext.endswith(".gz")
+                #set $ext='.fastq.gz'
+            #else
+                #set $ext='.fastq'
+            #end if
+            #set $out = './fastq_files/input_%s%s' % ($i, $ext)
+            ln -s '${fastq}' $out &&
+            $fastq_files.append($out)
+        #end for
         vapor.py
             --return_best_n $opt.return_best_n
             #if $output_type == "fasta"
@@ -22,7 +34,10 @@
             -c '$opt.min_kmer_cov'
             -m '$opt.min_kmer_prop'
             -fa '$fasta_file'
-            -fq '$fastq_file'
+            -fq 
+            #for $fq in $fastq_files
+                '${fq}'
+            #end for
             -f '$opt.top_seed_frac'
             -q
         > out_file
@@ -55,12 +70,22 @@
         </data>
     </outputs>
     <tests>
-        <test expect_num_outputs="1">
+        <test expect_num_outputs="1"><!-- Test 1: fastq -->
             <param name="fasta_file" value="HA_sample.fa" />
-            <param name="fastq_file" value="test_reads.fq" />
+            <param name="fastq_file" ftype="fastq" value="test_reads.fq" />
             <output name="output_scores" file="output1.tab" />
         </test>
-        <test expect_num_outputs="1">
+        <test expect_num_outputs="1"><!-- Test 2: multiple fastq -->
+            <param name="fasta_file" value="HA_sample.fa" />
+            <param name="fastq_file" ftype="fastq" value="test_reads.fq,test_reads2.fq" />
+            <output name="output_scores" file="output2.tab" />
+        </test>
+        <test expect_num_outputs="1"><!-- Test 3: fastqsanger.gz -->
+            <param name="fasta_file" value="HA_sample.fa" />
+            <param name="fastq_file" ftype="fastqsanger.gz" value="test_reads.fastqsanger.gz" />
+            <output name="output_scores" file="output1.tab" />
+        </test>
+        <test expect_num_outputs="1"><!-- Test 4: opt -->
             <param name="fasta_file" value="HA_sample.fa" />
             <param name="fastq_file" value="test_reads.fastqsanger.gz" />
             <output name="output_scores" file="output1.tab" />
@@ -75,16 +100,16 @@
                 <param name="min_kmer_prop" value="0.5" />
                 <param name="top_seed_frac" value="0.5" />
             </section>
-            <output name="output_scores" file="output2.tab" />
+            <output name="output_scores" file="output4.tab" />
         </test>
-        <test expect_num_outputs="1">
+        <test expect_num_outputs="1"><!-- Test 5: fasta output-->
             <param name="fasta_file" value="HA_sample.fa" />
             <param name="fastq_file" value="test_reads.fq" />
             <param name="output_type" value="fasta" />
             <section name="opt">
                 <param name="return_best_n" value="3" />
             </section>
-            <output name="output_fasta" file="output3.fa" />
+            <output name="output_fasta" file="output5.fa" />
         </test>
     </tests>
     <help><![CDATA[