view tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml @ 13:623f727cdff1 draft

Uploaded v0.1.00, uses BLAST+ 2.2.29, allows custom column selection for tabular output - including taxonomy fields.
author peterjc
date Fri, 14 Mar 2014 07:40:46 -0400
parents 4c4a0da938ff
children 2fe07f50a41e
line wrap: on
line source

<tool id="ncbi_blastn_wrapper" name="NCBI BLAST+ blastn" version="0.1.00">
    <description>Search nucleotide database with nucleotide query sequence(s)</description>
    <!-- If job splitting is enabled, break up the query file into parts -->
    <parallelism method="multi" split_inputs="query" split_mode="to_size" split_size="1000" merge_outputs="output1"></parallelism>
    <macros>
        <token name="@BINARY@">blastn</token>
        <import>ncbi_macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command>
## 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
@ADVANCED_OPTIONS@
#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
## End of advanced options:
#end if
    </command>

    <expand macro="stdio" />

    <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>
    </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>
    </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>
</tool>