view seqsero2.xml @ 2:15572bf93a2a

planemo upload
author jpayne
date Fri, 09 Nov 2018 16:02:31 -0500
parents fae43708974d
children b18e8cdfdf81
line wrap: on
line source
<tool id="seqsero_v2" name="SeqSero 2" version="2.0">
    <description>Salmonella serotype prediction</description>
    <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.12.0">spades</requirement>
      <requirement type="package" version="2.27.1">bedtools</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
      #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
        ln -s forward.fastq ${name}_1.fastq;
        ln -s reverse.fastq ${name}_2.fastq;
      mkdir ./output;
        python $__tool_directory__/SeqSero2/SeqSero2_package.py
        -p \${GALAXY_SLOTS:-4}
        -t 2
        -m $mode
        -d ./output
      #if $mode == 'a':
        -b $maptype 
      #end if
        -i ${name}_1.fastq ${name}_2.fastq &&
        echo "-=-=-=-=-" &&
        cat output/SeqSero_log.txt &&
        echo "-=-=-=-=-" &&
        ls -lah ./output
    ]]></command>
    <inputs>
        
        <conditional name="reads">
            <param name="reads_select" type="select" label="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>
            </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>
        </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="k">k-mer mode</option>
            <option value="a">allele 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.tsv"/>
    </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.gz" />
         <param name="reverse" value="reverse_25k.fastq.gz" ftype="fastqsanger.gz" />
         <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="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>
    </citations>

</tool>