Bio.SeqIO.UniprotIO module

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

See Also:

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

Bio.SeqIO.UniprotIO.UniprotIterator(source, alphabet=None, return_raw_comments=False)

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

This generator can be used in Bio.SeqIO

Argument source is a file-like object or a path to a file.

Optional argument alphabet should not be used anymore.

return_raw_comments = True –> comment fields are returned as complete XML to allow further processing skip_parsing_errors = True –> if parsing errors are found, skip to next entry

class Bio.SeqIO.UniprotIO.Parser(elem, alphabet=None, return_raw_comments=False)

Bases: object

Parse a UniProt XML entry to a SeqRecord.

Optional argument alphabet is no longer used.

return_raw_comments=True to get back the complete comment field in XML format

__init__(elem, alphabet=None, return_raw_comments=False)

Initialize the class.


Parse the input.