view tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml @ 20:c5f20ca77de2 draft

planemo upload for repository https://github.com/peterjc/galaxy_blast/tree/master/tools/ncbi_blast_plus commit de1ad30e756a7073c422d5677fe5c6750521fa1b-dirty
author peterjc
date Wed, 26 Apr 2017 06:47:08 -0400
parents e6337ef07e9a
children 9e483194ebf6
line wrap: on
line source

<tool id="ncbi_blastn_wrapper" name="NCBI BLAST+ blastn" version="@WRAPPER_VERSION@">
    <description>Search nucleotide database with nucleotide query sequence(s)</description>
    <macros>
        <token name="@BINARY@">blastn</token>
        <import>ncbi_macros.xml</import>
    </macros>
    <expand macro="parallelism" />
    <expand macro="preamble" />
    <command detect_errors="aggressive">
## The command is a Cheetah template which allows some Python based syntax.
## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
blastn
-query '$query'
@BLAST_DB_SUBJECT@
-task $blast_type
-evalue $evalue_cutoff
@BLAST_OUTPUT@
@THREADS@
#if $adv_opts.adv_opts_selector=="advanced":
$adv_opts.strand
@ADV_FILTER_QUERY@
@ADV_MAX_HITS@
@ADV_WORD_SIZE@
#if (str($adv_opts.identity_cutoff) and float(str($adv_opts.identity_cutoff)) > 0 ):
-perc_identity $adv_opts.identity_cutoff
#end if
$adv_opts.ungapped
@ADV_ID_LIST_FILTER@
@ADV_QCOV_HSP_PERC@
## End of advanced options:
#end if
    </command>
    <inputs>
        <param name="query" type="data" format="fasta" label="Nucleotide query sequence(s)"/> 
        <expand macro="input_conditional_nucleotide_db" />
        <param name="blast_type" type="select" display="radio" label="Type of BLAST">
            <option value="megablast">megablast - Traditional megablast used to find very similar (e.g., intraspecies or closely related species) sequences</option>
            <option value="blastn">blastn - Traditional BLASTN requiring an exact match of 11, for somewhat similar sequences</option>
            <option value="blastn-short">blastn-short - BLASTN program optimized for sequences shorter than 50 bases</option>
            <option value="dc-megablast">dc-megablast - Discontiguous megablast used to find more distant (e.g., interspecies) sequences</option>
            <!-- Using BLAST 2.2.24+ this gives an error:
            BLAST engine error: Program type 'vecscreen' not supported
            <option value="vecscreen">vecscreen</option>
            In any case, vecscreen has gone in BLAST+ 2.2.28
            -->
            <!-- BLAST+ 2.2.28 also offers rmblastn -->
        </param>
        <expand macro="input_evalue" />
        <expand macro="input_out_format" />
        <expand macro="advanced_options">
            <!-- Could use a select (yes, no, other) where other allows setting 'level window linker' -->
            <param name="filter_query" type="boolean" label="Filter out low complexity regions (with DUST)" truevalue="-dust yes" falsevalue="-dust no" checked="true" />
            <expand macro="input_strand" />
            <expand macro="input_max_hits" />
            <param name="identity_cutoff" type="float" min="0" max="100" value="0" label="Percent identity cutoff (-perc_identity)" help="Use zero for no cutoff" />
            
            <!-- I'd like word_size to be optional, with minimum 4 for blastn -->
            <param name="word_size" type="integer" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 4.">
                <validator type="in_range" min="0" />
            </param>
            <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped" falsevalue="" checked="false" />
            <expand macro="input_parse_deflines" />
            <expand macro="advanced_optional_id_files" />
            <expand macro="input_qcov_hsp_perc" />
        </expand>
    </inputs>
    <outputs>
        <data name="output1" format="tabular" label="${blast_type.value} $query.name vs @ON_DB_SUBJECT@">
            <expand macro="output_change_format" />
        </data>
    </outputs>
    <tests>
        <test>
            <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" />
            <param name="db_opts_selector" value="file" />
            <param name="subject" value="three_human_mRNA.fasta" ftype="fasta" />
            <param name="database" value="" />
            <param name="evalue_cutoff" value="1e-40" />
            <param name="out_format" value="5" />
            <param name="adv_opts_selector" value="basic" />
            <output name="output1" file="blastn_rhodopsin_vs_three_human.xml" ftype="blastxml" />
        </test>
        <test>
            <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" />
            <param name="db_opts_selector" value="file" />
            <param name="subject" value="three_human_mRNA.fasta" ftype="fasta" />
            <param name="database" value="" />
            <param name="evalue_cutoff" value="1e-40" />
            <param name="out_format" value="6" />
            <param name="adv_opts_selector" value="basic" />
            <output name="output1" file="blastn_rhodopsin_vs_three_human.tabular" ftype="tabular" />
        </test>
        <test>
            <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" />
            <param name="db_opts_selector" value="file" />
            <param name="subject" value="three_human_mRNA.fasta" ftype="fasta" />
            <param name="database" value="" />
            <param name="evalue_cutoff" value="1e-40" />
            <param name="out_format" value="cols" />
            <param name="std_cols" value="qseqid,sseqid,pident" />
            <param name="ext_cols" value="qlen,slen" />
            <param name="adv_opts_selector" value="basic" />
            <output name="output1" file="blastn_rhodopsin_vs_three_human.columns.tabular" ftype="tabular" />
        </test>
        <test>
            <param name="query" value="chimera.fasta" ftype="fasta" />
            <param name="db_opts_selector" value="db" />
            <param name="database" value="three_human_mRNA" />
            <param name="out_format" value="6" />
            <param name="adv_opts_selector" value="advanced" />
            <param name="max_hits" value="1" />
            <output name="output1" file="blastn_chimera_vs_three_human_max1.tabular" ftype="tabular" />
        </test>
        <test>
            <param name="query" value="chimera.fasta" ftype="fasta" />
            <param name="db_opts_selector" value="db" />
            <param name="database" value="three_human_mRNA" />
            <param name="out_format" value="0" />
            <param name="adv_opts_selector" value="advanced" />
            <param name="max_hits" value="1" />
            <output name="output1" file="blastn_chimera_vs_three_human_max1.txt" ftype="txt" />
        </test>
        <test>
            <param name="query" value="chimera.fasta" ftype="fasta" />
            <param name="db_opts_selector" value="db" />
            <param name="database" value="three_human_mRNA" />
            <param name="out_format" value="6" />
            <output name="output1" file="blastn_chimera_vs_three_human_db.tabular" ftype="tabular" />
        </test>
        <test>
            <param name="query" value="chimera.fasta" ftype="fasta" />
            <param name="db_opts_selector" value="db" />
            <param name="database" value="rhodopsin_nucs" />
            <param name="out_format" value="6" />
            <output name="output1" file="blastn_chimera_vs_rhodopsin_db.tabular" ftype="tabular" />
        </test>
        <!-- next test is passing in two blast databases -->
        <test>
            <param name="query" value="chimera.fasta" ftype="fasta" />
            <param name="db_opts_selector" value="db" />
            <param name="database" value="three_human_mRNA,rhodopsin_nucs" />
            <param name="out_format" value="6" />
            <output name="output1" file="blastn_chimera_vs_three_human_and_rhodopsin_db.tabular" ftype="tabular" />
        </test>
    </tests>
    <help>
    
@SEARCH_TIME_WARNING@

**What it does**

Search a *nucleotide database* using a *nucleotide query*,
using the NCBI BLAST+ blastn command line tool.
Algorithms include blastn, megablast, and discontiguous megablast.

@FASTA_WARNING@

-----

@OUTPUT_FORMAT@

-------

**References**

If you use this Galaxy tool in work leading to a scientific publication please
cite the following papers:

@REFERENCES@
    </help>
    <expand macro="blast_citations" />
</tool>