PageRenderTime 44ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml

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