10.1.2.1.1. freeflux.core.emu

Define the EMU class.

10.1.2.1.1.1. Attributes

__author__

10.1.2.1.1.2. Classes

EMU

Define EMU (i.e., elementary metabolite unit) object and its operations.

10.1.2.1.1.3. Module Contents

freeflux.core.emu.__author__ = 'Chao Wu'[source]
class freeflux.core.emu.EMU(id, metabolite, atom_nos)[source]

Define EMU (i.e., elementary metabolite unit) object and its operations.

EMUs in the same metabolite and with the same atom NOs are considered as identical, while metabolites which they derived from could be different.

EMUs can be compared based self.metabolite_id and self.atom_nos. EMU and iterable object of EMUs can also be compared. In this case EMU will be put into the same iterable object with single item, and comparison between two iterables are performed.

Currently only binary equivalents are considered.

Parameters:
  • id (str) – EMU ID

  • metabolite (Metabolite or str) – Which metabolite the EMU comes from.

  • atom_nos (list of int or str) – Atom NOs, sorted by number.

id[source]

EMU ID

Type:

str

metabolite

Which metabolite the EMU comes from.

Type:

Metabolite

metabolite_id

Metabolite ID.

Type:

str

atom_nos

Atom NOs, sorted by number.

Type:

list of int

size[source]

Size of EMU.

Type:

int

equivalent_atom_nos[source]

Equivalent atom NOs, sorted by number.

Type:

None or list of int

equivalent[source]

Equivalent of EMU.

Type:

EMU

id[source]
size[source]
__hash__()[source]
__eq__(other)[source]
Parameters:

other (EMU or iterable)

__lt__(other)[source]
Parameters:

other (EMU or iterable)

__gt__(other)[source]
Parameters:

other (EMU or iterable)

property equivalent_atom_nos[source]

returns: equivAtomNOs – Equivalent atom NOs, sorted by number. :rtype: list of int or None

property equivalent[source]

returns: EMU – Equivalent of current EMU. :rtype: EMU

__repr__()[source]