/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 276 lines · 246 code · 18 blank · 12 comment · 0 complexity · 4b7985cccb23bb316af8a52ac3cd1bef MD5 · raw file

  1. <tool id="ncbi_blastp_wrapper" name="NCBI BLAST+ blastp" version="0.0.11">
  2. <description>Search protein database with protein query sequence(s)</description>
  3. <version_command>blastp -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. blastp
  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. -matrix $adv_opts.matrix
  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. ##Ungapped disabled for now - see comments below
  36. ##$adv_opts.ungapped
  37. $adv_opts.parse_deflines
  38. ## End of advanced options:
  39. #end if
  40. </command>
  41. <inputs>
  42. <param name="query" type="data" format="fasta" label="Protein query sequence(s)"/>
  43. <conditional name="db_opts">
  44. <param name="db_opts_selector" type="select" label="Subject database/sequences">
  45. <option value="db" selected="True">BLAST Database</option>
  46. <option value="file">FASTA file</option>
  47. </param>
  48. <when value="db">
  49. <param name="database" type="select" label="Protein BLAST database">
  50. <options from_file="blastdb_p.loc">
  51. <column name="value" index="0"/>
  52. <column name="name" index="1"/>
  53. <column name="path" index="2"/>
  54. </options>
  55. </param>
  56. <param name="subject" type="hidden" value="" />
  57. </when>
  58. <when value="file">
  59. <param name="database" type="hidden" value="" />
  60. <param name="subject" type="data" format="fasta" label="Protein FASTA file to use as database"/>
  61. </when>
  62. </conditional>
  63. <param name="blast_type" type="select" display="radio" label="Type of BLAST">
  64. <option value="blastp">blastp</option>
  65. <option value="blastp-short">blastp-short</option>
  66. </param>
  67. <param name="evalue_cutoff" type="float" size="15" value="0.001" label="Set expectation value cutoff" />
  68. <param name="out_format" type="select" label="Output format">
  69. <option value="6" selected="True">Tabular (standard 12 columns)</option>
  70. <option value="ext">Tabular (extended 24 columns)</option>
  71. <option value="5">BLAST XML</option>
  72. <option value="0">Pairwise text</option>
  73. <option value="0 -html">Pairwise HTML</option>
  74. <option value="2">Query-anchored text</option>
  75. <option value="2 -html">Query-anchored HTML</option>
  76. <option value="4">Flat query-anchored text</option>
  77. <option value="4 -html">Flat query-anchored HTML</option>
  78. <!--
  79. <option value="-outfmt 11">BLAST archive format (ASN.1)</option>
  80. -->
  81. </param>
  82. <conditional name="adv_opts">
  83. <param name="adv_opts_selector" type="select" label="Advanced Options">
  84. <option value="basic" selected="True">Hide Advanced Options</option>
  85. <option value="advanced">Show Advanced Options</option>
  86. </param>
  87. <when value="basic" />
  88. <when value="advanced">
  89. <!-- Could use a select (yes, no, other) where other allows setting 'window locut hicut' -->
  90. <param name="filter_query" type="boolean" label="Filter out low complexity regions (with SEG)" truevalue="-seg yes" falsevalue="-seg no" checked="false" />
  91. <param name="matrix" type="select" label="Scoring matrix">
  92. <option value="BLOSUM90">BLOSUM90</option>
  93. <option value="BLOSUM80">BLOSUM80</option>
  94. <option value="BLOSUM62" selected="true">BLOSUM62 (default)</option>
  95. <option value="BLOSUM50">BLOSUM50</option>
  96. <option value="BLOSUM45">BLOSUM45</option>
  97. <option value="PAM250">PAM250</option>
  98. <option value="PAM70">PAM70</option>
  99. <option value="PAM30">PAM30</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 2 for blastp -->
  106. <param name="word_size" type="integer" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 2.">
  107. <validator type="in_range" min="0" />
  108. </param>
  109. <!--
  110. Can't use '-ungapped' on its own, error back is:
  111. Composition-adjusted searched are not supported with an ungapped search, please add -comp_based_stats F or do a gapped search
  112. Tried using '-ungapped -comp_based_stats F' and blastp crashed with 'Attempt to access NULL pointer.'
  113. <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped -comp_based_stats F" falsevalue="" checked="false" />
  114. -->
  115. <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"/>
  116. </when>
  117. </conditional>
  118. </inputs>
  119. <outputs>
  120. <data name="output1" format="tabular" label="${blast_type.value_label} on ${db_opts.db_opts_selector}">
  121. <change_format>
  122. <when input="out_format" value="0" format="txt"/>
  123. <when input="out_format" value="0 -html" format="html"/>
  124. <when input="out_format" value="2" format="txt"/>
  125. <when input="out_format" value="2 -html" format="html"/>
  126. <when input="out_format" value="4" format="txt"/>
  127. <when input="out_format" value="4 -html" format="html"/>
  128. <when input="out_format" value="5" format="blastxml"/>
  129. </change_format>
  130. </data>
  131. </outputs>
  132. <requirements>
  133. <requirement type="binary">blastp</requirement>
  134. </requirements>
  135. <tests>
  136. <test>
  137. <param name="query" value="four_human_proteins.fasta" ftype="fasta" />
  138. <param name="db_opts_selector" value="file" />
  139. <param name="subject" value="rhodopsin_proteins.fasta" ftype="fasta" />
  140. <param name="database" value="" />
  141. <param name="evalue_cutoff" value="1e-8" />
  142. <param name="blast_type" value="blastp" />
  143. <param name="out_format" value="5" />
  144. <param name="adv_opts_selector" value="advanced" />
  145. <param name="filter_query" value="False" />
  146. <param name="matrix" value="BLOSUM62" />
  147. <param name="max_hits" value="0" />
  148. <param name="word_size" value="0" />
  149. <param name="parse_deflines" value="True" />
  150. <output name="output1" file="blastp_four_human_vs_rhodopsin.xml" ftype="blastxml" />
  151. </test>
  152. <test>
  153. <param name="query" value="four_human_proteins.fasta" ftype="fasta" />
  154. <param name="db_opts_selector" value="file" />
  155. <param name="subject" value="rhodopsin_proteins.fasta" ftype="fasta" />
  156. <param name="database" value="" />
  157. <param name="evalue_cutoff" value="1e-8" />
  158. <param name="blast_type" value="blastp" />
  159. <param name="out_format" value="6" />
  160. <param name="adv_opts_selector" value="advanced" />
  161. <param name="filter_query" value="False" />
  162. <param name="matrix" value="BLOSUM62" />
  163. <param name="max_hits" value="0" />
  164. <param name="word_size" value="0" />
  165. <param name="parse_deflines" value="True" />
  166. <output name="output1" file="blastp_four_human_vs_rhodopsin.tabular" ftype="tabular" />
  167. </test>
  168. <test>
  169. <param name="query" value="four_human_proteins.fasta" ftype="fasta" />
  170. <param name="db_opts_selector" value="file" />
  171. <param name="subject" value="rhodopsin_proteins.fasta" ftype="fasta" />
  172. <param name="database" value="" />
  173. <param name="evalue_cutoff" value="1e-8" />
  174. <param name="blast_type" value="blastp" />
  175. <param name="out_format" value="ext" />
  176. <param name="adv_opts_selector" value="advanced" />
  177. <param name="filter_query" value="False" />
  178. <param name="matrix" value="BLOSUM62" />
  179. <param name="max_hits" value="0" />
  180. <param name="word_size" value="0" />
  181. <param name="parse_deflines" value="True" />
  182. <output name="output1" file="blastp_four_human_vs_rhodopsin_ext.tabular" ftype="tabular" />
  183. </test>
  184. <test>
  185. <param name="query" value="rhodopsin_proteins.fasta" ftype="fasta" />
  186. <param name="db_opts_selector" value="file" />
  187. <param name="subject" value="four_human_proteins.fasta" ftype="fasta" />
  188. <param name="database" value="" />
  189. <param name="evalue_cutoff" value="1e-8" />
  190. <param name="blast_type" value="blastp" />
  191. <param name="out_format" value="6" />
  192. <param name="adv_opts_selector" value="basic" />
  193. <output name="output1" file="blastp_rhodopsin_vs_four_human.tabular" ftype="tabular" />
  194. </test>
  195. </tests>
  196. <help>
  197. .. class:: warningmark
  198. **Note**. Database searches may take a substantial amount of time.
  199. For large input datasets it is advisable to allow overnight processing.
  200. -----
  201. **What it does**
  202. Search a *protein database* using a *protein query*,
  203. using the NCBI BLAST+ blastp command line tool.
  204. -----
  205. **Output format**
  206. Because Galaxy focuses on processing tabular data, the default output of this
  207. tool is tabular. The standard BLAST+ tabular output contains 12 columns:
  208. ====== ========= ============================================
  209. Column NCBI name Description
  210. ------ --------- --------------------------------------------
  211. 1 qseqid Query Seq-id (ID of your sequence)
  212. 2 sseqid Subject Seq-id (ID of the database hit)
  213. 3 pident Percentage of identical matches
  214. 4 length Alignment length
  215. 5 mismatch Number of mismatches
  216. 6 gapopen Number of gap openings
  217. 7 qstart Start of alignment in query
  218. 8 qend End of alignment in query
  219. 9 sstart Start of alignment in subject (database hit)
  220. 10 send End of alignment in subject (database hit)
  221. 11 evalue Expectation value (E-value)
  222. 12 bitscore Bit score
  223. ====== ========= ============================================
  224. The BLAST+ tools can optionally output additional columns of information,
  225. but this takes longer to calculate. Most (but not all) of these columns are
  226. included by selecting the extended tabular output. The extra columns are
  227. included *after* the standard 12 columns. This is so that you can write
  228. workflow filtering steps that accept either the 12 or 24 column tabular
  229. BLAST output.
  230. ====== ============= ===========================================
  231. Column NCBI name Description
  232. ------ ------------- -------------------------------------------
  233. 13 sallseqid All subject Seq-id(s), separated by a ';'
  234. 14 score Raw score
  235. 15 nident Number of identical matches
  236. 16 positive Number of positive-scoring matches
  237. 17 gaps Total number of gaps
  238. 18 ppos Percentage of positive-scoring matches
  239. 19 qframe Query frame
  240. 20 sframe Subject frame
  241. 21 qseq Aligned part of query sequence
  242. 22 sseq Aligned part of subject sequence
  243. 23 qlen Query sequence length
  244. 24 slen Subject sequence length
  245. ====== ============= ===========================================
  246. The third option is BLAST XML output, which is designed to be parsed by
  247. another program, and is understood by some Galaxy tools.
  248. You can also choose several plain text or HTML output formats which are designed to be read by a person (not by another program).
  249. The HTML versions use basic webpage formatting and can include links to the hits on the NCBI website.
  250. The pairwise output (the default on the NCBI BLAST website) shows each match as a pairwise alignment with the query.
  251. The two query anchored outputs show a multiple sequence alignment between the query and all the matches,
  252. and differ in how insertions are shown (marked as insertions or with gap characters added to the other sequences).
  253. -------
  254. **References**
  255. Altschul et al. Gapped BLAST and PSI-BLAST: a new generation of protein database search programs. 1997. Nucleic Acids Res. 25:3389-3402.
  256. Schaffer et al. Improving the accuracy of PSI-BLAST protein database searches with composition-based statistics and other refinements. 2001. Nucleic Acids Res. 29:2994-3005.
  257. </help>
  258. </tool>