Package Bio :: Package Blast :: Module NCBIXML :: Class BlastParser
[hide private]
[frames] | no frames]

Class BlastParser

source code

xml.sax.handler.ContentHandler --+    
                                 |    
                        _XMLparser --+
                                     |
                                    BlastParser

Parse XML BLAST data into a Record.Blast object.

Parses XML output from BLAST (direct use discouraged). This (now) returns a list of Blast records. Historically it returned a single Blast record. You are expected to use this via the parse or read functions.

All XML 'action' methods are private methods and may be:
Instance Methods [hide private]
 
__init__(self, debug=0)
Constructor.
source code
 
reset(self)
Reset all the data allowing reuse of the BlastParser() object.
source code
 
_start_Iteration(self) source code
 
_end_Iteration(self) source code
 
_end_BlastOutput_program(self)
BLAST program, e.g., blastp, blastn, etc.
source code
 
_end_BlastOutput_version(self)
version number and date of the BLAST engine.
source code
 
_end_BlastOutput_reference(self)
a reference to the article describing the algorithm (PRIVATE).
source code
 
_end_BlastOutput_db(self)
the database(s) searched (PRIVATE).
source code
 
_end_BlastOutput_query_ID(self)
the identifier of the query (PRIVATE).
source code
 
_end_BlastOutput_query_def(self)
the definition line of the query (PRIVATE).
source code
 
_end_BlastOutput_query_len(self)
the length of the query (PRIVATE).
source code
 
_end_Iteration_query_ID(self)
the identifier of the query (PRIVATE).
source code
 
_end_Iteration_query_def(self)
the definition line of the query (PRIVATE).
source code
 
_end_Iteration_query_len(self)
the length of the query (PRIVATE).
source code
 
_end_BlastOutput_hits(self)
hits to the database sequences, one for every sequence (PRIVATE).
source code
 
_end_Parameters_matrix(self)
matrix used (-M on legacy BLAST) (PRIVATE).
source code
 
_end_Parameters_expect(self)
expect values cutoff (PRIVATE).
source code
 
_end_Parameters_sc_match(self)
match score for nucleotide-nucleotide comparaison (-r) (PRIVATE).
source code
 
_end_Parameters_sc_mismatch(self)
mismatch penalty for nucleotide-nucleotide comparaison (-r) (PRIVATE).
source code
 
_end_Parameters_gap_open(self)
gap existence cost (-G) (PRIVATE).
source code
 
_end_Parameters_gap_extend(self)
gap extension cose (-E) (PRIVATE).
source code
 
_end_Parameters_filter(self)
filtering options (-F) (PRIVATE).
source code
 
_start_Hit(self) source code
 
_end_Hit(self) source code
 
_end_Hit_id(self)
identifier of the database sequence (PRIVATE).
source code
 
_end_Hit_def(self)
definition line of the database sequence (PRIVATE).
source code
 
_end_Hit_accession(self)
accession of the database sequence (PRIVATE).
source code
 
_end_Hit_len(self) source code
 
_start_Hsp(self) source code
 
_end_Hsp_score(self)
raw score of HSP (PRIVATE).
source code
 
_end_Hsp_bit_score(self)
bit score of HSP (PRIVATE).
source code
 
_end_Hsp_evalue(self)
expect value of the HSP (PRIVATE).
source code
 
_end_Hsp_query_from(self)
offset of query at the start of the alignment (one-offset) (PRIVATE).
source code
 
_end_Hsp_query_to(self)
offset of query at the end of the alignment (one-offset) (PRIVATE).
source code
 
_end_Hsp_hit_from(self)
offset of the database at the start of the alignment (one-offset) (PRIVATE).
source code
 
_end_Hsp_hit_to(self)
offset of the database at the end of the alignment (one-offset) (PRIVATE).
source code
 
_end_Hsp_query_frame(self)
frame of the query if applicable (PRIVATE).
source code
 
_end_Hsp_hit_frame(self)
frame of the database sequence if applicable (PRIVATE).
source code
 
_end_Hsp_identity(self)
number of identities in the alignment (PRIVATE).
source code
 
_end_Hsp_positive(self)
number of positive (conservative) substitutions in the alignment (PRIVATE).
source code
 
_end_Hsp_gaps(self)
number of gaps in the alignment (PRIVATE).
source code
 
_end_Hsp_align_len(self)
length of the alignment (PRIVATE).
source code
 
_end_Hsp_qseq(self)
alignment string for the query (PRIVATE).
source code
 
_end_Hsp_hseq(self)
alignment string for the database (PRIVATE).
source code
 
_end_Hsp_midline(self)
Formatting middle line as normally seen in BLAST report (PRIVATE).
source code
 
_end_Statistics_db_num(self)
number of sequences in the database (PRIVATE).
source code
 
_end_Statistics_db_len(self)
number of letters in the database (PRIVATE).
source code
 
_end_Statistics_hsp_len(self)
the effective HSP length (PRIVATE).
source code
 
_end_Statistics_eff_space(self)
the effective search space (PRIVATE).
source code
 
_end_Statistics_kappa(self)
Karlin-Altschul parameter K (PRIVATE).
source code
 
_end_Statistics_lambda(self)
Karlin-Altschul parameter Lambda (PRIVATE).
source code
 
_end_Statistics_entropy(self)
Karlin-Altschul parameter H (PRIVATE).
source code

Inherited from _XMLparser: characters, endElement, startElement

Inherited from _XMLparser (private): _secure_name

Inherited from xml.sax.handler.ContentHandler: endDocument, endElementNS, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElementNS, startPrefixMapping

Method Details [hide private]

__init__(self, debug=0)
(Constructor)

source code 

Constructor.

debug - integer, amount of debug information to print

Overrides: xml.sax.handler.ContentHandler.__init__

_end_BlastOutput_program(self)

source code 

BLAST program, e.g., blastp, blastn, etc.

Save this to put on each blast record object

_end_BlastOutput_version(self)

source code 

version number and date of the BLAST engine.

e.g. "BLASTX 2.2.12 [Aug-07-2005]" but there can also be variants like "BLASTP 2.2.18+" without the date.

Save this to put on each blast record object

_end_BlastOutput_reference(self)

source code 

a reference to the article describing the algorithm (PRIVATE).

Save this to put on each blast record object

_end_BlastOutput_db(self)

source code 

the database(s) searched (PRIVATE).

Save this to put on each blast record object

_end_BlastOutput_query_ID(self)

source code 

the identifier of the query (PRIVATE).

Important in old pre 2.2.14 BLAST, for recent versions <Iteration_query-ID> is enough

_end_BlastOutput_query_def(self)

source code 

the definition line of the query (PRIVATE).

Important in old pre 2.2.14 BLAST, for recent versions <Iteration_query-def> is enough

_end_BlastOutput_query_len(self)

source code 

the length of the query (PRIVATE).

Important in old pre 2.2.14 BLAST, for recent versions <Iteration_query-len> is enough