[BUG] Off-by-1 gene index shift in SciPlex 3 preprocessing

#6
by rpowalski - opened

SciPlex 3 gene labels in google/cellgemma-e4b (decoders/sciplex) appear shifted by 1 index—likely because GEO GSM4150378_sciPlex3_A549_MCF7_K562_screen_gene.annotations.txt.gz includes an id gene_short_name header row that wasn't skipped (header=None) when aligning with the 1-based UMI.count.matrix.gz triplets.

Evidence

  • Shifted top genes in decoders/sciplex/mean_delta_global.json: Each top entry is a silent/neuronal gene sitting immediately before a major mitochondrial/housekeeping gene in the GEO file:
    • SACM1L (+0.0744) → next line is MT-RNR1
    • GRIN3A (+0.0739) → next line is MT-ND5
    • LRIG2 (+0.0662) → next line is MT-CO1 (actual MT-CO1: +0.0009)
    • VSTM2A (+0.0494) → next line is KRT8 (actual KRT8: +0.00003)
    • ACHE (+0.0380) → next line is FTL (actual FTL: -0.0015)
  • Raw GEO alignment: mean_delta_global.json vs. raw GEO deltas correlates at r = 0.019 unshifted, jumping to r = 0.9637 with the off-by-1 shift (1,119 / 1,121 zero-delta genes match).
  • Trained into cellgemma-e4b: These shifted silent genes show strongly elevated L2 norms in both per-layer embeddings (p = 5.2e-7) and embed_tokens (p = 7.6e-5) vs. random silent genes, suggesting both training and SciPlex 3 evaluation used the shifted matrix.

Fix: Skip the header row (header=0) when loading gene.annotations.txt.gz so 1-based matrix row k maps to gene k - 1 (TSPAN6 at index 0).

Sign up or log in to comment