torchcell.sga
A colony-fitness pipeline adapted from SGAtools for single CRISPR knockouts dispensed onto plates by an ECHO acoustic liquid handler. It reads the gitter colony-size file and the ECHO picklist (io), corrects positional plate artifacts (normalize), and scores each knockout as fitness relative to the on-plate BY4741 wild type (score). image and cellpose_seg measure colony sizes from plate photographs, and viz draws plate heatmaps and histograms. The typical call sequence is read_gitter_dat(), read_echo_picklist(), merge_layout(), normalize_plate(), then score_plate().
Classes
Knobs for the normalization stage. |
|
Top-level result of scoring one plate against its wild-type reference. |
|
Per-strain aggregate: the analog of an SGAtools combined-file row. |
|
Parameters for Cellpose-SAM plate segmentation. |
|
Return bundle for a segmented plate: the gitter-style per-well table plus plate-level counts the classical path cannot report (raw instance count and off-grid contaminant colonies). |
Functions
Read a gitter |
|
Read an ECHO picklist into a layout frame: row, col, strain, volume_nl, well. |
|
Attach strain + volume to each quantified colony by (row, col). |
|
Decode a plate well label ( |
|
Run the full normalization on one plate's merged colony table. |
|
Score a normalized plate table (output of |
|
Flatten a ScoreReport into a per-strain DataFrame for CSV output. |
|
Quantify colonies on a standardized plate image into a gitter-style table. |
|
Segment a backlit plate with Cellpose-SAM and quantify colonies onto the fitted array grid. |
|
Load the Cellpose-SAM generalist model ( |
|
Return (merged, best_op, agreement). |
|
One row per condition (volume) with the assay-quality metrics. |
|
Detect whether the condition variable (volume) is confounded with plate position (row/col). |
|
Pick the best volume for a fitness screen. |
|
Z'-factor between two colony populations (assay separation window). |