mioXpektron.analysis.workflow

End-to-end analysis workflow for aligned peak matrices.

Functions

run_analysis(data, *[, config])

Convenience wrapper around AnalysisWorkflow.

Classes

AnalysisConfig([outdir, label_col, ...])

Configuration for AnalysisWorkflow.

AnalysisWorkflow(data[, config, models])

Orchestrate univariate stats, embeddings, ML, and optional cNMF.

class mioXpektron.analysis.workflow.AnalysisConfig(outdir='analysis_outputs', label_col='Group', sample_col='SampleName', group_a=None, group_b=None, reference_group=None, top_n_features=25, transform='log1p', random_state=0, embedding_methods=None, run_umap=False, run_tsne=False, umap_n_neighbors=15, umap_min_dist=0.1, tsne_perplexity=30.0, run_ml_benchmark=False, include_xgboost=True, ml_top_n_plot=10, run_ml_tuning=False, ml_tune_top_n=3, run_shap=False, run_cnmf=False, cnmf_k_list=None, cnmf_reps=30, cnmf_beta='frobenius', cnmf_top_features=15)[source]

Bases: object

Configuration for AnalysisWorkflow.

Parameters:
  • outdir (str)

  • label_col (str)

  • sample_col (str)

  • group_a (str | None)

  • group_b (str | None)

  • reference_group (str | None)

  • top_n_features (int)

  • transform (str)

  • random_state (int)

  • embedding_methods (List[str] | None)

  • run_umap (bool)

  • run_tsne (bool)

  • umap_n_neighbors (int)

  • umap_min_dist (float)

  • tsne_perplexity (float)

  • run_ml_benchmark (bool)

  • include_xgboost (bool)

  • ml_top_n_plot (int)

  • run_ml_tuning (bool)

  • ml_tune_top_n (int)

  • run_shap (bool)

  • run_cnmf (bool)

  • cnmf_k_list (List[int] | None)

  • cnmf_reps (int)

  • cnmf_beta (str)

  • cnmf_top_features (int)

outdir: str = 'analysis_outputs'
label_col: str = 'Group'
sample_col: str = 'SampleName'
group_a: str | None = None
group_b: str | None = None
reference_group: str | None = None
top_n_features: int = 25
transform: str = 'log1p'
random_state: int = 0
embedding_methods: List[str] | None = None
run_umap: bool = False
run_tsne: bool = False
umap_n_neighbors: int = 15
umap_min_dist: float = 0.1
tsne_perplexity: float = 30.0
run_ml_benchmark: bool = False
include_xgboost: bool = True
ml_top_n_plot: int = 10
run_ml_tuning: bool = False
ml_tune_top_n: int = 3
run_shap: bool = False
run_cnmf: bool = False
cnmf_k_list: List[int] | None = None
cnmf_reps: int = 30
cnmf_beta: str = 'frobenius'
cnmf_top_features: int = 15
class mioXpektron.analysis.workflow.AnalysisWorkflow(data, config=None, *, models=None)[source]

Bases: object

Orchestrate univariate stats, embeddings, ML, and optional cNMF.

Parameters:
  • data (pd.DataFrame)

  • config (Optional[AnalysisConfig])

  • models (Optional[Mapping[str, Any]])

results: Dict[str, Any]
run()[source]

Execute the configured analysis pipeline and write outputs.

Return type:

Dict[str, Any]

mioXpektron.analysis.workflow.run_analysis(data, *, config=None, **kwargs)[source]

Convenience wrapper around AnalysisWorkflow.

Parameters:
Return type:

Dict[str, Any]