torchcell.datasets.scerevisiae.ohya2005.ScmdOhya2005Dataset

class ScmdOhya2005Dataset(root: str = 'data/torchcell/scmd_ohya2005', io_workers: int = 0, transform: Callable[[...], Any] | None = None, pre_transform: Callable[[...], Any] | None = None, **kwargs: Any)[source]

Bases: ExperimentDataset

CalMorph morphology for haploid non-essential single-gene deletions (Ohya 2005).

Haploid BY4741 full-deletion CalMorph screen; the haploid full-knockout base of the SCMD CalMorph family (Ohnuki 2018 = diploid essential-gene heterozygotes; Ohnuki 2022 = drug-hypersensitive quadruple deletions).

organism: ClassVar[Organism] = 'scerevisiae'

each loader declares its own, the build’s organism switch reads it off the class (dataset_organism), and a loader that forgot it is refused by name instead of inheriting an organism it may not have.

Type:

The host organism every record describes. Annotated here WITHOUT a value

property experiment_class: type[Experiment]

Return the experiment schema class for this dataset.

property reference_class: type[ExperimentReference]

Return the experiment-reference schema class for this dataset.

property raw_file_names: list[str]

Return the raw mutant and wildtype TSV filenames.

download() → None[source]

Copy both matrices from the sha256-pinned library mirror and verify hashes.

process() → None[source]

Load raw TSVs, build CalMorph experiments, and write the LMDB store.

Every record is built (and so every refusal raised) BEFORE data.csv or the store is written, so a refused matrix leaves no processed/lmdb for a retry to serve as empty and no preprocess/data.csv. Records are written through _intern_record: the constant reference (the 501-feature WT phenotype) is stored once in the sibling interned env and each record carries a $ref pointer that get_single_item splices back, so the resolved records are the same values as the earlier inline layout.

preprocess_raw(df: DataFrame, preprocess: dict[str, Any] | None = None) → DataFrame[source]

Preprocess raw data - for CalMorph this is handled in process().

preprocess_calmorph_data(df_mutant: DataFrame) → DataFrame[source]

Clean the mutant matrix and name every strain as released.

No genome is consulted (#1045): the stripped, upper-cased ORF cell is both the systematic and the perturbed gene name. A blank ORF row names no strain and is dropped with a counted warning; two rows naming one strain are refused.

create_experiment() → None[source]

Not used: records are built by create_calmorph_experiment.

static create_calmorph_experiment(dataset_name: str, row: Series, wt_reference_phenotype: dict[str, Any]) → tuple[CalMorphExperiment, CalMorphExperimentReference, Publication][source]

Build a CalMorph experiment and reference pair from one data row.