# 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.

  __firstlineno__ = 232
  __static_attributes__ = ('_fallback', '_meta', '_use_raw_hit_ids', '_use_raw_query_ids', 'xml_iter')

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({})
  __annotations__ = {}
  __firstlineno__ = 554
  __static_attributes__ = ('_fallback', '_meta')

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.

  __firstlineno__ = 748
  __static_attributes__ = ('_use_raw_hit_ids', '_use_raw_query_ids', 'frag_counter', 'hit_counter', 'hsp_counter', 'qresult_counter', 'xml')

Biopython v: 1.85

Versions
  Previous
  Latest
  Develop

Biopython Project
  Homepage
  On GitHub