comparison ncbi_blastn_wrapper.xml @ 0:d375502056f1 draft

Uploaded
author devteam
date Fri, 17 Aug 2012 09:11:43 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:d375502056f1
1 <tool id="ncbi_blastn_wrapper" name="NCBI BLAST+ blastn" version="0.0.11">
2 <description>Search nucleotide database with nucleotide query sequence(s)</description>
3 <!-- If job splitting is enabled, break up the query file into four -->
4 <parallelism method="multi" split_inputs="query" split_mode="number_of_parts" split_size="4" shared_inputs="subject" merge_outputs="output1"></parallelism>
5 <version_command>blastn -version</version_command>
6 <command interpreter="python">hide_stderr.py
7 ## The command is a Cheetah template which allows some Python based syntax.
8 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
9 blastn
10 -query "$query"
11 #if $db_opts.db_opts_selector == "db":
12 -db "${db_opts.database.fields.path}"
13 #else:
14 -subject "$db_opts.subject"
15 #end if
16 -task $blast_type
17 -evalue $evalue_cutoff
18 -out $output1
19 ##Set the extended list here so if/when we add things, saved workflows are not affected
20 #if str($out_format)=="ext":
21 -outfmt "6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen"
22 #else:
23 -outfmt $out_format
24 #end if
25 -num_threads 8
26 #if $adv_opts.adv_opts_selector=="advanced":
27 $adv_opts.filter_query
28 $adv_opts.strand
29 ## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string
30 ## Note -max_target_seqs overrides -num_descriptions and -num_alignments
31 #if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0):
32 -max_target_seqs $adv_opts.max_hits
33 #end if
34 #if (str($adv_opts.word_size) and int(str($adv_opts.word_size)) > 0):
35 -word_size $adv_opts.word_size
36 #end if
37 $adv_opts.ungapped
38 $adv_opts.parse_deflines
39 ## End of advanced options:
40 #end if
41 </command>
42 <inputs>
43 <param name="query" type="data" format="fasta" label="Nucleotide query sequence(s)"/>
44 <conditional name="db_opts">
45 <param name="db_opts_selector" type="select" label="Subject database/sequences">
46 <option value="db" selected="True">BLAST Database</option>
47 <option value="file">FASTA file</option>
48 </param>
49 <when value="db">
50 <param name="database" type="select" label="Nucleotide BLAST database">
51 <options from_file="blastdb.loc">
52 <column name="value" index="0"/>
53 <column name="name" index="1"/>
54 <column name="path" index="2"/>
55 </options>
56 </param>
57 <param name="subject" type="hidden" value="" />
58 </when>
59 <when value="file">
60 <param name="database" type="hidden" value="" />
61 <param name="subject" type="data" format="fasta" label="Nucleotide FASTA file to use as database"/>
62 </when>
63 </conditional>
64 <param name="blast_type" type="select" display="radio" label="Type of BLAST">
65 <option value="megablast">megablast</option>
66 <option value="blastn">blastn</option>
67 <option value="blastn-short">blastn-short</option>
68 <option value="dc-megablast">dc-megablast</option>
69 <!-- Using BLAST 2.2.24+ this gives an error:
70 BLAST engine error: Program type 'vecscreen' not supported
71 <option value="vecscreen">vecscreen</option>
72 -->
73 </param>
74 <param name="evalue_cutoff" type="float" size="15" value="0.001" label="Set expectation value cutoff" />
75 <param name="out_format" type="select" label="Output format">
76 <option value="6" selected="True">Tabular (standard 12 columns)</option>
77 <option value="ext">Tabular (extended 24 columns)</option>
78 <option value="5">BLAST XML</option>
79 <option value="0">Pairwise text</option>
80 <option value="0 -html">Pairwise HTML</option>
81 <option value="2">Query-anchored text</option>
82 <option value="2 -html">Query-anchored HTML</option>
83 <option value="4">Flat query-anchored text</option>
84 <option value="4 -html">Flat query-anchored HTML</option>
85 <!--
86 <option value="-outfmt 11">BLAST archive format (ASN.1)</option>
87 -->
88 </param>
89 <conditional name="adv_opts">
90 <param name="adv_opts_selector" type="select" label="Advanced Options">
91 <option value="basic" selected="True">Hide Advanced Options</option>
92 <option value="advanced">Show Advanced Options</option>
93 </param>
94 <when value="basic" />
95 <when value="advanced">
96 <!-- Could use a select (yes, no, other) where other allows setting 'level window linker' -->
97 <param name="filter_query" type="boolean" label="Filter out low complexity regions (with DUST)" truevalue="-dust yes" falsevalue="-dust no" checked="true" />
98 <param name="strand" type="select" label="Query strand(s) to search against database/subject">
99 <option value="-strand both">Both</option>
100 <option value="-strand plus">Plus (forward)</option>
101 <option value="-strand minus">Minus (reverse complement)</option>
102 </param>
103 <!-- Why doesn't optional override a validator? I want to accept an empty string OR a non-negative integer -->
104 <param name="max_hits" type="integer" value="0" label="Maximum hits to show" help="Use zero for default limits">
105 <validator type="in_range" min="0" />
106 </param>
107 <!-- I'd like word_size to be optional, with minimum 4 for blastn -->
108 <param name="word_size" type="integer" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 4.">
109 <validator type="in_range" min="0" />
110 </param>
111 <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped" falsevalue="" checked="false" />
112 <param name="parse_deflines" type="boolean" label="Should the query and subject defline(s) be parsed?" truevalue="-parse_deflines" falsevalue="" checked="false" help="This affects the formatting of the query/subject ID strings"/>
113 </when>
114 </conditional>
115 </inputs>
116 <outputs>
117 <data name="output1" format="tabular" label="${blast_type.value_label} on ${db_opts.db_opts_selector}">
118 <change_format>
119 <when input="out_format" value="0" format="txt"/>
120 <when input="out_format" value="0 -html" format="html"/>
121 <when input="out_format" value="2" format="txt"/>
122 <when input="out_format" value="2 -html" format="html"/>
123 <when input="out_format" value="4" format="txt"/>
124 <when input="out_format" value="4 -html" format="html"/>
125 <when input="out_format" value="5" format="blastxml"/>
126 </change_format>
127 </data>
128 </outputs>
129 <requirements>
130 <requirement type="package" version="2.2.26+">blast+</requirement>
131 </requirements>
132 <help>
133
134 .. class:: warningmark
135
136 **Note**. Database searches may take a substantial amount of time.
137 For large input datasets it is advisable to allow overnight processing.
138
139 -----
140
141 **What it does**
142
143 Search a *nucleotide database* using a *nucleotide query*,
144 using the NCBI BLAST+ blastn command line tool.
145 Algorithms include blastn, megablast, and discontiguous megablast.
146
147 -----
148
149 **Output format**
150
151 Because Galaxy focuses on processing tabular data, the default output of this
152 tool is tabular. The standard BLAST+ tabular output contains 12 columns:
153
154 ====== ========= ============================================
155 Column NCBI name Description
156 ------ --------- --------------------------------------------
157 1 qseqid Query Seq-id (ID of your sequence)
158 2 sseqid Subject Seq-id (ID of the database hit)
159 3 pident Percentage of identical matches
160 4 length Alignment length
161 5 mismatch Number of mismatches
162 6 gapopen Number of gap openings
163 7 qstart Start of alignment in query
164 8 qend End of alignment in query
165 9 sstart Start of alignment in subject (database hit)
166 10 send End of alignment in subject (database hit)
167 11 evalue Expectation value (E-value)
168 12 bitscore Bit score
169 ====== ========= ============================================
170
171 The BLAST+ tools can optionally output additional columns of information,
172 but this takes longer to calculate. Most (but not all) of these columns are
173 included by selecting the extended tabular output. The extra columns are
174 included *after* the standard 12 columns. This is so that you can write
175 workflow filtering steps that accept either the 12 or 24 column tabular
176 BLAST output.
177
178 ====== ============= ===========================================
179 Column NCBI name Description
180 ------ ------------- -------------------------------------------
181 13 sallseqid All subject Seq-id(s), separated by a ';'
182 14 score Raw score
183 15 nident Number of identical matches
184 16 positive Number of positive-scoring matches
185 17 gaps Total number of gaps
186 18 ppos Percentage of positive-scoring matches
187 19 qframe Query frame
188 20 sframe Subject frame
189 21 qseq Aligned part of query sequence
190 22 sseq Aligned part of subject sequence
191 23 qlen Query sequence length
192 24 slen Subject sequence length
193 ====== ============= ===========================================
194
195 The third option is BLAST XML output, which is designed to be parsed by
196 another program, and is understood by some Galaxy tools.
197
198 You can also choose several plain text or HTML output formats which are designed to be read by a person (not by another program).
199 The HTML versions use basic webpage formatting and can include links to the hits on the NCBI website.
200 The pairwise output (the default on the NCBI BLAST website) shows each match as a pairwise alignment with the query.
201 The two query anchored outputs show a multiple sequence alignment between the query and all the matches,
202 and differ in how insertions are shown (marked as insertions or with gap characters added to the other sequences).
203
204 -------
205
206 **References**
207
208 Zhang et al. A Greedy Algorithm for Aligning DNA Sequences. 2000. JCB: 203-214.
209
210 </help>
211 </tool>