view biotradis_bacteria_tradis.xml @ 11:47269fae5647 draft default tip

"planemo upload for repository https://github.com/quadram-institute-bioscience/galaxy-tools/tree/master/tools/biotradis commit 4d5e56c87ec94e7853b88a4d0a6f20e411640885-dirty"
author thanhlv
date Fri, 17 Jan 2020 12:47:22 -0500
parents 4e8358bc80f9
children
line wrap: on
line source

<tool id="bacteria_tradis" name="bacteria tradis" version="@VERSION@">
    <description>Generates a BAM file with tags added to read strings</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        #import re

        ## Creates symlinks for each input file based on the Galaxy 'element_identifier'
        ## Used so that a human-readable name appears in the output table (instead of 'dataset_xyz.dat')
        #set $named_input_files = ''
        #for $input_file in $input_files
            ## Add single quotes around each input file identifier
            #set $_input_file = "'{}'".format($input_file.element_identifier)
            ln -s '${input_file}' ${_input_file} &&
            echo ${_input_file} >> fq.list &&
        #end for

        bacteria_tradis -f fq.list
                        -t $tag
                        -r $ref
                        -td $tag_dir
                        -mm $mm
                        -m $m
                    #if $smalt:
                        $smalt
                        #if str($smalt_settings.smalt_k)!=""
                        --smalt_k $smalt_settings.smalt_k
                        #end if
                        #if str($smalt_settings.smalt_s)!=""
                            --smalt_s $smalt_settings.smalt_s
                        #end if
                        --smalt_y $smalt_settings.smalt_y
                        --smalt_r $smalt_settings.smalt_r
                        -n "\${GALAXY_SLOTS:-2}"
                    #end if
                    $verbose
                    && mkdir plots bams
                    && mv *insert_site_plot.gz ./plots
                    && mv *mapped.bam* ./bams
    ]]>    </command>
    <inputs>
        <param name="input_files" type="data" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2" multiple="true" label="Input files" help="Support multiple files"/>
        <param name="tag" type="text" optional="true" label="Tag" help="Tag to search for" />
        <param name="ref" type="data" format="fasta" label="Reference geome" help="Fasta format" />
        <param name="tag_dir" type="select" label="Tag direction" help="3 or 5(optional. default = 3)">
            <option value="3" selected="true">3</option>
            <option value="5">5</option>
        </param>
        <param name="mm" type="integer" value="0" label="Number of mismatches allowed when matching tag"/>
        <param name="m" type="integer" value="30" label="Mapping quality cutoff score"/>
        <param name="out_bam" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Output mapped bam files"/>
        <param name="smalt" type="boolean" truevalue="--smalt" falsevalue="" checked="false" label="Use smalt as the mapper" help="Default mapper is bwa" />
        <section name="smalt_settings" title="Optional setting for SMALT" expanded="False">
            <param argument="--smalt_k" type="integer" value="" optional="True" label="Custom k-mer value for SMALT mapping"/>
            <param argument="--smalt_s" type="integer" value="" optional="True" label="Custom step size for SMALT mapping"/>
            <param argument="--smalt_y" type="float" value="0.96" label="Custom y parameter for SMALT"/>
            <param argument="--smalt_r" type="integer" value="-1" label="Custom r parameter for SMALT"/>
        </section>
        <param argument="--verbose" type="boolean" truevalue="-v" falsevalue="" checked="false" label="verbose debugging output" help="(Default:No)" />
    </inputs>

    <outputs>
        <collection name="insert_plots" format="gz" type="list" label="Insert size plots">
            <discover_datasets pattern="__name_and_ext__" directory="plots" visible="true" />
        </collection>
        <collection name="mapped_bam" type="list" format="bam" label="Mapped bam files">
            <filter>out_bam is True</filter>
            <discover_datasets pattern="__name_and_ext__" directory="bams" visible="true" />
        </collection>
        <data name="fastq_stats" format="txt" label="${tool.name} on ${on_string}: Fastq Stats" from_work_dir="fq.stats"/>
    </outputs>

    <help>
        <![CDATA[
        Run a TraDIS analysis. This involves:
        1: filtering the data with tags matching that passed via -t option
        2: removing the tags from the sequences
        3: mapping
        4: creating an insertion site plot
        5: creating a stats summary
        Documentation can be found at `site <https://github.com/sanger-pathogens/Bio-Tradis>`_.
    ]]>    </help>
    <expand macro="citations" />

</tool>