From 6e45a345c887f280756e17c74dfd596fdffdfa35 Mon Sep 17 00:00:00 2001 From: peterjc Date: Tue, 30 Jul 2013 17:08:49 +0100 Subject: [PATCH] BLAST 2.2.28+ added -comp_based_stats and -use_sw_tback to rpsblast --- Bio/Blast/Applications.py | 33 +++++++++++++++++++++++++-------- Tests/test_NCBI_BLAST_tools.py | 7 +++++-- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/Bio/Blast/Applications.py b/Bio/Blast/Applications.py index f7c67e496ee..d1cad414219 100644 --- a/Bio/Blast/Applications.py +++ b/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) diff --git a/Tests/test_NCBI_BLAST_tools.py b/Tests/test_NCBI_BLAST_tools.py index d94781336ab..df0743b247f 100644 --- a/Tests/test_NCBI_BLAST_tools.py +++ b/Tests/test_NCBI_BLAST_tools.py @@ -220,7 +220,7 @@ 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", @@ -228,13 +228,16 @@ def check(self, exe_name, wrapper) : 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