Skip to content

[Sad Catapella N4][Scientific identity] scope_groups accepts two biological repeats of one condition in the same paired group #42

Closed

Description

@guijacquemet

Audit basis

Normalization Batch 4 at f784c95e3049483f87466150ffc5764375fa631d. Confirmed validation omission, with a direct source-path counterexample. No repository tests executed.

Evidence

Reproducer

Records for control/r1, control/r2, and treated/r3. Mapping {('control','r1'):'A',('control','r2'):'A',('treated','r3'):'A'}. The group A contains two independent control biological repeats and one treated repeat, but the incomplete-group warning is absent (both conditions exist). With pooling='conditions' each condition is weighted equally, yet the control side mixes two distinct biological replicates, violating the specified pairing unit.

Impact

Silent merging of independent biological replicates; normalization references can depend on accidental repeat allocation. Distinct from the FOV-pseudoreplication QC issue #21, which concerns how reference statistics weight FOVs.

Fix / acceptance

Validate the mapping for all present (condition, repeat) pairs before grouping: per resolved repeat-group label, at most one distinct biological-repeat identifier per condition. Refuse with a named actionable error listing all conflicting pairs and their target label. Confirm the group label is nonempty text and no unsafe normalization of label case/whitespace occurs silently; preexisting preprocessing-validated mappings must remain accepted. Do not automatically split or invent pairing. Tests for duplicate records from one repeat (legal), distinct repeats from one condition (error), missing mapping, single group, explicitly paired differently named repeats, and unused mapping entries (document policy). Numba not applicable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions