memote.support.annotation

Supporting functions for annotation checks performed on the model object.

Module Contents

Functions

find_components_without_annotation(model, components) Find model components with empty annotation attributes.
generate_component_annotation_overview(elements, db) Tabulate which MIRIAM databases the component’s annotation match.
generate_component_annotation_miriam_match(elements, component, db) Tabulate which MIRIAM databases the element’s annotation match.
generate_component_id_namespace_overview(model, components) Tabulate which MIRIAM databases the component’s identifier matches.
memote.support.annotation.LOGGER[source]
memote.support.annotation.GENE_PRODUCT_ANNOTATIONS[source]
memote.support.annotation.REACTION_ANNOTATIONS[source]
memote.support.annotation.METABOLITE_ANNOTATIONS[source]
memote.support.annotation.find_components_without_annotation(model, components)[source]

Find model components with empty annotation attributes.

Parameters:
model : cobra.Model

A cobrapy metabolic model.

components : {“metabolites”, “reactions”, “genes”}

A string denoting cobra.Model components.

Returns:
list

The components without any annotation.

memote.support.annotation.generate_component_annotation_overview(elements, db)[source]

Tabulate which MIRIAM databases the component’s annotation match.

Parameters:
elements : list

Elements of a model, either metabolites, reactions, or genes.

db : str

One of the MIRIAM database identifiers.

Returns:
list

The components that are not annotated with the specified MIRIAM database.

memote.support.annotation.generate_component_annotation_miriam_match(elements, component, db)[source]

Tabulate which MIRIAM databases the element’s annotation match.

If the relevant MIRIAM identifier is not in an element’s annotation it is ignored.

Parameters:
elements : list

Elements of a model, either metabolites or reactions.

component : {“metabolites”, “reactions”}

A string denoting a type of cobra.Model component.

db : str

One of the MIRIAM database identifiers.

Returns:
list

The components whose annotation does not match the pattern for the MIRIAM database.

memote.support.annotation.generate_component_id_namespace_overview(model, components)[source]

Tabulate which MIRIAM databases the component’s identifier matches.

Parameters:
model : cobra.Model

A cobrapy metabolic model.

components : {“metabolites”, “reactions”, “genes”}

A string denoting cobra.Model components.

Returns:
pandas.DataFrame

The index of the table is given by the component identifiers. Each column corresponds to one MIRIAM database and a Boolean entry determines whether the annotation matches.