autoemx.runners.set_active_analysis module

Choose the active quantification run and clustering analysis of a sample.

Every quantification run and clustering analysis is kept in the sample ledger. The active ones provide the settings reused by later quantifications and analyses, and are shown by default in the GUI. This runner lists them and makes a previous one active again, e.g. after declining a new analysis or to go back to earlier settings.

autoemx.runners.set_active_analysis.format_analyses(ledger: SampleLedger) → str[source]

Table of the quantification runs and clustering analyses of a ledger, marking the active ones.

autoemx.runners.set_active_analysis.list_analyses(sample_path: str | None = None, sample_ID: str | None = None, project_path: str | None = None) → str[source]

Print and return the table of the quantification runs and clustering analyses of a sample.

autoemx.runners.set_active_analysis.set_active_analysis(quantification_id: int, clustering_id: int | None = None, sample_path: str | None = None, sample_ID: str | None = None, project_path: str | None = None) → SampleLedger[source]

Make a quantification run, and optionally one of its clustering analyses, the active ones.

Parameters:
  • quantification_id (int) – Id of the quantification run to make active.

  • clustering_id (int, optional) – Id of the clustering analysis of that run to make active. If None, the run keeps its own active analysis.

  • sample_path (str, optional) – Full path to the sample folder containing ledger.json.

  • sample_ID (str, optional) – Sample identifier. Used only when sample_path is not provided.

  • project_path (str, optional) – Parent directory containing sample folders. Used with sample_ID.

Returns:

The updated ledger, saved to ledger.json.

Return type:

SampleLedger

Raises:

ValueError – If the quantification run or clustering analysis does not exist (the available ones are listed).