From 5f6112ecfa1824ab525e983c16e5261d4294153b Mon Sep 17 00:00:00 2001
From: Peter Cock
Date: Wed, 13 Oct 2010 11:27:08 +0100
Subject: [PATCH] Workaround Issue 397 using 'if' in Cheetah template to avoid
hidden parameters
---
tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml | 15 ++++++---------
tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml | 18 ++++++------------
tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml | 18 +++++++-----------
tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml | 18 ++++++------------
tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml | 17 +++++++----------
5 files changed, 32 insertions(+), 54 deletions(-)
diff --git a/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml b/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml
index 6e71809176b..62a739b6307 100644
--- a/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml
+++ b/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml
@@ -12,11 +12,12 @@ blastn
#end if
-task $blast_type
-evalue $evalue_cutoff
-$adv_opts.filter_query
-$adv_opts.strand
-out $output1
$out_format
-num_threads 8
+#if $adv_opts.adv_opts_selector=="advanced":
+$adv_opts.filter_query
+$adv_opts.strand
## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string
## Note -max_target_seqs overrides -num_descriptions and -num_alignments
#if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0):
@@ -26,6 +27,8 @@ $out_format
-word_size $adv_opts.word_size
#end if
$adv_opts.ungapped
+## End of advanced options:
+#end if
@@ -78,13 +81,7 @@ $adv_opts.ungapped
-
-
-
-
-
-
-
+
diff --git a/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml
index 6861edb6edd..ad172a413e9 100644
--- a/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml
+++ b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml
@@ -12,11 +12,12 @@ blastp
#end if
-task $blast_type
-evalue $evalue_cutoff
-$adv_opts.filter_query
-$adv_opts.matrix
-out $output1
$out_format
-num_threads 8
+#if $adv_opts.adv_opts_selector=="advanced":
+$adv_opts.filter_query
+$adv_opts.matrix
## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string
## Note -max_target_seqs overrides -num_descriptions and -num_alignments
#if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0):
@@ -27,6 +28,8 @@ $out_format
#end if
##Ungapped disabled for now - see comments below
##$adv_opts.ungapped
+## End of advanced options:
+#end if
@@ -73,16 +76,7 @@ $out_format
-
-
-
-
-
-
-
+
diff --git a/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml b/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml
index 81bdaaf2970..5a176e62025 100644
--- a/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml
+++ b/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml
@@ -11,12 +11,13 @@ blastx
-subject "$db_opts.subject"
#end if
-evalue $evalue_cutoff
-$adv_opts.filter_query
-$adv_opts.strand
-$adv_opts.matrix
-out $output1
$out_format
-num_threads 8
+#if $adv_opts.adv_opts_selector=="advanced":
+$adv_opts.filter_query
+$adv_opts.strand
+$adv_opts.matrix
## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string
## Note -max_target_seqs overrides -num_descriptions and -num_alignments
#if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0):
@@ -26,6 +27,8 @@ $out_format
-word_size $adv_opts.word_size
#end if
$adv_opts.ungapped
+## End of advanced options:
+#end if
@@ -68,14 +71,7 @@ $adv_opts.ungapped
-
-
-
-
-
-
-
-
+
diff --git a/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml b/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml
index 1ddbd7c2d3f..6117b764d49 100644
--- a/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml
+++ b/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml
@@ -11,11 +11,12 @@ tblastn
-subject "$db_opts.subject"
#end if
-evalue $evalue_cutoff
-$adv_opts.filter_query
-$adv_opts.matrix
-out $output1
$out_format
-num_threads 8
+#if $adv_opts.adv_opts_selector=="advanced":
+$adv_opts.filter_query
+$adv_opts.matrix
## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string
## Note -max_target_seqs overrides -num_descriptions and -num_alignments
#if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0):
@@ -26,6 +27,8 @@ $out_format
#end if
##Ungapped disabled for now - see comments below
##$adv_opts.ungapped
+## End of advanced options:
+#end if
@@ -68,16 +71,7 @@ $out_format
-
-
-
-
-
-
-
+
diff --git a/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml b/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml
index 66f2ff3a499..5e040a8413f 100644
--- a/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml
+++ b/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml
@@ -11,12 +11,13 @@ tblastx
-subject "$db_opts.subject"
#end if
-evalue $evalue_cutoff
-$adv_opts.filter_query
-$adv_opts.strand
-$adv_opts.matrix
-out $output1
$out_format
-num_threads 8
+#if $adv_opts.adv_opts_selector=="advanced":
+$adv_opts.filter_query
+$adv_opts.strand
+$adv_opts.matrix
## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string
## Note -max_target_seqs overrides -num_descriptions and -num_alignments
#if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0):
@@ -24,6 +25,8 @@ $out_format
#end if
#if (str($adv_opts.word_size) and int(str($adv_opts.word_size)) > 0):
-word_size $adv_opts.word_size
+#end if
+## End of advanced options:
#end if
@@ -67,13 +70,7 @@ $out_format
-
-
-
-
-
-
-
+