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(handle, alphabet=ProteinAlphabet(), 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

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=ProteinAlphabet(), return_raw_comments=False)

Bases: object

Parse a UniProt XML entry to a SeqRecord.

return_raw_comments=True to get back the complete comment field in XML format alphabet=Alphabet.ProteinAlphabet() can be modified if needed, default is protein alphabet.

__init__(self, elem, alphabet=ProteinAlphabet(), return_raw_comments=False)

Initialize the class.


Parse the input.