spacr.hit_investigation

Workflow inputs and outputs

Investigate Hit

Link a regression hit to candidate objects and quantitative well-level evidence. This does not independently validate the hit.

Open: Regression → Investigate Hit.

Inputs and outputs below include conditional alternatives. The guidance and handoff notes say which route applies.

Inputs

  • Regression results and hits — Selected run results folder: coefficient/result CSVs, hit tables, settings and diagnostic figures.

  • Object classification scores — Saved score CSVs and, when merged, measurements/measurements.db, table png_list. Relevant tables, depending on the route: png_list. Relevant columns, depending on the route: pred, cv_predictions, ml_pred, predictions.

  • Measured objects — measurements/measurements.db; object tables depend on the enabled cell, nucleus, pathogen and organelle masks. Relevant tables, depending on the route: cell, nucleus, pathogen, cytoplasm. Relevant columns, depending on the route: plateID, rowID, columnID, fieldID.

Outputs

  • Figures and table exports — The output location chosen by the tool; exports describe the selected data and filters.

Before this module

  • Regression: Join compatible phenotype and object data for the chosen hit.

API reference.

File-driven, provenance-bound application around hit attribution.

The statistical engine lives in spacr.hit_attribution. This module is the application seam: it names exact files, hashes the selected regression run, joins predictions to measured objects, writes review artifacts, and registers settings for GUI and headless use.

Functions

control_fitted_embedding(→ pandas.DataFrame)

Fit PCA on target-free morphology and transform all cells.

evaluate_blinded_reviews(→ Dict[str, Any])

Compare one or more blinded binary reviewers with held-back scores.

hit_investigation_default_settings(→ Dict[str, Any])

Return settings for the Investigate Hit application.

investigate_hit(→ Dict[str, Any])

Run one exact regression hit through the cell-attribution workflow.

register_settings(→ bool)

Register this app's settings through spaCR's extension seam.

review_gallery_key(→ pandas.DataFrame)

Return the analyst-only key for a blinded gallery manifest.

review_gallery_manifest(→ pandas.DataFrame)

Return a shuffled reviewer sheet that does not disclose group or score.

Module Contents

spacr.hit_investigation.control_fitted_embedding(result: spacr.hit_attribution.HitAttributionResult) → pandas.DataFrame[source]

Fit PCA on target-free morphology and transform all cells.

Parameters:

result – completed attribution result carrying cells and features.

spacr.hit_investigation.evaluate_blinded_reviews(reviews: pandas.DataFrame, key: pandas.DataFrame) → Dict[str, Any][source]

Compare one or more blinded binary reviewers with held-back scores.

Parameters:
  • reviews – blinded reviewer rows carrying binary labels.

  • key – analyst-only mapping from review IDs to model probabilities.

spacr.hit_investigation.hit_investigation_default_settings(settings=None) → Dict[str, Any][source]

Return settings for the Investigate Hit application.

spacr.hit_investigation.investigate_hit(settings: Mapping[str, Any]) → Dict[str, Any][source]

Run one exact regression hit through the cell-attribution workflow.

Parameters:

settings – hit-investigation inputs and inference settings.

spacr.hit_investigation.register_settings(replace: bool = False) → bool[source]

Register this app’s settings through spaCR’s extension seam.

Return the analyst-only key for a blinded gallery manifest.

Parameters:

result – completed attribution result from which candidates are drawn.

Return a shuffled reviewer sheet that does not disclose group or score.

Parameters:

result – completed attribution result from which candidates are drawn.