view tracy_align.xml @ 0:80e3f678b947 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/tracy commit 8a1c82789c6ef97008ecf8f55e060422fd72f217"
author iuc
date Tue, 12 Oct 2021 14:20:14 +0000
parents
children
line wrap: on
line source

<tool id="tracy_align" name="tracy Align" version="@TOOL_VERSION@+galaxy0" profile="20.09">
    <description>chromatogram to a FASTA reference</description>
    <macros>
        <import>macros.xml</import>
    </macros>    
    <expand macro="requirements" />
    <expand macro="version_command" />
    <command detect_errors="exit_code"><![CDATA[
        #if $index_genome == True
            bgzip -c '$reference' > genome.fasta.gz ;
            tracy index -o genome.fasta.fm9 genome.fasta.gz &&
            #set refgenome = "genome.fasta.gz"
        #else
            #set refgenome = $reference
        #end if
        tracy align 
          --reference '$refgenome'
          --pratio $pratio 
          --kmer $kmer.kmer 
          --support $kmer.support 
          --maxindel $maxindel 
          --trim $trim.trim 
          --trimLeft $trim.trimLeft 
          --trimRight $trim.trimRight 
          --linelimit $linelimit 
          --gapopen $alignment.gapopen
          --gapext $alignment.gapext
          --match $alignment.match
          --mismatch $alignment.mismatch
          '$tracefile'
    ]]></command>
    <inputs>
        <param argument="--reference" type="data" format="fasta,ab1,scf" label="FASTA, ABI or SCF format reference" />
        <param name="tracefile" type="data" format="ab1,scf" label="Sanger chromatogram tracefile to align" />
        <param name="index_genome" type="boolean" label="Pre-index the reference" help="Pre-indexing builds a FM index of the reference. This is required for sequences larger than 50 kilobases" />
        <expand macro="common_options" />
        <expand macro="kmer_options" />
        <expand macro="alignment_options" />
        <expand macro="trim_options" />
        <expand macro="optional_outputs" />
    </inputs>
    <outputs>
        <expand macro="json_output" toolname="align" />
        <data name="out_report" format="txt" from_work_dir="out.txt" label="tracy align report on ${on_string}" />
        <data name="out_alignment" format="fasta" from_work_dir="out.align.fa" label="tracy align aligned FASTA on ${on_string}" />
        <expand macro="tabular_output" toolname="align" />
    </outputs>
    <tests>
        <test expect_num_outputs="2">
            <param name="reference" value="reference1.fasta" ftype="fasta" />
            <param name="index_genome" value="false" />
            <param name="tracefile" value="input1.ab1" ftype="ab1" />
            <output name="out_report" value="out1.txt" ftype="txt" />
            <output name="out_alignment" value="out1.fasta" ftype="fasta" lines_diff="2" />    
        </test>
        <test expect_num_outputs="2">
            <param name="reference" value="reference1.fasta" ftype="fasta" />
            <param name="index_genome" value="true" />
            <param name="tracefile" value="input1.ab1" ftype="ab1" />
            <output name="out_report" value="out2.txt" ftype="txt" />
            <output name="out_alignment" value="out2.fasta" ftype="fasta" lines_diff="2" />    
        </test>
        <test expect_num_outputs="4">
            <param name="reference" value="reference1.fasta" ftype="fasta" />
            <param name="index_genome" value="false" />
            <param name="tracefile" value="input1.ab1" ftype="ab1" />
            <param name="optional_outputs" value="json,tabular" />
            <output name="out_report" value="out1.txt" ftype="txt" />
            <output name="out_json" ftype="json">
                <assert_contents>
                    <has_text text='"peakA": [5, 5, 5, 5, 5, 4' />
                </assert_contents>
            </output>
            <output name="out_stats" ftype="tabular">
                <assert_contents>
                    <has_text_matching expression="13\s1\s2\s2\s11\s2\sT\sG\sN\s5\sY" />
                </assert_contents>
            </output>
            <output name="out_alignment" value="out1.fasta" ftype="fasta" lines_diff="2" />    
        </test>

    </tests>
    <help><![CDATA[
**What it does**.

Align a chromatogram trace to a reference nucleotide sequence (using tracy_). The reference can either be a FASTA file 
or a trace file.

For genomes larger than 50 kilobases, the genome should be indexed before alignment. Indexed genomes use a FM index to find
matching kmers to anchor the dynamic programming search for an alignment. 

**NOTE** tracy_ cannot align traces that overlap the ends of a circular genome correctly.

@pratio@

@trim_options@

@alignment@

Read more here_.

.. _tracy: https://github.com/gear-genomics/tracy
.. _here: https://www.gear-genomics.com/docs/tracy/cli/#trace-alignment
    ]]></help>
    <expand macro="citations" />
</tool>