view segemehl.xml @ 2:0da425524259 draft

Uploaded
author bgruening
date Thu, 05 Feb 2015 08:25:13 -0500
parents df7c7d732d31
children 039547ad8fb8
line wrap: on
line source

<tool id="segemehl" name="segemehl" version="0.1.6.0">
    <description>based short read aligner</description>
    <requirements>
        <requirement type="package" version="0.1.6">segemehl</requirement>
    </requirements>
    <command>
<![CDATA[
        ## prepare segemehl index if no reference genome is supplied
        temp_index = `mktemp`;
        #if $refGenomeSource.genomeSource == "history":
            segemehl.x -x $temp_index -d $refGenomeSource.own_reference_genome;
        #else:
            #set $temp_index = $refGenomeSource.index.fields.index_path
        #end if


        ## execute segemehl
        segemehl.x

        ## number of threads
        -t "\${GALAXY_SLOTS:-12}"

        ## db file path
        -d ${refGenomeSource.index.fields.db_path}

        -i $temp_index

        ## check for single/pair-end
        #if str( $library.type ) == "single":
            #set $query_list = list()
            ## prepare inputs
            #for $fastq in $library.reads:
                $query_list.append('%s' %($fastq.input_query))
            #end for
            -q "#echo ' '.join( $query_list )#"
        #else
            ## prepare inputs

            #set $mate1 = list()
            #set $mate2 = list()
            #for $mate_pair in $library.mate_list:
                $mate1.append( str($mate_pair.first_strand_query) )
                $mate2.append( str($mate_pair.second_strand_query) )
            #end for

            -q #echo ','.join($mate1)
            -p #echo ','.join($mate2)

            -I $library.maxinsertsize
        #end if
        -m $minsize
        -A $accuracy
        -H $hitstrategy
        #if str( $prime5 ).strip():
            -P "$prime5"
        #end if
        #if str( $prime3 ).strip():
            -Q "$prime3"
        #end if
        $polyA
        $autoclip
        $hardclip
        $order
        -s
        -o $segemehl_out
]]>
    </command>
    <stdio>
        <regex match="Exit forced"
           source="both"
           level="fatal"
           description="Execution halted." />
    </stdio>
    <inputs>

        <conditional name="refGenomeSource">
          <param name="genomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options">
            <option value="indexed">Use a built-in index</option>
            <option value="history">Use one from the history</option>
          </param>
          <when value="indexed">
            <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact your Galaxy admin">
              <options from_data_table="segemehl_indexes">
                <column name="value" index="0"/>
                <column name="dbkey" index="1"/>
                <column name="name" index="2"/>
                <column name="db_path" index="3"/>
                <column name="index_path" index="4"/>
                <filter type="sort_by" column="2"/>
                <validator type="no_options" message="No indexes are available for the selected input dataset"/>
              </options>
            </param>
          </when>  <!-- build-in -->
          <when value="history">
            <param name="own_reference_genome" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
          </when>  <!-- history -->
        </conditional>  <!-- refGenomeSource -->


        <conditional name="library">
            <param name="type" type="select" label="Is this library paired-end?">
                <option value="single">Single-end</option>
                <option value="paired">Paired-end</option>
            </param>
            <when value="single">
                <repeat name="reads" title="FASTQ/FASTA files">
                    <param name="input_query" type="data" format="fastqsanger,fastqillumina,fastq,fasta" label="Reads fasta/fastq file" />
                </repeat>
            </when>
            <when value="paired">
                <repeat name="mate_list" title="Paired End Pairs" min="1">
                    <param name="first_strand_query" type="data" format="fastqsanger,fastqillumina,fastq,fasta" label="Reads from first strand" />
                    <param name="second_strand_query" type="data" format="fastqsanger,fastqillumina,fastq,fasta" label="Reads from second strand" />
                </repeat>
                <param name="maxinsertsize" type="integer" value="5000" label="Maximum size of the inserts (paired end)" help="default: 5000 (-I)" />
            </when>
        </conditional>


        <param name="minsize" type="integer" value="12" size="5" label="Minimum size of queries" help="default: 12 (-m)">
            <validator type="in_range" min="1"/>
        </param>
        <param name="accuracy" type="integer" value="85" size="5" label="Min percentage of matches per read in semi-global alignment" help="default: 85 (-A)" >
            <validator type="in_range" min="1" max="100"/>
        </param>
        <param name="hitstrategy" type="select" label="Hits to report?" help="(-H)">
            <option value="1">report only best scoring hits</option>
            <option value="0">report all scoring hits</option>
        </param>
        <param name="prime5" type="text" size="80" label="add 5' adapter" help="default: none (-Q)" />
        <param name="prime3" type="text" size="80" label="add 3' adapter" help="default: none (-P)"/>
        <param name="polyA" type="boolean" truevalue="--polyA" falsevalue="" checked="false" label="Clip polyA tail" help="(-T)"/>
        <param name="autoclip" type="boolean" truevalue="--autoclip" falsevalue="" checked="false" label="Autoclip unknown 3prime adapter" help="(-Y)"/>
        <param name="hardclip" type="boolean" truevalue="--hardclip" falsevalue="" checked="false" label="Enable hard clipping" help="-C"/>
        <param name="order" type="boolean" truevalue="--order" falsevalue="" checked="false" label="Sorts the output by chromsome and position" help="(-O)"/>
    </inputs>

    <outputs>
        <data format="sam" name="segemehl_out" label="Read alignments on ${on_string}"/>
    </outputs>
    <help>
<![CDATA[

.. class:: infomark

**What it does**

Segemehl_ is a short read mapper with gaps.

Segemehl_ is a software to map short sequencer reads to reference genomes.
Unlike other methods, segemehl is able to detect not only mismatches but also insertions and deletions.
Furthermore, segemehl is not limited to a specific read length and is able to mapprimer- or polyadenylation contaminated reads correctly.
segemehl implements a matching strategy based on enhanced suffix arrays (ESA). Segemehl_ allows bisulfite sequencing mapping and split read mapping.

.. _Segemehl: http://www.bioinf.uni-leipzig.de/Software/segemehl/


]]>
    </help>
    <citations>
        <citation type="doi">10.1371/journal.pcbi.1000502</citation>
    </citations>
</tool>