diff seqsero2.xml @ 14:496f5f2b5e75

Uploaded
author estrain
date Tue, 14 Feb 2023 12:11:27 -0500
parents 3513b93ebe6a
children 3b6d5b60968f
line wrap: on
line diff
--- a/seqsero2.xml	Tue Sep 03 12:40:46 2019 -0400
+++ b/seqsero2.xml	Tue Feb 14 12:11:27 2023 -0500
@@ -1,49 +1,63 @@
-<tool id="seqsero_v2" name="SeqSero 2" version="2.0.1">
+<tool id="seqsero2v111" name="SeqSero2 v1.2.1" version="8">
     <description>Salmonella serotype prediction</description>
+    <macros>
+        <token name="@VERSION@">1.2.1</token>
+    </macros>
     <requirements>
-      <requirement type="package" version="3.6">python</requirement>
-      <requirement type="package" version="1.70">biopython</requirement>
-      <requirement type="package" version="2.7.1">blast</requirement>
-      <requirement type="package" version="1.9">samtools</requirement>
-      <requirement type="package" version="2.9.1">sra-tools</requirement>
-      <requirement type="package" version="0.7.17">bwa</requirement>
-      <requirement type="package" version="3.13.1">spades</requirement>
-      <requirement type="package" version="2.27.1">bedtools</requirement>
+        <requirement type="package" version="@VERSION@">seqsero2</requirement>
     </requirements>
     <command detect_errors="exit_code"><![CDATA[
-      echo "SeqSero 2 v. 1.0.0" ;
+      echo "SeqSero2 v1.2.1";
+      mkdir ./output;
+
       #if $reads.reads_select == 'history'
-      #set $name = $reads.forward.name.split('.')[0].replace(' ','_')
-      #set $forward = $reads.forward
-      #set $reverse = $reads.reverse
-      #else
-      #set $name = $reads.coll.name.replace(' ', '_')
-      #set $forward = $reads.coll.forward
-      #set $reverse = $reads.coll.reverse
-      #end if
-        echo $name ;
-        echo "-=-=-=-=-" ;
-      #if $forward.is_of_type('fastq.gz', 'fastqsanger.gz')
-        gunzip -c $forward > forward.fastq;
-      #set $forward = './forward.fastq'
-      #end if
-      #if $reverse.is_of_type('fastq.gz', 'fastqsanger.gz')
-        gunzip -c $reverse > reverse.fastq;
-      #set $reverse = './reverse.fastq'
-      #end if
+        #set $name = $reads.forward.name.split('.')[0].replace(' ','_')
+        #set $forward = $reads.forward
+        #set $reverse = $reads.reverse
+        #set $infile = $name + "_1.fastq " +  $name + "_2.fastq" 
+        #set $tval = 2
+        #if $reverse.is_of_type('fastq.gz', 'fastqsanger.gz')
+          gunzip -c $reverse > reverse.fastq;
+          #set $reverse = './reverse.fastq'
+          gunzip -c $forward > forward.fastq;
+          #set $forward = './forward.fastq'
+        #end if
         ln -s $forward ${name}_1.fastq;
         ln -s $reverse ${name}_2.fastq;
-        mkdir ./output;
-        touch output/SeqSero_log.txt ;
-        python $__tool_directory__/SeqSero2/SeqSero2_package.py
-        -p \${GALAXY_SLOTS:-4}
-        -t 2
+      #else if $reads.reads_select == 'collection'
+        #set $name = $reads.coll.name.replace(' ', '_')
+        #set $forward = $reads.coll.forward
+        #set $reverse = $reads.coll.reverse
+        #set $infile = $name + "_1.fastq " +  $name + "_2.fastq" 
+        #set $tval = 2
+        #if $reverse.is_of_type('fastq.gz', 'fastqsanger.gz')
+          gunzip -c $reverse > reverse.fastq;
+          #set $reverse = './reverse.fastq'
+          gunzip -c $forward > forward.fastq;
+          #set $forward = './forward.fastq'
+        #end if
+        ln -s $forward ${name}_1.fastq;
+        ln -s $reverse ${name}_2.fastq;
+      #else 
+        #set $name = $reads.assembly.name.replace(' ', '_')
+        #set $ga = $reads.assembly
+        #set $infile = $name + ".fasta" 
+        ln -s $ga ${name}.fasta;
+        #set $tval = 4
+        #set $mode='k'
+      #end if
+      echo $name ;
+      echo "-=-=-=-=-" ;
+      touch output/SeqSero_log.txt ;
+      SeqSero2_package.py
+        -p \${GALAXY_SLOTS:-1}
+        -t $tval 
         -m $mode
         -d ./output
       #if $mode == 'a':
         -b $maptype 
       #end if
-        -i ${name}_1.fastq ${name}_2.fastq &&
+        -i $infile &&
         echo "-=-=-=-=-" &&
         cat output/SeqSero_log.txt &&
         echo "-=-=-=-=-" &&
@@ -52,9 +66,10 @@
     <inputs>
         
         <conditional name="reads">
-            <param name="reads_select" type="select" label="Paired-end collection, or two datasets from your history">
+            <param name="reads_select" type="select" label="Genome assembly,paired-end collection, or two datasets from your history">
                 <option value="collection">Paired collection from your history</option>
                 <option value="history">Two FASTQ datasets from your history</option>
+                <option value="genome">Genome Assembly</option>
             </param>
             <when value="collection">
                 <param label="Paired reads" name="coll" type="data_collection" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" collection_type="paired" />
@@ -63,6 +78,9 @@
                 <param label="Forward reads" type="data" name="forward" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" />
                 <param label="Reverse reads" type="data" name="reverse" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" />
             </when>
+            <when value="genome">
+                <param label="Genome assembly" name="assembly" type="data" format="fasta"/>
+            </when>
         </conditional>
      
           <!-- <param name="fastq1" type="data" format="fastq" label="FASTQ paired end read 1" />
@@ -75,8 +93,8 @@
         <!-- </param> -->
         
         <param label="Analysis mode" type="select" name="mode">
-        	<option value="a">allele mode</option>
-            <option value="k">k-mer mode</option>
+         <option value="a">allele mode</option>
+         <option value="k">k-mer mode</option>
         </param>
 
         <param name="maptype" type="select" label="Algorithms for BWA mapping">
@@ -88,7 +106,7 @@
 
     </inputs>
     <outputs>
-      <data format="tabular" label="SeqSero Results" name="results" from_work_dir="output/Seqsero_result.tsv"/>
+      <data format="tabular" label="SeqSero Results" name="results" from_work_dir="output/SeqSero_result.tsv"/>
     </outputs>
     <tests>
        <!-- <test>
@@ -131,7 +149,7 @@
          <param name="forward" value="forward_250k.fastq.gz" ftype="fastqsanger" />
          <param name="reverse" value="reverse_250k.fastq.gz" ftype="fastqsanger" />
          <assert_stdout>
-         	<has_text text="predicted antigenic profile does not exist" />
+          <has_text text="predicted antigenic profile does not exist" />
          </assert_stdout>
        </test>
        <!-- <test>