Bio.SeqIO.UniprotIO module

Bio.SeqIO support for the “uniprot-xml” file format.

See Also: http://www.uniprot.org

The UniProt XML format essentially replaces the old plain text file format originally introduced by SwissProt (“swiss” format in Bio.SeqIO).

class Bio.SeqIO.UniprotIO.UniprotIterator(source: IO[bytes] | PathLike | str | bytes, alphabet: None = None, return_raw_comments: bool = False)

Bases: SequenceIterator

Parser for UniProt XML files, returning SeqRecord objects.

modes = 'bt'
__init__(source: IO[bytes] | PathLike | str | bytes, alphabet: None = None, return_raw_comments: bool = False) None

Iterate over UniProt XML as SeqRecord objects.

parses an XML entry at a time from any UniProt XML file returns a SeqRecord for each iteration

Arguments:
  • source - input stream opened in binary mode, or a path to a file

  • alphabet - optional alphabet, not used. Leave as None.

  • return_raw_comments - if True, return comment fields as complete XML to allow further processing.

This generator can be used in Bio.SeqIO.

__next__()

Return the next SeqRecord.

This method must be implemented by the subclass.

__abstractmethods__ = frozenset({})
__parameters__ = ()