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

All XML 'action' methods are private methods and may be:
_start_TAG      called when the start tag is found
_end_TAG        called when the end tag is found

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
source code
 
_end_BlastOutput_db(self)
the database(s) searched
source code
 
_end_BlastOutput_query_ID(self)
the identifier of the query
source code
 
_end_BlastOutput_query_def(self)
the definition line of the query
source code
 
_end_BlastOutput_query_len(self)
the length of the query
source code
 
_end_Iteration_query_ID(self)
the identifier of the query...
source code
 
_end_Iteration_query_def(self)
the definition line of the query...
source code
 
_end_Iteration_query_len(self)
the length of the query...
source code
 
_end_BlastOutput_hits(self)
hits to the database sequences, one for every sequence...
source code
 
_end_Parameters_matrix(self)
matrix used (-M)...
source code
 
_end_Parameters_expect(self)
expect values cutoff (-e)...
source code
 
_end_Parameters_sc_match(self)
match score for nucleotide-nucleotide comparaison (-r)...
source code
 
_end_Parameters_sc_mismatch(self)
mismatch penalty for nucleotide-nucleotide comparaison (-r)...
source code
 
_end_Parameters_gap_open(self)
gap existence cost (-G)...
source code
 
_end_Parameters_gap_extend(self)
gap extension cose (-E)...
source code
 
_end_Parameters_filter(self)
filtering options (-F)...
source code
 
_start_Hit(self) source code
 
_end_Hit(self) source code
 
_end_Hit_id(self)
identifier of the database sequence...
source code
 
_end_Hit_def(self)
definition line of the database sequence...
source code
 
_end_Hit_accession(self)
accession of the database sequence...
source code
 
_end_Hit_len(self) source code
 
_start_Hsp(self) source code
 
_end_Hsp_score(self)
raw score of HSP...
source code
 
_end_Hsp_bit_score(self)
bit score of HSP...
source code
 
_end_Hsp_evalue(self)
expect value of the HSP...
source code
 
_end_Hsp_query_from(self)
offset of query at the start of the alignment (one-offset)...
source code
 
_end_Hsp_query_to(self)
offset of query at the end of the alignment (one-offset)...
source code
 
_end_Hsp_hit_from(self)
offset of the database at the start of the alignment (one-offset)...
source code
 
_end_Hsp_hit_to(self)
offset of the database at the end of the alignment (one-offset)...
source code
 
_end_Hsp_query_frame(self)
frame of the query if applicable...
source code
 
_end_Hsp_hit_frame(self)
frame of the database sequence if applicable...
source code
 
_end_Hsp_identity(self)
number of identities in the alignment...
source code
 
_end_Hsp_positive(self)
number of positive (conservative) substitutions in the alignment...
source code
 
_end_Hsp_gaps(self)
number of gaps in the alignment...
source code
 
_end_Hsp_align_len(self)
length of the alignment...
source code
 
_end_Hsp_qseq(self)
alignment string for the query...
source code
 
_end_Hsp_hseq(self)
alignment string for the database...
source code
 
_end_Hsp_midline(self)
Formatting middle line as normally seen in BLAST report...
source code
 
_end_Statistics_db_num(self)
number of sequences in the database...
source code
 
_end_Statistics_db_len(self)
number of letters in the database...
source code
 
_end_Statistics_hsp_len(self)
the effective HSP length...
source code
 
_end_Statistics_eff_space(self)
the effective search space...
source code
 
_end_Statistics_kappa(self)
Karlin-Altschul parameter K...
source code
 
_end_Statistics_lambda(self)
Karlin-Altschul parameter Lambda...
source code
 
_end_Statistics_entropy(self)
Karlin-Altschul parameter H...
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

Save this to put on each blast record object

_end_BlastOutput_db(self)

source code 
the database(s) searched

Save this to put on each blast record object

_end_BlastOutput_query_ID(self)

source code 
the identifier of the query

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

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

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

_end_Iteration_query_ID(self)

source code 
the identifier of the query
        

_end_Iteration_query_def(self)

source code 
the definition line of the query
        

_end_Iteration_query_len(self)

source code 
the length of the query
        

_end_BlastOutput_hits(self)

source code 
hits to the database sequences, one for every sequence
        

_end_Parameters_matrix(self)

source code 
matrix used (-M)
        

_end_Parameters_expect(self)

source code 
expect values cutoff (-e)
        

_end_Parameters_sc_match(self)

source code 
match score for nucleotide-nucleotide comparaison (-r)
        

_end_Parameters_sc_mismatch(self)

source code 
mismatch penalty for nucleotide-nucleotide comparaison (-r)
        

_end_Parameters_gap_open(self)

source code 
gap existence cost (-G)
        

_end_Parameters_gap_extend(self)

source code 
gap extension cose (-E)
        

_end_Parameters_filter(self)

source code 
filtering options (-F)
        

_end_Hit_id(self)

source code 
identifier of the database sequence
        

_end_Hit_def(self)

source code 
definition line of the database sequence
        

_end_Hit_accession(self)

source code 
accession of the database sequence
        

_end_Hsp_score(self)

source code 
raw score of HSP
        

_end_Hsp_bit_score(self)

source code 
bit score of HSP
        

_end_Hsp_evalue(self)

source code 
expect value of the HSP
        

_end_Hsp_query_from(self)

source code 
offset of query at the start of the alignment (one-offset)
        

_end_Hsp_query_to(self)

source code 
offset of query at the end of the alignment (one-offset)
        

_end_Hsp_hit_from(self)

source code 
offset of the database at the start of the alignment (one-offset)
        

_end_Hsp_hit_to(self)

source code 
offset of the database at the end of the alignment (one-offset)
        

_end_Hsp_query_frame(self)

source code 
frame of the query if applicable
        

_end_Hsp_hit_frame(self)

source code 
frame of the database sequence if applicable
        

_end_Hsp_identity(self)

source code 
number of identities in the alignment
        

_end_Hsp_positive(self)

source code 
number of positive (conservative) substitutions in the alignment
        

_end_Hsp_gaps(self)

source code 
number of gaps in the alignment
        

_end_Hsp_align_len(self)

source code 
length of the alignment
        

_end_Hsp_qseq(self)

source code 
alignment string for the query
        

_end_Hsp_hseq(self)

source code 
alignment string for the database
        

_end_Hsp_midline(self)

source code 
Formatting middle line as normally seen in BLAST report
        

_end_Statistics_db_num(self)

source code 
number of sequences in the database
        

_end_Statistics_db_len(self)

source code 
number of letters in the database
        

_end_Statistics_hsp_len(self)

source code 
the effective HSP length
        

_end_Statistics_eff_space(self)

source code 
the effective search space
        

_end_Statistics_kappa(self)

source code 
Karlin-Altschul parameter K
        

_end_Statistics_lambda(self)

source code 
Karlin-Altschul parameter Lambda
        

_end_Statistics_entropy(self)

source code 
Karlin-Altschul parameter H