Bio.SearchIO.BlastIO.blast_xml module

Bio.SearchIO parser for BLAST+ XML output formats.

class Bio.SearchIO.BlastIO.blast_xml.BlastXmlParser(handle, use_raw_query_ids=False, use_raw_hit_ids=False)

Bases: object

Parser for the BLAST XML format.

__init__(handle, use_raw_query_ids=False, use_raw_hit_ids=False)

Initialize the class.

__iter__()

Iterate over BlastXmlParser object yields query results.

class Bio.SearchIO.BlastIO.blast_xml.BlastXmlIndexer(filename, **kwargs)

Bases: SearchIndexer

Indexer class for BLAST XML output.

qstart_mark = b'<Iteration>'
qend_mark = b'</Iteration>'
block_size = 16384
__init__(filename, **kwargs)

Initialize the class.

__iter__()

Iterate over BlastXmlIndexer yields qstart_id, start_offset, block’s length.

get_raw(offset)

Return the raw record from the file as a bytes string.

__abstractmethods__ = frozenset({})
class Bio.SearchIO.BlastIO.blast_xml.BlastXmlWriter(handle, use_raw_query_ids=True, use_raw_hit_ids=True)

Bases: object

Stream-based BLAST+ XML Writer.

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

Initialize the class.

write_file(qresults)

Write the XML contents to the output handle.