Bio.SwissProt.KeyWList module

Code to parse the keywlist.txt file from SwissProt/UniProt.

See:
Classes:
  • Record Stores the information about one keyword or one category in the keywlist.txt file.

Functions:
  • parse Parses the keywlist.txt file and returns an iterator to the records it contains.

class Bio.SwissProt.KeyWList.Record

Bases: dict

Store information of one keyword or category from the keywords list.

This record stores the information of one keyword or category in the keywlist.txt as a Python dictionary. The keys in this dictionary are the line codes that can appear in the keywlist.txt file:

---------  ---------------------------     ----------------------
Line code  Content                         Occurrence in an entry
---------  ---------------------------     ----------------------
ID         Identifier (keyword)            Once; starts a keyword entry
IC         Identifier (category)           Once; starts a category entry
AC         Accession (KW-xxxx)             Once
DE         Definition                      Once or more
SY         Synonyms                        Optional; once or more
GO         Gene ontology (GO) mapping      Optional; once or more
HI         Hierarchy                       Optional; once or more
WW         Relevant WWW site               Optional; once or more
CA         Category                        Once per keyword entry; absent
                                           in category entries
__init__()

Initialize the class.

Bio.SwissProt.KeyWList.parse(handle)

Parse the keyword list from file handle.

Returns a generator object which yields keyword entries as Bio.SwissProt.KeyWList.Record() object.