root/galaxy-central/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml

リビジョン 2, 8.7 KB (コミッタ: hatakeyama, 14 年 前)

import galaxy-central

行番号 
1<tool id="ncbi_blastn_wrapper" name="NCBI BLAST+ blastn" version="0.0.1">
2    <description>Search nucleotide database with nucleotide query sequence(s)</description>
3    <command>
4## The command is a Cheetah template which allows some Python based syntax.
5## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
6blastn
7-query "$query"
8#if $db_opts.db_opts_selector == "db":
9  -db "$db_opts.database"
10#else:
11  -subject "$db_opts.subject"
12#end if
13-task $blast_type
14-evalue $evalue_cutoff
15$adv_opts.filter_query
16$adv_opts.strand
17-out $output1
18$out_format
19-num_threads 8
20## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string
21## Note -max_target_seqs overrides -num_descriptions and -num_alignments
22#if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0):
23-max_target_seqs $adv_opts.max_hits
24#end if
25#if (str($adv_opts.word_size) and int(str($adv_opts.word_size)) > 0):
26-word_size $adv_opts.word_size
27#end if
28$adv_opts.ungapped
29    </command>
30    <inputs>
31        <param name="query" type="data" format="fasta" label="Nucleotide query sequence(s)"/>
32        <conditional name="db_opts">
33            <param name="db_opts_selector" type="select" label="Subject database/sequences">
34              <option value="db" selected="True">BLAST Database</option>
35              <option value="file">FASTA file</option>
36            </param>
37            <when value="db">
38                <param name="database" type="select" label="Nucleotide BLAST database">
39                    <options from_file="blastdb.loc">
40                      <column name="name" index="0"/>
41                      <column name="value" index="1"/>
42                    </options>
43                </param>
44                <param name="subject" type="hidden" value="" />
45            </when>
46            <when value="file">
47                <param name="database" type="hidden" value="" />
48                <param name="subject" type="data" format="fasta" label="Nucleotide FASTA file to use as database"/>
49            </when>
50        </conditional>
51        <param name="blast_type" type="select" display="radio" label="Type of BLAST">
52            <option value="megablast">megablast</option>
53            <option value="blastn">blastn</option>
54            <option value="blastn-short">blastn-short</option>
55            <option value="dc-megablast">dc-megablast</option>
56            <!-- Using BLAST 2.2.24+ this gives an error:
57            BLAST engine error: Program type 'vecscreen' not supported
58            <option value="vecscreen">vecscreen</option>
59            -->
60        </param>
61        <param name="evalue_cutoff" type="float" size="15" value="0.001" label="set expectation value cutoff" />
62        <param name="out_format" type="select" label="Output format">
63            <option value="-outfmt 6" selected="True">Tabular</option>
64            <option value="-outfmt 5">BLAST XML</option>
65            <option value="-outfmt 0">Pairwise text</option>
66            <option value="-outfmt 0 -html">Pairwise HTML</option>
67            <option value="-outfmt 2">Query-anchored text</option>
68            <option value="-outfmt 2 -html">Query-anchored HTML</option>
69            <option value="-outfmt 4">Flat query-anchored text</option>
70            <option value="-outfmt 4 -html">Flat query-anchored HTML</option>
71            <!--
72            <option value="-outfmt 11">BLAST archive format (ASN.1)</option>
73            -->
74        </param>
75        <conditional name="adv_opts">
76            <param name="adv_opts_selector" type="select" label="Advanced Options">
77              <option value="basic" selected="True">Hide Advanced Options</option>
78              <option value="advanced">Show Advanced Options</option>
79            </param>
80            <when value="basic">
81                <param name="filter_query" type="hidden" value="" />
82                <param name="strand" type="hidden" value="" />
83                <param name="max_hits" type="hidden" value="" />
84                <param name="word_size" type="hidden" value="" />
85                <param name="ungapped" type="hidden" value="" />
86            </when>
87            <when value="advanced">
88                <!-- Could use a select (yes, no, other) where other allows setting 'level window linker' -->
89                <param name="filter_query" type="boolean" label="Filter out low complexity regions (with DUST)" truevalue="-dust yes" falsevalue="-dust no" checked="true" />
90                <param name="strand" type="select" label="Query strand(s) to search against database/subject">
91                    <option value="-strand both">Both</option>
92                    <option value="-strand plus">Plus (forward)</option>
93                    <option value="-strand minus">Minus (reverse complement)</option>
94                </param>
95                <!-- Why doesn't optional override a validator? I want to accept an empty string OR a non-negative integer -->
96                <param name="max_hits" type="integer" value="0" label="Maximum hits to show" help="Use zero for default limits">
97                    <validator type="in_range" min="0" />
98                </param>
99                <!-- I'd like word_size to be optional, with minimum 4 for blastn -->
100                <param name="word_size" type="integer" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 4.">
101                    <validator type="in_range" min="0" />
102                </param>
103                <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped" falsevalue="" checked="false" />
104            </when>
105        </conditional>
106    </inputs>
107    <outputs>
108        <data name="output1" format="tabular" label="${blast_type.value_label} on ${db_opts.db_opts_selector}">
109            <change_format>
110                <when input="out_format" value="-outfmt 0" format="txt"/>
111                <when input="out_format" value="-outfmt 0 -html" format="html"/>
112                <when input="out_format" value="-outfmt 2" format="txt"/>
113                <when input="out_format" value="-outfmt 2 -html" format="html"/>
114                <when input="out_format" value="-outfmt 4" format="txt"/>
115                <when input="out_format" value="-outfmt 4 -html" format="html"/>
116                <when input="out_format" value="-outfmt 5" format="blastxml"/>
117            </change_format>
118        </data>
119    </outputs>
120    <requirements>
121        <requirement type="binary">blastn</requirement>
122    </requirements>
123    <tests>
124        <test>
125            <param name="input_query" value="megablast_wrapper_test1.fa" ftype="fasta"/>
126            <!-- database needs to match the entry in the blastdb.loc file (first column), which includes the last update date if appropriate -->
127            <param name="database" value="phiX" />
128            <param name="blast_type" value="megablast" />
129            <!--
130            <param name="word_size" value="28" />
131            <param name="iden_cutoff" value="99.0" />
132            -->
133            <param name="evalue_cutoff" value="10.0" />
134            <param name="filter_query" value="yes" />
135            <param name="out_format" value="6" />
136            <output name="output1" file="megablast_wrapper_test1.out"/>
137        </test>
138    </tests>
139    <help>
140   
141.. class:: warningmark
142
143**Note**. Database searches may take substantial amount of time.
144For large input datasets it is advisable to allow overnight processing. 
145
146-----
147
148**What it does**
149
150Search a *nucleotide database* using a *nucleotide query*,
151using the NCBI BLAST+ blastn command line tool.
152Algorithms include blastn, megablast, and discontiguous megablast.
153
154-----
155
156**Output format**
157
158Because Galaxy focuses on processing tabular data, the default output of this tool is tabular. This contains 12 columns:
159
1601. Id of your sequence
1612. GI of the database hit
1623. % identity
1634. Alignment length
1645. # mismatches
1656. # gaps
1667. Start position in your sequence
1678. End position in your sequence
1689. Start position in database hit
16910. End position in database hit
17011. E-value
17112. Bit score
172
173The second option is BLAST XML output, which is designed to be parsed by another program, and is understood by other Galaxy tools.
174
175You can also choose several plain text or HTML output formats which are designed to be read by a person (not by another program).
176The HTML versions use basic webpage formatting and can include links to the hits on the NCBI website.
177The pairwise output (the default on the NCBI BLAST website) shows each match as a pairwise alignment with the query.
178The two query anchored outputs show a multiple sequence alignment between the query and all the matches,
179and differ in how insertions are shown (marked as insertions or with gap characters added to the other sequences).
180
181-------
182
183**References**
184
185Zhang et al. A Greedy Algorithm for Aligning DNA Sequences. 2000. JCB: 203-214.
186
187    </help>
188</tool>
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。