goatools.godag.obo_optional_attributes module

Manage optional GO-DAG attributes.

class goatools.godag.obo_optional_attributes.OboOptionalAttrs(optional_attrs)[source]

Bases: object

Manage optional GO-DAG attributes.

optional_exp = {'comment', 'consider', 'def', 'defn', 'relationship', 'replaced_by', 'subset', 'synonym', 'xref'}
update_rec(rec, line)[source]

Update current GOTerm with optional record.

init_datamembers(rec)[source]

Initialize current GOTerm with data members for storing optional attributes.

static get_optional_attrs(optional_attrs, attrs_opt)[source]

Prepare to store data from user-desired optional fields.

Not loading these optional fields by default saves in space and speed. But allow the possibility for saving these fields, if the user desires, including:

comment consider def is_class_level is_metadata_tag is_transitive relationship replaced_by subset synonym transitive_over xref