Package Bio :: Package expressions :: Package blast :: Module ncbiblast
[hide private]
[frames] | no frames]

Module ncbiblast

source code

Functions [hide private]
 
Number(name=None, attrs={}) source code
 
_nv(s, expr) source code
 
float_stat(name) source code
 
_num_stat(name, signed, comma) source code
 
int_stat(name, signed=0, comma=0) source code
 
int_param(name, signed=0, comma=0) source code
 
float_param(name) source code
 
_bit_info(s, name) source code
Variables [hide private]
  spaces_line = Opt(Spaces())+ AnyEol()
  blast_filter = Str("BLASTN", "BLASTP", "BLASTX", "TBLASTX", "T...
  ncbi_version = Std.application_version(Group("appversion", Re(...
  blastn_appheader = Std.application_name(Str("BLASTN"), {"app":...
  blastp_appheader = Std.application_name(Str("BLASTP"), {"app":...
  blastx_appheader = Std.application_name(Str("BLASTX"), {"app":...
  tblastn_appheader = Std.application_name(Str("TBLASTN"), {"app...
  tblastx_appheader = Std.application_name(Str("TBLASTX"), {"app...
  query_letters = Spaces()+ Str("(")+ Std.query_size(Digits())+ ...
  query_descr = Std.query_description_block(query_descr)
  _comma_digits = Re(r"\d(\d\d?)?(,\d\d\d)+")
  query_database = Str("Database:")+ Opt(Spaces())+ Std.database...
  to_table = Group("to_table", (SkipLinesUntil(Str("Sequences pr...
  table_entry = Std.search_table_entry(Group("table_entry", (Ass...
  table = Std.search_table(Rep(table_entry))
  header = Std.search_header(SkipLinesUntil(Str("Query="))+ quer...
  hit_length = Spaces()+ Str("Length = ")+ Std.hit_length(Digits...
  hit_descr = Str(">")+ Std.hit_description(UntilEol())+ AnyEol(...
  num_bits = Std.hsp_value(Float(), {"name": "bits", "bioformat:...
  expect = Std.hsp_value(Float(), {"name": "expect", "bioformat:...
  num_identical = Std.hsp_value(Digits(), {"name": "identical", ...
  hsp_length = Std.hsp_value(Digits(), {"name": "length", "biofo...
  num_positives = Std.hsp_value(Digits(), {"name": "positives", ...
  score = Re(r" *Score = *")+ num_bits+ Re(r" bits \((?P<XXX1>\d...
  tblastn_score = Re(r" *Score = *")+ num_bits+ Re(r" bits \((?P...
  blastn_identical = Re(r" *Identities = *")+ num_identical+ Str...
  blastp_identical = Re(r" *Identities = *")+ num_identical+ Str...
  frame = Str(" Frame = ")+ Std.hsp_frame(UntilEol(), {"which": ...
  tblastx_frame = Str(" Frame = ")+ Std.hsp_frame(UntilSep(sep= ...
  strand = Re(r" *Strand = ")+(Std.hsp_strand(Str("Plus"), {"str...
  query_line = Std.hsp_seqalign_query_leader(Std.hsp_seqalign_qu...
  homology_line = Std.hsp_seqalign_homology_seq(Str(" ")+ Un...
  subject_line = Std.hsp_seqalign_subject_name(Str("Sbjct"))+ Re...
  blastn_hsp_header = score+ blastn_identical+ strand+ spaces_li...
  blastp_hsp_header = score+ blastp_identical+ spaces_line
  blastx_hsp_header = score+ blastp_identical+ frame+ spaces_line
  tblastn_hsp_header = tblastn_score+ blastp_identical+ frame+ s...
  tblastx_hsp_header = tblastn_score+ blastp_identical+ tblastx_...
  alignment = Std.hsp_seqalign(query_line+ homology_line+ subjec...
  hsp = Std.hsp(Group("hsp_header", NullOp())+ Rep(alignment))
  hit = Std.hit(hit_descr+ hit_length+ Rep(Group("hsp", hsp)))
  db_stats = Str(" Database:")+ ToEol()+ Str(" Posted date:"...
  ungapped_lambda_stats = Str("Lambda K H")+ AnyEol()+(...
  gapped_lambda_stats = Opt(Str("Gapped")+ AnyEol())+ Str("Lambd...
  lambda_stats = ungapped_lambda_stats+ AnyEol()+ gapped_lambda_...
  matrix_stats = SkipLinesUntil(Str("Matrix:"))+ _nv("Matrix: ",...
  gap_penalties_stats = _nv("Gap Penalties: Existence: ", int_pa...
  generic_info1 = _nv("Number of Hits to DB: ", int_stat("num_hi...
  generic_info2 = _nv("length of query: ", int_stat("query_lengt...
  hsp_info = _nv("Number of HSP's better than 10.0 without gappi...
  frameshift_info = _nv("frameshift window, decay const: ", int_...
  t_info = _nv("T: ", int_stat("t"))
  a_info = _nv("A: ", int_stat("1"))
  x1_info = _bit_info("X1: ", "x1")
  x2_info = _bit_info("X2: ", "x2")
  x3_info = _bit_info("X3: ", "x3")
  s1_info = _bit_info("S1: ", "s1")
  s2_info = _bit_info("S2: ", "s2")
  blastn_ending = db_stats+ lambda_stats+ matrix_stats+ gap_pena...
  blastp_ending = db_stats+ lambda_stats+ matrix_stats+ gap_pena...
  blastx_ending = db_stats+ lambda_stats+ matrix_stats+ gap_pena...
  tblastn_ending = db_stats+ lambda_stats+ matrix_stats+ gap_pen...
  tblastx_ending = db_stats+ ungapped_lambda_stats+ matrix_stats...
  format = Std.record(Group("appheader", NullOp())+ header+ Rep(...
  blastn = replace_groups(format, (("appheader", blastn_appheade...
  blastp = replace_groups(format, (("appheader", blastp_appheade...
  blastx = replace_groups(format, (("appheader", blastx_appheade...
  tblastn = replace_groups(format, (("appheader", tblastn_apphea...
  tblastx = replace_groups(format, (("appheader", tblastx_apphea...
  __warningregistry__ = {('Bio.expressions was deprecated, as it...
Variables Details [hide private]

blast_filter

Value:
Str("BLASTN", "BLASTP", "BLASTX", "TBLASTX", "TBLASTN")

ncbi_version

Value:
Std.application_version(Group("appversion", Re(r"2.\d+\.\d+")))

blastn_appheader

Value:
Std.application_name(Str("BLASTN"), {"app": "blastn"})+ Str(" ")+ ncbi\
_version+ Str(" ")+ ToEol()

blastp_appheader

Value:
Std.application_name(Str("BLASTP"), {"app": "blastp"})+ Str(" ")+ ncbi\
_version+ Str(" ")+ ToEol()

blastx_appheader

Value:
Std.application_name(Str("BLASTX"), {"app": "blastx"})+ Str(" ")+ ncbi\
_version+ Str(" ")+ ToEol()

tblastn_appheader

Value:
Std.application_name(Str("TBLASTN"), {"app": "tblastn"})+ Str(" ")+ nc\
bi_version+ Str(" ")+ ToEol()

tblastx_appheader

Value:
Std.application_name(Str("TBLASTX"), {"app": "tblastx"})+ Str(" ")+ nc\
bi_version+ Str(" ")+ ToEol()

query_letters

Value:
Spaces()+ Str("(")+ Std.query_size(Digits())+ Str(" letters)")+ AnyEol\
()+ Assert(AnyEol())

query_database

Value:
Str("Database:")+ Opt(Spaces())+ Std.database_name(UntilEol())+ AnyEol\
()+ Spaces()+ Std.database_num_sequences(Number(), {"bioformat:decode"\
: "int.comma"})+ Str(" sequences;")+ Spaces()+ Std.database_num_letter\
s(Number(), {"bioformat:decode": "int.comma"})+ Spaces()+ Str("total l\
etters")+ ToEol()

to_table

Value:
Group("to_table", (SkipLinesUntil(Str("Sequences producing significant\
"))+ ToEol()+ AnyEol()))

table_entry

Value:
Std.search_table_entry(Group("table_entry", (AssertNot(AnyEol())+ Std.\
search_table_description(Re(r".{66}"))+ Spaces()+ Std.search_table_val\
ue(Float(), {"name": "score", "bioformat:decode": "float"})+ Spaces()+\
 Std.search_table_value(Float(), {"name": "evalue", "bioformat:decode"\
: "float"})+ AnyEol())))

header

Value:
Std.search_header(SkipLinesUntil(Str("Query="))+ query_descr+ query_le\
tters+ AnyEol()+ Group("to_database", NullOp())+ query_database+ Opt(t\
o_table+ table)+ SkipLinesUntil(Str(">")))

hit_length

Value:
Spaces()+ Str("Length = ")+ Std.hit_length(Digits())+ AnyEol()+ Opt(Sp\
aces())+ AnyEol()

hit_descr

Value:
Str(">")+ Std.hit_description(UntilEol())+ AnyEol()+ Rep(AssertNot(hit\
_length)+ Std.hit_description(UntilEol())+ AnyEol())

num_bits

Value:
Std.hsp_value(Float(), {"name": "bits", "bioformat:decode": "float",})

expect

Value:
Std.hsp_value(Float(), {"name": "expect", "bioformat:decode": "float"}\
)

num_identical

Value:
Std.hsp_value(Digits(), {"name": "identical", "bioformat:decode": "int\
"})

hsp_length

Value:
Std.hsp_value(Digits(), {"name": "length", "bioformat:decode": "int"})

num_positives

Value:
Std.hsp_value(Digits(), {"name": "positives", "bioformat:decode": "int\
"})

score

Value:
Re(r" *Score = *")+ num_bits+ Re(r" bits \((?P<XXX1>\d+)\), Expect = *\
")+ expect+ AnyEol()

tblastn_score

Value:
Re(r" *Score = *")+ num_bits+ Re(r" bits \((?P<XXX1>\d+)\), " r"Expect\
(\((?P<expect_num>\d+)\))? = *")+ expect+ AnyEol()

blastn_identical

Value:
Re(r" *Identities = *")+ num_identical+ Str("/")+ hsp_length+ ToEol()

blastp_identical

Value:
Re(r" *Identities = *")+ num_identical+ Str("/")+ hsp_length+ ToSep(se\
p= ",")+ Re(" Positives = *")+ num_positives+ ToEol()

frame

Value:
Str(" Frame = ")+ Std.hsp_frame(UntilEol(), {"which": "query"})+ AnyEo\
l()

tblastx_frame

Value:
Str(" Frame = ")+ Std.hsp_frame(UntilSep(sep= " "), {"which": "query"}\
)+ Str(" / ")+ Std.hsp_frame(UntilEol(), {"which": "subject"})+ AnyEol\
()

strand

Value:
Re(r" *Strand = ")+(Std.hsp_strand(Str("Plus"), {"strand": "+1", "whic\
h": "query"}) | Std.hsp_strand(Str("Minus"), {"strand": "-1", "which":\
 "query"}))+ Str(" / ")+(Std.hsp_strand(Str("Plus"), {"strand": "+1", \
"which": "subject"}) | Std.hsp_strand(Str("Minus"), {"strand": "-1", "\
which": "subject"}))+ AnyEol()

query_line

Value:
Std.hsp_seqalign_query_leader(Std.hsp_seqalign_query_name(Str("Query")\
)+ Re(": *")+ Std.hsp_seqalign_query_start(Digits())+ Re(" *"))+ Std.h\
sp_seqalign_query_seq(UntilSep(sep= " "))+ Re(" *")+ Std.hsp_seqalign_\
query_end(Digits())+ AnyEol()

homology_line

Value:
Std.hsp_seqalign_homology_seq(Str("     ")+ UntilEol())+ AnyEol()

subject_line

Value:
Std.hsp_seqalign_subject_name(Str("Sbjct"))+ Re(": *")+ Std.hsp_seqali\
gn_subject_start(Digits())+ Re(" *")+ Std.hsp_seqalign_subject_seq(Unt\
ilSep(sep= " "))+ Re(" *")+ Std.hsp_seqalign_subject_end(Digits())+ An\
yEol()

blastn_hsp_header

Value:
score+ blastn_identical+ strand+ spaces_line+ spaces_line

tblastn_hsp_header

Value:
tblastn_score+ blastp_identical+ frame+ spaces_line

tblastx_hsp_header

Value:
tblastn_score+ blastp_identical+ tblastx_frame+ spaces_line+ spaces_li\
ne

alignment

Value:
Std.hsp_seqalign(query_line+ homology_line+ subject_line+ Rep1(spaces_\
line))

db_stats

Value:
Str("  Database:")+ ToEol()+ Str("    Posted date:")+ ToEol()+ Str("  \
Number of letters")+ ToEol()+ Str("  Number of sequences")+ ToEol()+ s\
paces_line

ungapped_lambda_stats

Value:
Str("Lambda     K      H")+ AnyEol()+(Spaces()+ float_stat("lambda")+ \
Spaces()+ float_stat("k")+ Spaces()+ float_stat("h")+ ToEol())

gapped_lambda_stats

Value:
Opt(Str("Gapped")+ AnyEol())+ Str("Lambda     K      H")+ AnyEol()+(Sp\
aces()+ float_stat("gapped_lambda")+ Spaces()+ float_stat("gapped_k")+\
 Spaces()+ float_stat("gapped_h")+ ToEol())

lambda_stats

Value:
ungapped_lambda_stats+ AnyEol()+ gapped_lambda_stats

matrix_stats

Value:
SkipLinesUntil(Str("Matrix:"))+ _nv("Matrix: ", Std.search_statistic(U\
ntilEol(), {"name": "matrix"}))

gap_penalties_stats

Value:
_nv("Gap Penalties: Existence: ", int_param("existence_gap_penalty")+ \
Str(", Extension: ")+ int_param("extension_gap_penalty"))

generic_info1

Value:
_nv("Number of Hits to DB: ", int_stat("num_hits_to_db", signed= 1))+ \
_nv("Number of Sequences: ", int_stat("num_sequences"))+ _nv("Number o\
f extensions: ", int_stat("num_extensions"))+ _nv("Number of successfu\
l extensions: ", int_stat("num_successful_extensions"))+ _nv("Number o\
f sequences better than 10.0: ", int_stat("num_sequences_better_than_1\
0"))

generic_info2

Value:
_nv("length of query: ", int_stat("query_length"))+ _nv("length of dat\
abase: ", int_stat("database_length", comma= 1))+ _nv("effective HSP l\
ength: ", int_stat("effective_hsp_length"))+ _nv("effective length of \
query: ", int_stat("effective_query_length"))+ _nv("effective length o\
f database: ", int_stat("effective_database_length", comma= 1))+ _nv("\
effective search space: ", int_stat("effective_search_space"))+ _nv("e\
ffective search space used: ", int_stat("effective_search_space_used")\
)

hsp_info

Value:
_nv("Number of HSP's better than 10.0 without gapping: ", int_stat("nu\
m_hsps_better_than_10_without_gapping"))+ _nv("Number of HSP's success\
fully gapped in prelim test: ", int_stat("num_hsps_successfully_gapped\
_in_prelim_test"))+ _nv("Number of HSP's that attempted gapping in pre\
lim test: ", int_stat("num_hsps_attempted_gapping_in_prelim_test"))+ _\
nv("Number of HSP's gapped (non-prelim): ", int_stat("num_hsps_gapped"\
))

frameshift_info

Value:
_nv("frameshift window, decay const: ", int_stat("frameshift_window")+\
 Re(r", *")+ float_stat("frameshift_decat_const"))

blastn_ending

Value:
db_stats+ lambda_stats+ matrix_stats+ gap_penalties_stats+ generic_inf\
o1+ Opt(hsp_info)+ generic_info2+ t_info+ a_info+ x1_info+ x2_info+ s1\
_info+ s2_info

blastp_ending

Value:
db_stats+ lambda_stats+ matrix_stats+ gap_penalties_stats+ generic_inf\
o1+ hsp_info+ generic_info2+ t_info+ a_info+ x1_info+ x2_info+ x3_info\
+ s1_info+ s2_info

blastx_ending

Value:
db_stats+ lambda_stats+ matrix_stats+ gap_penalties_stats+ generic_inf\
o1+ hsp_info+ generic_info2+ frameshift_info+ t_info+ a_info+ x1_info+\
 x2_info+ x3_info+ s1_info+ s2_info

tblastn_ending

Value:
db_stats+ lambda_stats+ matrix_stats+ gap_penalties_stats+ generic_inf\
o1+ hsp_info+ generic_info2+ frameshift_info+ t_info+ a_info+ x1_info+\
 x2_info+ x3_info+ s1_info+ s2_info

tblastx_ending

Value:
db_stats+ ungapped_lambda_stats+ matrix_stats+ generic_info1+ generic_\
info2+ frameshift_info+ t_info+ a_info+ x1_info+ x2_info+ s1_info+ s2_\
info

format

Value:
Std.record(Group("appheader", NullOp())+ header+ Rep(hit)+ Group("endi\
ng", NullOp()))

blastn

Value:
replace_groups(format, (("appheader", blastn_appheader), ("hsp_header"\
, blastn_hsp_header), ("ending", blastn_ending)))

blastp

Value:
replace_groups(format, (("appheader", blastp_appheader), ("hsp_header"\
, blastp_hsp_header), ("ending", blastp_ending)))

blastx

Value:
replace_groups(format, (("appheader", blastx_appheader), ("hsp_header"\
, blastx_hsp_header), ("ending", blastx_ending)))

tblastn

Value:
replace_groups(format, (("appheader", tblastn_appheader), ("hsp_header\
", tblastn_hsp_header), ("ending", tblastn_ending)))

tblastx

Value:
replace_groups(format, (("appheader", tblastx_appheader), ("hsp_header\
", tblastx_hsp_header), ("ending", tblastx_ending)))

__warningregistry__

Value:
{('Bio.expressions was deprecated, as it does not work with recent ver\
sions of mxTextTools. If you want to continue to use this module, plea\
se get in contact with the Biopython developers at biopython-dev@biopy\
thon.org to avoid permanent removal of this module from Biopython',
  <type 'exceptions.DeprecationWarning'>,
  2): 1}