cagey.ReactionKey#

class cagey.ReactionKey(experiment, plate, formulation_number)[source]#

Bases: object

A unique identifier for a reaction.

Parameters:
  • experiment (str) – The name of the experiment.

  • plate (int) – The plate number.

  • formulation_number (int) – The formulation number.

Methods

from_json_file

Create from a JSON file.

from_ms_path

Create from a mass spectrum path.

from_title_file

Create from a title file.

Attributes

experiment

The name of the experiment.

plate

The plate number.

formulation_number

The formulation number.

static from_json_file(json_file)[source]#

Create from a JSON file.

The JSON file should contain the "experiment", "plate", and "formulation_number" keys.

Parameters:

json_file (Path) – The path to the JSON file.

Returns:

A reaction key.

Return type:

ReactionKey

static from_ms_path(path)[source]#

Create from a mass spectrum path.

Parameters:

path (Path) – The path to the mass spectrum directory.

Returns:

A reaction key.

Return type:

ReactionKey

static from_title_file(title_file)[source]#

Create from a title file.

The title file should contain the experiment, plate, and formulation number in the following format experiment_plate_formulation_number.

Parameters:

title_file (Path) – The path to the title file.

Returns:

A reaction key.

Return type:

ReactionKey

experiment: str#

The name of the experiment.

formulation_number: int#

The formulation number.

plate: int#

The plate number.