view lastdb.xml @ 4:8705e0d74a0f draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/last commit 6b601baaf89634bc8d110ea06e3e64c7a585f3ba"
author iuc
date Wed, 24 Mar 2021 22:36:50 +0000
parents bf30030e5265
children f5a5a2b39ff2
line wrap: on
line source

<tool id="last_db" name="LASTdb" version="@LAST_CONDA_VERSION@+galaxy0" profile="20.01">

    <description>prepares sequences for subsequent comparison and alignment using lastal.</description>

    <macros>
        <import>macros_last.xml</import>
    </macros>

    <requirements>
        <requirement type="package" version="@LAST_CONDA_VERSION@">last</requirement>
    </requirements>

    <command detect_errors="exit_code"><![CDATA[
        set -e -o pipefail; 

        #if $input_files.ext.endswith('.gz')
        zcat 
        #else
        cat 
        #end if
        '$input_files' | lastdb

        #if $input_files.ext.startswith('fasta')
            -Q 0
        #else if $input_files.ext.startswith('fastqsanger')
            -Q 1
        #else if $input_files.ext.startswith('fastqsolexa')
            -Q 2
        #else if $input_files.ext.startswith('fastqillumina')
            -Q 3
        #end if
        $lastdb.sequences_type.protein 
        -a $lastdb.sequences_type.a
        -R $lastdb.repeats.uppercase$lastdb.repeats.simple_repeat 
        $lastdb.repeats.sm_lower 
        -S $lastdb.lastdb_advanced.S
        -u $lastdb.lastdb_advanced.seeds.u
        -w $lastdb.lastdb_advanced.seeds.w
        #if $lastdb.lastdb_advanced.seeds.W
            -W $lastdb.lastdb_advanced.seeds.W
        #end if
        -m $lastdb.lastdb_advanced.seeds.m 
        -i $lastdb.lastdb_advanced.i 
        -C $lastdb.lastdb_advanced.C 
        -s \${GALAXY_MEMORY_MB:-2G}
        -P \${GALAXY_SLOTS:-1}        
        'lastdb' 
        

        &&

        mkdir '$outfile.files_path' &&
        mv lastdb* '$outfile.files_path'
    ]]></command>

    <inputs>
        <param name="input_files" type="data" format="fasta,fasta.gz,fastq,fastq.gz" label="Reference(s) input files" />
        <section name="lastdb" title="Lastdb arguments" expanded="true">
            <conditional name="sequences_type">
                <param name="protein" type="select" multiple="false" label="The sequences are :">
                    <option value="" selected="true">DNA</option>
                    <option value="-p">Proteins (-p)</option>
                </param>
                <when value="">
                    <param argument="-a" type="text" value="ACGT" label="User-defined alphabet."/>
                </when>
                <when value="-p">
                    <param argument="-a" type="text" value="ACDEFGHIKLMNPQRSTVWY" label="User-defined alphabet."/>
                </when>
            </conditional>

            <section name="repeats" title="Specify lowercase-marking of repeats. (-R)" expanded="false">
                <param name="uppercase" type="select" multiple="false" label="Convert the input sequences to uppercase while reading them.">
                    <option value="0">Convert the input sequences to uppercase while reading them. (0)</option>
                    <option value="1" selected="true">Keep any lowercase in the input sequences. (1)</option>
                </param>
                <param name="simple_repeat" type="select" multiple="false" label="Check for simple repeats.">
                    <option value="0" selected="true">Do not check for simple repeats.(0)</option>
                    <option value="1">Convert simple repeats to lowercase.(1)</option>
                    <option value="2">Convert simple DNA repeats to lowercase.(2)</option>
                </param>
                <param name="sm_lower" argument="-c" type="boolean" truevalue="-c" falsevalue="" checked="true" label="Soft-mask lowercase letters." help="This means that, when we compare these sequences to some other sequences using lastal, lowercase letters will be excluded from initial matches. This will apply to lowercase letters in both sets of sequences."/>
            </section>

            <section name="lastdb_advanced" title="Advanced options" expanded="false">
                <param argument="-S" type="select" multiple="false" label="Strand">
                    <option value="0">Reverse</option>
                    <option value="1" selected="true">Forward</option>
                    <option value="2">Both</option>
                </param>

                <conditional name="seeds">
                    <param argument="-u" type="select" multiple="false" optional="true" label="Specify a seeding scheme.">
                        <option value="BISF">BISF</option>
                        <option value="BISR">BISR</option>
                        <option value="MAM4">MAM4</option>
                        <option value="MAM8">MAM8</option>
                        <option value="MURPHY10">MURPHY10</option>
                        <option value="NEAR">NEAR</option>
                        <option value="YASS" selected="true">YASS</option>
                        <!-- Add filename option -->
                    </param>
                    <when value="BISF">
                        <expand macro="step_macro" step="2"/>
                    </when>
                    <when value="BISR">
                        <expand macro="step_macro" step="2"/>
                    </when>
                    <when value="MAM4">
                        <expand macro="step_macro" step="1"/>
                    </when>
                    <when value="MAM8">
                        <expand macro="step_macro" step="1"/>
                    </when>
                    <when value="MURPHY10">
                        <expand macro="step_macro" step="1"/>
                    </when>
                    <when value="NEAR">
                        <expand macro="step_macro" step="1"/>
                    </when>
                    <when value="YASS">
                        <expand macro="step_macro" step="1"/>
                    </when>
                </conditional>

                <param argument="-i" type="integer" value="0" label="Minimum limit on initial matches per query position"/>

                <param argument="-C" type="select" multiple="false" label="Child table type">
                    <option value="0" selected="true">None</option>
                    <option value="1">Byte-size</option>
                    <option value="2">Short-syze</option>
                    <option value="3">Full</option>
                </param>
            </section>
        </section>
    </inputs>

    <outputs>
        <data name="outfile" format="lastdb">
            <discover_datasets pattern="__designation__" directory="ref_genome"/>
        </data>
    </outputs>

    <tests>
        <test>
            <param name="input_files" value="humanMito.fa.gz" ftype="fasta.gz"/>
            <section name="lastdb">
                <section name="repeats">
                    <param name="uppercase" value="0"/>
                    <param name="simple_repeat" value="1"/>
                    <param name="sm_lower" value="true"/>
                </section>
            </section>
            <output name="outfile" compare="contains" file="humdb.lastdb" ftype="lastdb">
                <extra_files type="file" value="humdb.bck" name="lastdb.bck" compare="sim_size" delta="1"/>
                <extra_files type="file" value="humdb.des" name="lastdb.des"/>
                <extra_files type="file" value="humdb.prj" name="lastdb.prj" compare="sim_size" delta="2"/>
                <extra_files type="file" value="humdb.sds" name="lastdb.sds"/>
                <extra_files type="file" value="humdb.ssp" name="lastdb.ssp" compare="sim_size" delta="1"/>
                <extra_files type="file" value="humdb.suf" name="lastdb.suf" compare="sim_size" delta="1"/>
                <extra_files type="file" value="humdb.tis" name="lastdb.tis" compare="sim_size" delta="1"/>
            </output>
        </test>
        <test>
            <param name="input_files" value="hedgehog_prot_human.fa" ftype="fasta"/>
            <section name="lastdb">
                <conditional name="sequences_type">
                    <param name="protein" value="-p"/> 
                </conditional>
            </section>
            <section name="lastdb_advanced">
                <conditional name="seeds">
                    <param name="u" value="MURPHY10"/>
            </section>
            <output name="outfile" compare="contains" file="hedgdb.lastdb" ftype="lastdb">
                <extra_files type="file" value="hedgdb.bck" name="lastdb.bck" compare="sim_size" delta="1"/>
                <extra_files type="file" value="hedgdb.des" name="lastdb.des"/>
                <extra_files type="file" value="hedgdb.prj" name="lastdb.prj"/>
                <extra_files type="file" value="hedgdb.sds" name="lastdb.sds"/>
                <extra_files type="file" value="hedgdb.ssp" name="lastdb.ssp" compare="sim_size" delta="1"/>
                <extra_files type="file" value="hedgdb.suf" name="lastdb.suf" compare="sim_size" delta="1"/>
                <extra_files type="file" value="hedgdb.tis" name="lastdb.tis" compare="sim_size" delta="1"/>
            </output>
        </test>
        <test>
            <param name="input_files" value="humanMito.fq.gz" ftype="fastqsanger.gz"/>
            <section name="lastdb">
                <param name="Q" value="1"/>
                <section name="repeats">
                    <param name="uppercase" value="0"/>
                    <param name="simple_repeat" value="1"/>
                    <param name="sm_lower" value="true"/>
                </section>
            </section>
            <output name="outfile" compare="contains" file="hedgdb.lastdb" ftype="lastdb">
                <extra_files type="file" value="humdb-sanger.bck" name="lastdb.bck" compare="sim_size" delta="1"/>
                <extra_files type="file" value="humdb-sanger.des" name="lastdb.des"/>
                <extra_files type="file" value="humdb-sanger.prj" name="lastdb.prj" lines_diff="2"/>
                <extra_files type="file" value="humdb-sanger.sds" name="lastdb.sds"/>
                <extra_files type="file" value="humdb-sanger.ssp" name="lastdb.ssp" compare="sim_size" delta="1"/>
                <extra_files type="file" value="humdb-sanger.suf" name="lastdb.suf" compare="sim_size" delta="1"/>
                <extra_files type="file" value="humdb-sanger.tis" name="lastdb.tis" compare="sim_size" delta="1"/>
            </output>
        </test>
    </tests>

    <help>@LAST_HELP@</help>
    <citations><expand macro="citations"/></citations>
</tool>