view racon.xml @ 8:e100a765370e draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/racon commit 3ff7b4745ccf85b6cf5a5c64625f9bde6f582b0f
author bgruening
date Wed, 19 Oct 2022 16:12:55 +0000
parents d865b62f501c
children
line wrap: on
line source

<tool id="racon" name="Racon" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
    <description>Consensus module for raw de novo DNA assembly of long uncorrected reads</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <version_command>racon --version</version_command>
    <command detect_errors="exit_code"><![CDATA[
        #if $reads.ext.startswith("fasta")
            #set ext="fasta"
        #else
            #set ext="fastq"
        #end if
        #if $reads.ext.endswith(".gz")
            #set ext=ext+".gz"
        #end if
       
        ln -s '$reads' reads.$ext && 
        #if $overlaps.ext == 'sam':
            ln -s '$overlaps' overlaps.${overlaps.ext} && 
        #else:
            ln -s '$overlaps' overlaps.paf &&
        #end if
  
        #if $corrected_reads.ext.startswith("fasta")
            #set cext="fasta"
        #else
            #set cext="fastq"
        #end if
        #if $corrected_reads.ext.endswith(".gz")
            #set cext=cext+".gz"
        #end if
        ln -s '$corrected_reads' corrected_reads.$cext && 

        racon 
            reads.$ext
            #if $overlaps.ext == 'sam':
                overlaps.${overlaps.ext}
            #else:
                overlaps.paf
            #end if
            corrected_reads.$cext
            -t \${GALAXY_SLOTS:-4} 
            $include_unpolished
            $fragment_correction
            -w $window_length
            -q $quality_threshold
            -e $error_threshold
            $no_trimming
            -m $match
            -x $mismatch
            -g $gap
            > racon_polished_consensus.fa  
    ]]></command>
    <inputs>
        <param type="data" name="reads" format="fasta,fasta.gz,fastq,fastq.gz" label="Sequences" help="input file in FASTA/FASTQ format (can be compressed with gzip) containing sequences used for correction"/>
        <param type="data" name="overlaps" format="paf,sam,tabular" label="Overlaps" help="input file in MHAP/PAF/SAM format (can be compressed with gzip) containing overlaps between sequences and target sequences"/>
        <param type="data" name="corrected_reads" format="fasta,fasta.gz,fastq,fastq.gz" label="Target sequences" help="Input file in FASTA/FASTQ format (can be compressed with gzip) containing sequences which will be corrected"/>
        <param argument="--include-unpolished" type="boolean" truevalue="-u" falsevalue="" label="Include unpolished" help="Output unpolished target sequences" />
        <param argument="--fragment-correction" type="boolean" truevalue="-f" falsevalue="" label="Fragment correction" help="Perform fragment correction instead of contig polishing. Note: overlaps file should contain dual/self overlaps" />
        <param argument="--window-length" type="integer" value="500" label="Window length" help="Size of window on which POA is performed"/>
        <param argument="--quality-threshold" type="float" min="0" value="10.0" label="Quality threshold" help="Threshold for average base quality of windows used in POA"/>
        <param argument="--error-threshold" type="float" min="0" value="0.3" label="Error threshold" help="Maximum allowed error rate used for filtering overlaps" />
        <param argument="--no-trimming" type="boolean" truevalue="--no-trimming" falsevalue="" checked="false" label="No trimming" help="Disables consensus trimming at window ends" />
        <param argument="--match" type="integer" value="3" label="Match score" help="Score for matching bases. Defalt: 3" />
        <param argument="--mismatch" type="integer" value="-5" label="Mismatch score" help="Score for mismatching bases. Default: -5" />
        <param argument="--gap" type="integer" value="-4" max="0" label="Gap penalty" />        
    </inputs>
    <outputs>
        <data name="consensus" format="fasta" from_work_dir="racon_polished_consensus.fa" label="${tool.name} on ${on_string}: consensus sequence"/>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="reads" ftype="fasta" value="sample_reads.fasta"/>
            <param name="overlaps" ftype="sam" value="sample_overlaps.sam"/>
            <param name="corrected_reads" ftype="fasta" value="sample_layout.fasta"/>
            <param name="include_unpolished" value="true"/>
            <param name="fragment_correction" value="true"/>
            <param name="window_length" value="800"/>
            <param name="error_threshold" value="0.2"/>
            <output name="consensus" ftype="fasta" file="consensus_result2.fasta"/>
        </test>
        <test expect_num_outputs="1">
            <param name="reads" ftype="fasta" value="sample_reads.fasta"/>
            <param name="overlaps" ftype="interval" value="sample_overlaps.paf"/>
            <param name="corrected_reads" ftype="fasta" value="sample_layout.fasta"/>
            <output name="consensus" ftype="fasta" file="consensus_result3.fasta"/>
        </test>
        <test expect_num_outputs="1">
            <param name="reads" ftype="fasta" value="sample_reads.fasta"/>
            <param name="overlaps" ftype="sam" value="sample_overlaps.sam"/>
            <param name="corrected_reads" ftype="fasta" value="sample_layout.fasta"/>
            <param name="include_unpolished" value="false"/>
            <param name="fragment_correction" value="false"/>
            <param name="quality_threshold" value="9.0"/>
            <param name="no_trimming" value="true"/>
            <param name="match" value="7"/>
            <param name="mismatch" value="-4"/>
            <param name="gap" value="-3"/>
            <output name="consensus" ftype="fasta" file="consensus_result1.fasta"/>
        </test>
    </tests>
    <help><![CDATA[

**What it does**

Consensus module for raw de novo DNA assembly of long uncorrected reads.

Racon is intended as a standalone consensus module to correct raw contigs generated by rapid assembly methods
which do not include a consensus step. The goal of Racon is to generate genomic consensus which is of similar
or better quality compared to the output generated by assembly methods which employ both error correction
and consensus steps, while providing a speedup of several times compared to those methods.
It supports data produced by both Pacific Biosciences and Oxford Nanopore Technologies.

Racon can be used as a polishing tool after the assembly with either Illumina data or data
produced by third generation of sequencing. The type of data inputed is automatically detected.

Racon takes as input only three files: contigs in FASTA/FASTQ format, reads in FASTA/FASTQ
format and overlaps/alignments between the reads and the contigs in SAM format. Output is a set of polished contigs in FASTA format printed to stdout.

Racon can also be used as a read error-correction tool. In this scenario, the SAM file needs
to contain pairwise overlaps between reads including dual overlaps.

    ]]></help>
    <expand macro="citations" />
</tool>