Browse files

BLAST 2.2.28+ added -comp_based_stats and -use_sw_tback to rpsblast

  • Loading branch information...
1 parent d833495 commit 6e45a345c887f280756e17c74dfd596fdffdfa35 @peterjc peterjc committed Jul 30, 2013
Showing with 30 additions and 10 deletions.
  1. +25 −8 Bio/Blast/Applications.py
  2. +5 −2 Tests/test_NCBI_BLAST_tools.py
View
33 Bio/Blast/Applications.py
@@ -980,14 +980,15 @@ def __init__(self, cmd="blastx", **kwargs):
equate=False),
_Option(["-comp_based_stats", "comp_based_stats"],
"""Use composition-based statistics for blastp, blastx, or tblastn:
- D or d: default (equivalent to 2 )
- 0 or F or f: no composition-based statistics
- 1: Composition-based statistics as in NAR 29:2994-3005, 2001
- 2 or T or t : Composition-based score adjustment as in Bioinformatics 21:902-911, 2005, conditioned on sequence properties
- 3: Composition-based score adjustment as in Bioinformatics 21:902-911, 2005, unconditionally
-
- For programs other than tblastn, must either be absent or be D, F or 0
- Default = `2'
+
+ D or d: default (equivalent to 2 )
+ 0 or F or f: no composition-based statistics
+ 1: Composition-based statistics as in NAR 29:2994-3005, 2001
+ 2 or T or t : Composition-based score adjustment as in Bioinformatics 21:902-911, 2005, conditioned on sequence properties
+ 3: Composition-based score adjustment as in Bioinformatics 21:902-911, 2005, unconditionally
+
+ For programs other than tblastn, must either be absent or be D, F or 0
+ Default = `2'
""",
equate=False),
#Query filtering options:
@@ -1325,6 +1326,22 @@ def __init__(self, cmd="rpsblast", **kwargs):
Incompatible with: culling_limit.""",
equate=False),
+ #General search options:
+ _Option(["-comp_based_stats", "comp_based_stats"],
+ """Use composition-based statistics.
+
+ D or d: default (equivalent to 0 )
+ 0 or F or f: Simplified Composition-based statistics as in
+ Bioinformatics 15:1000-1011, 1999
+ 1 or T or t: Composition-based statistics as in NAR 29:2994-3005, 2001
+
+ Default = `0'
+ """,
+ checker_function=lambda value : value in "Dd0Ff1Tt",
+ equate=False),
+ #Misc options:
+ _Switch(["-use_sw_tback", "use_sw_tback"],
+ "Compute locally optimal Smith-Waterman alignments?"),
]
_NcbiblastCommandline.__init__(self, cmd, **kwargs)
View
7 Tests/test_NCBI_BLAST_tools.py
@@ -220,21 +220,24 @@ def check(self, exe_name, wrapper) :
if "-msa_master_idx" in extra and exe_name=="psiblast":
#New in BLAST 2.2.25+ so will look like an extra arg on old BLAST
extra.remove("-msa_master_idx")
- if exe_name=="rpsblast":
+ if exe_name == "rpsblast":
#New in BLAST 2.2.25+ so will look like an extra arg on old BLAST
extra = extra.difference(["-best_hit_overhang",
"-best_hit_score_edge",
"-culling_limit"])
if "-max_hsps_per_subject" in extra:
#New in BLAST 2.2.26+ so will look like an extra arg on old BLAST
extra.remove("-max_hsps_per_subject")
- if exe_name=="blastx":
+ if exe_name == "blastx":
#New in BLAST 2.2.27+ so will look like an extra arg on old BLAST
extra = extra.difference(["-comp_based_stats",
"-use_sw_tback"])
if exe_name in ["blastx", "tblastn"]:
#Removed in BLAST 2.2.27+ so will look like extra arg on new BLAST
extra = extra.difference(["-frame_shift_penalty"])
+ if exe_name == "rpsblast":
+ #New in BLAST 2.2.28+ so will look like extra args on old BLAST:
+ extra = extra.difference(["-comp_based_stats", "-use_sw_tback"])
if extra or missing:
import warnings

0 comments on commit 6e45a34

Please sign in to comment.