Skip to content

Commit

Permalink
BLAST 2.2.28+ added -comp_based_stats and -use_sw_tback to rpsblast
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc committed Jul 30, 2013
1 parent d833495 commit 6e45a34
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
33 changes: 25 additions & 8 deletions Bio/Blast/Applications.py
Expand Up @@ -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:
Expand Down Expand Up @@ -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)

Expand Down
7 changes: 5 additions & 2 deletions Tests/test_NCBI_BLAST_tools.py
Expand Up @@ -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
Expand Down

0 comments on commit 6e45a34

Please sign in to comment.