Package Bio :: Package SearchIO :: Package BlastIO :: Module blast_xml :: Class BlastXmlWriter
[hide private]
[frames] | no frames]

Class BlastXmlWriter

source code

object --+
         |
        BlastXmlWriter

Stream-based BLAST+ XML Writer.
Instance Methods [hide private]
 
__init__(self, handle, use_raw_query_ids=True, use_raw_hit_ids=True)
Initialize the class.
source code
 
write_file(self, qresults)
Write the XML contents to the output handle.
source code
 
_write_elem_block(self, block_name, map_name, obj, opt_dict=None)
Write sibling XML elements (PRIVATE).
source code
 
_write_preamble(self, qresult)
Write the XML file preamble (PRIVATE).
source code
 
_write_param(self, qresult)
Write the parameter block of the preamble (PRIVATE).
source code
 
_write_qresults(self, qresults)
Write QueryResult objects into iteration elements (PRIVATE).
source code
 
_write_hits(self, hits)
Write Hit objects (PRIVATE).
source code
 
_write_hsps(self, hsps)
Write HSP objects (PRIVATE).
source code
 
_adjust_output(self, hsp, elem, attr)
Adjust output to mimic native BLAST+ XML as much as possible (PRIVATE).
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, handle, use_raw_query_ids=True, use_raw_hit_ids=True)
(Constructor)

source code 
Initialize the class.
Overrides: object.__init__

_write_elem_block(self, block_name, map_name, obj, opt_dict=None)

source code 
Write sibling XML elements (PRIVATE).
Parameters:
  • block_name (string) - common element name prefix
  • map_name (string) - name of mapping between element and attribute names
  • obj (object) - object whose attribute value will be used
  • opt_dict (dictionary {string: string}) - custom element-attribute mapping