diff seqsero2.xml @ 0:fc22ec8e924e draft

planemo upload commit 6b0a9d0f0ef4bdb0c2e2c54070b510ff28125f7a
author cstrittmatter
date Tue, 21 Apr 2020 12:45:34 -0400
parents
children 9811f8cd313d
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/seqsero2.xml	Tue Apr 21 12:45:34 2020 -0400
@@ -0,0 +1,196 @@
+<tool id="seqsero2v110" name="SeqSero2 v1.1.0" version="1.1.0">
+    <description>Salmonella serotype prediction</description>
+    <requirements>
+      <requirement type="package" version="3.6">python</requirement>
+      <requirement type="package" version="1.74">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>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+      echo "SeqSero2 v1.1.2" ;
+      mkdir ./output;
+
+      #if $reads.reads_select == 'history'
+        #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;
+      #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 ;
+      python $__tool_directory__/SeqSero2_package.py
+        -p \${GALAXY_SLOTS:-4}
+        -t $tval 
+        -m $mode
+        -d ./output
+      #if $mode == 'a':
+        -b $maptype 
+      #end if
+        -i $infile &&
+        echo "-=-=-=-=-" &&
+        cat output/SeqSero_log.txt &&
+        echo "-=-=-=-=-" &&
+        ls -lah ./output
+    ]]></command>
+    <inputs>
+        
+        <conditional name="reads">
+            <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" />
+            </when>
+            <when value="history">
+                <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" />
+          <param name="fastq2" type="data" format="fastq" label="FASTQ paired end read 2" /> -->
+          <!-- <param name="numofthr" type="select" label="Number of threads">
+          <option value="1">1</option>
+          <option value="2">2</option>
+          <option value="3">3</option>
+          <option value="4">4</option> -->
+        <!-- </param> -->
+        
+        <param label="Analysis mode" type="select" name="mode">
+         <option value="a">allele mode</option>
+         <option value="k">k-mer mode</option>
+        </param>
+
+        <param name="maptype" type="select" label="Algorithms for BWA mapping">
+          <option value="mem">mem</option>
+          <option value="sam">sam</option>
+        </param>
+
+    
+
+    </inputs>
+    <outputs>
+      <data format="tabular" label="SeqSero Results" name="results" from_work_dir="output/SeqSero_result.txt"/>
+    </outputs>
+    <tests>
+       <!-- <test>
+         <param name="reads_select" value="history" />
+         <param name="forward" value="forward.fastq.gz" ftype="fastqsanger.gz" />
+         <param name="reverse" value="reverse.fastq.gz" ftype="fastqsanger.gz" />
+         <output name="results" file="Seqsero_result.tsv" />
+       </test>
+       <test>
+        <param name="reads_select" value="collection" />
+        <param name="coll">
+            <collection type="paired">
+                <element name="forward" value="forward.fastq.gz" ftype="fastqsanger.gz" />
+                <element name="reverse" value="reverse.fastq.gz" ftype="fastqsanger.gz" />
+            </collection>
+        </param>
+        <output name="results" file="Seqsero_result.tsv" />
+       </test> -->
+        <test>
+         <param name="mode" value="k" />
+         <param name="reads_select" value="history" />
+         <param name="forward" value="forward_25k.fastq.gz" ftype="fastqsanger" />
+         <param name="reverse" value="reverse_25k.fastq.gz" ftype="fastqsanger" />
+         <output name="results" file="Seqsero_result_25k.tsv" />
+       </test>
+       <test>
+        <param name="mode" value="k" />
+        <param name="reads_select" value="collection" />
+        <param name="coll">
+            <collection type="paired">
+                <element name="forward" value="forward_25k.fastq.gz" ftype="fastqsanger.gz" />
+                <element name="reverse" value="reverse_25k.fastq.gz" ftype="fastqsanger.gz" />
+            </collection>
+        </param>
+        <output name="results" file="Seqsero_result_25k_coll.tsv" />
+       </test>
+        <test>
+         <param name="mode" value="a" />
+         <param name="reads_select" value="history" />
+         <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" />
+         </assert_stdout>
+       </test>
+       <!-- <test>
+        <param name="mode" value="a" />
+        <param name="reads_select" value="collection" />
+        <param name="coll">
+            <collection type="paired">
+                <element name="forward" value="forward_25k.fastq.gz" ftype="fastqsanger.gz" />
+                <element name="reverse" value="reverse_25k.fastq.gz" ftype="fastqsanger.gz" />
+            </collection>
+        </param>
+        <output name="results" file="Seqsero_result_allele.tsv" />
+       </test> -->
+    </tests>
+    <help><![CDATA[
+    
+**Usage: SeqSero2.py** 
+
+**Algorithms for BWA mapping**
+
+'mem' for mem, 'sam' for samse/sampe; default=mem; optional; for now SeqSero2 is only optimized for "mem" mode
+   
+    ]]></help>
+    <citations>
+       <citation type="bibtex">
+        @misc{zhang_yin_jones_zhang_deathrage_dinsmore_fitzgeral_fields_deng_2015,
+        title={Salmonella serotype determination utilizing high-throughput genome sequencing data.},
+        journal={J Clin Microbiol}, publisher={ASM},
+        author={Zhang S, Yin Y, Jones MB, Zhang Z, Deatherage Kaiser BL, Dinsmore BA, Fitzgerald C, Fields PI, Deng X.},
+        year={2015}, month={Max},
+        url={http://http://jcm.asm.org/content/early/2015/03/05/JCM.00323-15}},
+       }</citation>
+       <citation type="bibtex">
+        @misc{cfsan_biostatistics_group_2017,
+        title={CFSAN Biostatistics Group fork of SeqSero2},
+        url={https://github.com/CFSAN-Biostatistics/SeqSero2.git}},
+       </citation>
+    </citations>
+
+</tool>