OpenIslet

scripts/rank_islet1_stacks.py

Step 5 & 6: Project Islet-1 Sign-Sensitive, Endpoint-Oriented & Locus-Penalized Evaluator (v0.6.9).

script Release v0.8.0 gen-eb955f8266035aba 638 KB · 42 sections

Use this file in any AI chat (paste-only or attachment-capable):

Download as text (.txt) Download section (.txt)

Pinned raw file: https://openislet.org/files/gen-eb955f8266035aba/scripts/rank_islet1_stacks.py · SHA-256: c05d5fe606219e88…

                    "which at q_common_mode = 6.6998e-5 matches the 10^-3 total dose-level ceiling when per-cell escape is at the two-independent-allele floor p_cell = p_ind^2 = 10^-8 (leaving remaining cell-level headroom p_cell <= 1.00000094e-8, i.e. p_common_cell <= 9.4e-16 when q_common_mode = 6.6998e-5 is simultaneously active, whereas under a pure cell-level budget q_common_mode = 0 the 10^-3 dose-level ceiling allows p_cell <= 1.0718e-8, i.e. per-cell p_common_cell <= 7.18e-10; DEC-078); "
                    "if per-cell trans-epigenetic/XIAP resistance is p_common_cell in [10^-6, 10^-5] (Layer 2), expected surviving proliferating cells per 93,350-cell dose are E = [0.0943, 0.9344] and Poisson dose-level escape probability is P(>=1 survivor) = 1 - exp(-E) = [8.9975%, 60.7192%] (90x-607x above 10^-3; AUDIT-REF [DEC-046/DEC-078])."
                ),
                "mcb_effective_clonogenic_trial_floor_n_eff": 299573228,
                "en_bloc_surgical_pouch_retrievability_gate_0s": (
                    "Positions iCasp9 + AP1903 as a high-depth pharmacological debulking switch (>= 4-5 log reduction, tested across N_eff >= 299,573,228 effective clonogenic trials with explicit k = 0 surviving colonies in Stage-0 Gate S9) "
                    "paired with primary mechanical containment and en-bloc surgical retrievability of the dual pre-vascularized omental pouches (Gate 0S-Retrieval), "
                    "so patient safety does not rely solely on extrapolated 10^-8 two-allele independence in the presence of cell-wide trans-acting epigenetic silencing or XIAP/BCL-xL apoptotic resistance (AUDIT-REF & AUDIT-REF [DEC-044/DEC-046])."
                ),
            },
        },
        "non_iid_common_mode_failure_gates": [
            {
                "mode": "Sequential_Second_Hit_Deletion_or_PreExpansion_LOH_at_Chr19q13",
                "description": (
                    "Note on mechanism (Audit A05): Once suicide cassettes are biallelically integrated at both AAVS1 (PPP1R12C Chr19q13.42) alleles, "
                    "ordinary homologous mitotic recombination or loss of a single 19q arm does NOT simultaneously eliminate both cassettes. "
                    "Loss of both copies at a single locus instead requires either (a) LOH/arm loss acting on a subclone that originally received only a monoallelic integration, "
                    "or (b) sequential second-hit focal deletion/frameshift/silencing of the remaining allele during master cell bank expansion."
                ),
                "mitigation": (
                    "Verify 100% biallelic integration in single-cell-derived master cell bank clones by digital droplet PCR (ddPCR) + long-read sequencing across Chr19q13.42; "
                    "if sequential two-hit escape exceeds 10^-8 in expanded MCBs, escalate to the K=5 dual-safe-harbor architecture adding a second unlinked cassette at GAPDH-P2A-iCasp9 (Chr12p13.31)."
                ),
            },
            {
                "mode": "Shared_Promoter_Epigenetic_CpG_Methylation",
                "description": "Correlated de novo DNMT3A/3B methylation during 35-day Stage 0->7 differentiation can silence both copies of a viral CAG promoter at AAVS1 (Ordovas et al. 2015 PMID:26455413).",
                "mitigation": "Replace viral CAG with a 455 bp HNRNPA2B1-proximal candidate (function pending; published 0.7 kb CBX3-A2UCOE is a different element) + native human EEF1A1-core promoter (230 bp, 19 CpGs, 60.0% GC) flanked by cHS4 insulators (Muller-Kuller et al. 2015 PMID:25605798; Pfaff et al. 2013 PMID:23307570; Zhang et al. 2017 PMID:28860464) and require 60-day post-differentiation + inflammatory cytokine (IFN-g/TNF-a/IL-1b) challenge before AP1903 clonogenic escape testing (adjusting the zero-event upper 95% bound by empirical colony-forming plating efficiency).",
            },
            {
                "mode": "Hypoxia_and_Cytokine_Induced_XIAP_Blockade_of_Processed_Caspase9",
                "description": (
                    "Because AP1903 chemically dimerizes iCasp9 in the cytosol, bypassing an upstream requirement for mitochondrial outer membrane permeabilization (MOMP) to initiate procaspase-9 activation (though downstream caspase-3 feedback can still recruit mitochondrial amplification and Smac/DIABLO release; Yuan et al. 2022 PMID:35013114, Guerrero et al. 2012 PMID:23539542), "
                    "upregulation of X-linked inhibitor of apoptosis protein (XIAP / BIRC4) in hypoxic or cytokine-stressed grafts can bind the exposed ATPF tetrapeptide "
                    "of cleaved Caspase-9 via its BIR3 domain and arrest executioner Caspase-3/7 activation (Srinivasula et al. 2001 Nature PMID:11242052; Red-Team RT3-03)."
                ),
                "mitigation": (
                    "Test Decision Experiment #4 clonogenic escape under combined 1% O2 hypoxia + IFN-g/TNF-a/IL-1b (XIAP-high state) and evaluate the unvalidated preclinical salvage hypothesis of co-dosing "
                    "AP1903 (2 x 0.4 mg/kg) with a SMAC mimetic / IAP antagonist (IV birinapant [PMC4742409] or oral xevinapant [noting Phase III TrilynX termination, doi:10.1200/JCO-25-00272]) to displace XIAP from iCasp9."
                ),
            },
            {
                "mode": "Avascular_Core_Prodrug_Perfusion_Deficit",
                "description": (
                    "Krogh oxygen diffusion (R <= 60 um < R_crit = 74.6 um conservative rat islet benchmark [149.2 um diameter at V_max = 0.0524 mol/m^3/s] and < R_crit = 92.6 um Stage 7 human SC-islet benchmark [185.2 um diameter at V_max = 0.034 mol/m^3/s]; Finding 056) prevents central anoxic necrosis but does not by itself prove uniform lipophilic AP1903 dimerizer "
                    "pharmacokinetic penetration into fibrotic or poorly perfused in vivo graft pockets."
                ),
                "mitigation": "Empirically validate 2-dose AP1903 (2 x 0.4 mg/kg, 48h apart) mass-spectrometry tissue penetration and >99.99% bioluminescent/histological graft clearance in vascularized in vivo sentinel grafts.",
            },
            {
                "mode": "Multiplex_DSB_Induced_TP53_and_Chr20q11_21_BCL2L1_Clonal_Selection",
                "description": (
                    "Cas9 DSBs trigger p53-dependent arrest/apoptosis in 80-95% of wild-type hPSCs (Ihry et al. 2018 PMID:29892062; Haapaniemi et al. 2018 PMID:29892067), "
                    "strongly selecting for pre-existing dominant-negative TP53 mutations (Merkle et al. 2017 PMID:28445466) and sub-karyotypic Chr20q11.21 (BCL2L1/BCL-xL) copy-number gains (Avery et al. 2013 PMID:24286026; Red-Team RT3-01)."
                ),
                "mitigation": (
                    "Execute K=4 editing as a 2-step sequential workflow (<=2 loci/step using orthogonal HiFi-SpCas9 + AsCas12a Ultra with transient i53/RAD51 mRNA HDR enhancement; Schiroli et al. 2019 PMID:30905619; "
                    "in each step, N_effective = 2 chromosomal loci are cleaved simultaneously [1 heterotypic locus pair], corresponding to N_total = 4 diploid alleles [4 inter-chromosomal + 2 homologous allele pairs]; Finding 028) "
                    "and enforce 3-timepoint longitudinal QC (Seed -> MCB -> Stage 7 EOPC): error-corrected duplex sequencing of TP53/PPM1D/BCOR (noting that 2,000x duplex depth yields only 1 - exp(-0.2) = 18.1% single-molecule sensitivity at VAF = 10^-4, whereas >=95% single-molecule sensitivity at VAF = 10^-4 requires >=29,956 independent duplex molecules [>=30,000x target-enriched duplex depth, and >=62,958 duplex molecules (~63,000x depth) for >=95% power to observe >=3 mutant duplex molecules, vs 87.5% power at 50,000x; Finding 082]), "
                    "Chr20q11.21 (BCL2L1) ddPCR (CN = 2.00 +/- 0.15 [1.85, 2.15]), functional Nutlin-3a p53 transcriptional response (10 uM Nutlin-3a 8-h p21/CDKN1A and MDM2 mRNA fold induction >= 5.0x; obs_nutlin3a_p21_mdm2_fold_induction >= 5.0), 15-25 kb long-read ONT/PacBio + +/-50 kb flanking SNP LOH phasing (Kosicki et al. 2018 PMID:30010673), and CAST-Seq translocation assay (Turchiano et al. 2021 PMID:33626327)."
                ),
            },
        ],
    }

    col_sums = {k: sum(int(r["coded_levels"][k]) for r in factorial_runs) for k in HIP_FACTOR_KEYS}
    plus_one_counts = {k: sum(1 for r in factorial_runs if int(r["coded_levels"][k]) == 1) for k in HIP_FACTOR_KEYS}

    added_bridge_runs_37_to_40 = [
        {
            "run_id": "HIP_FACTORIAL_RUN_37",
            "run_number": 37,
            "tier": "Tier4_Stage0_Stage1_Bridge_Extension",
            "block": "Tier4_Stage0_Stage1_Bridge_Extension",
            "stage_block": 0,
            "stage_block_B": 0,
            "X1": 1,
            "X2": 1,
            "X3": 1,
            "X4": -1,
            "X5": -1,
            "X6": -1,
            "continuous_Z3_tier": 1.0,
            "continuous_Z3_tier_mode_b_quadratic_q3_option": 0.0,
            "bridged_with_runs": ["HIP_FACTORIAL_RUN_35", "HIP_FACTORIAL_RUN_36"],
            "coded_levels": {
                "X1": 1,
                "X2": 1,
                "X3": 1,
                "X4": -1,
                "X5": -1,
                "X6": -1,
            },
            "named_coded_levels": {
                "X1_HLAE_SCT": 1,
                "X2_CD47": 1,
                "X3_CXCL10_KO_SENTINEL": 1,
                "X4_TYK2_KO": -1,
                "X5_TXNIP_KO": -1,
                "X6_RNLS_KO": -1,
            },
            "locus1_physical_cassette_id": _locus1_physical_cassette_id(1, 1),
            "decoded_genotype": {
                "X1_MHC_I": "B2M::HLA-E*01:03(VMAPRTLVL)",
                "X2_CD47": "Constitutive_HighFloor_3prime_CD47_IgV_GPI_Locked",
                "X3_Locus3": "CXCL10::SERPINB9-GSG-tPT2A-PD-L1",
                "X4_TYK2": "TYK2+/+",
                "X5_TXNIP": "TXNIP+/+",
                "X6_RNLS": "RNLS+/+",
            },
            "role": "Stage-0 Lead Genotype bridge anchor pairing with Stage-1 Runs 35-36 (bridge pair 3) & Mode-B quadratic Q3=Z3^2-mean(Z3^2) identification anchor",
        },
        {
            "run_id": "HIP_FACTORIAL_RUN_38",
            "run_number": 38,
            "tier": "Tier4_Stage0_Stage1_Bridge_Extension",
            "block": "Tier4_Stage0_Stage1_Bridge_Extension",
            "stage_block": 1,
            "stage_block_B": 1,
            "X1": 1,
            "X2": -1,
            "X3": 1,
            "X4": -1,
            "X5": -1,
            "X6": 1,
            "continuous_Z3_tier": 1.0,
            "continuous_Z3_tier_mode_b_quadratic_q3_option": 0.0,
            "bridged_with_runs": ["HIP_FACTORIAL_RUN_06"],
            "coded_levels": {
                "X1": 1,
                "X2": -1,
                "X3": 1,
                "X4": -1,
                "X5": -1,
                "X6": 1,
            },
            "named_coded_levels": {
                "X1_HLAE_SCT": 1,
                "X2_CD47": -1,
                "X3_CXCL10_KO_SENTINEL": 1,
                "X4_TYK2_KO": -1,
                "X5_TXNIP_KO": -1,
                "X6_RNLS_KO": 1,
            },
            "locus1_physical_cassette_id": _locus1_physical_cassette_id(1, -1),
            "decoded_genotype": {
                "X1_MHC_I": "B2M::HLA-E*01:03(VMAPRTLVL)",
                "X2_CD47": "Endogenous_B2M_Promoter_CD47_WT",
                "X3_Locus3": "CXCL10::SERPINB9-GSG-tPT2A-PD-L1",
                "X4_TYK2": "TYK2+/+",
                "X5_TXNIP": "TXNIP+/+",
                "X6_RNLS": "RNLS-/-",
            },
            "role": "Stage-1 bridge repeat of Tier-1 Run 06 (bridge pair 4) & Stage x Main (B*X6, B*X2) de-aliasing anchor",
        },
        {
            "run_id": "HIP_FACTORIAL_RUN_39",
            "run_number": 39,
            "tier": "Tier4_Stage0_Stage1_Bridge_Extension",
            "block": "Tier4_Stage0_Stage1_Bridge_Extension",
            "stage_block": 1,
            "stage_block_B": 1,
            "X1": -1,
            "X2": 1,
            "X3": 1,
            "X4": -1,
            "X5": -1,
            "X6": -1,
            "continuous_Z3_tier": 1.0,
            "continuous_Z3_tier_mode_b_quadratic_q3_option": 0.0,
            "bridged_with_runs": ["HIP_FACTORIAL_RUN_07"],
            "coded_levels": {
                "X1": -1,
                "X2": 1,
                "X3": 1,
                "X4": -1,
                "X5": -1,
                "X6": -1,
            },
            "named_coded_levels": {
                "X1_HLAE_SCT": -1,
                "X2_CD47": 1,
                "X3_CXCL10_KO_SENTINEL": 1,
                "X4_TYK2_KO": -1,
                "X5_TXNIP_KO": -1,
                "X6_RNLS_KO": -1,
            },
            "locus1_physical_cassette_id": _locus1_physical_cassette_id(-1, 1),
            "decoded_genotype": {
                "X1_MHC_I": "B2M-/-",
                "X2_CD47": "Constitutive_HighFloor_3prime_CD47_IgV_GPI_Locked",
                "X3_Locus3": "CXCL10::SERPINB9-GSG-tPT2A-PD-L1",
                "X4_TYK2": "TYK2+/+",
                "X5_TXNIP": "TXNIP+/+",
                "X6_RNLS": "RNLS+/+",
            },
            "role": "Stage-1 bridge repeat of Tier-1 Run 07 (bridge pair 5) & Stage x Main (B*X1, B*X2) de-aliasing anchor",
        },
        {
            "run_id": "HIP_FACTORIAL_RUN_40",
            "run_number": 40,
            "tier": "Tier4_Stage0_Stage1_Bridge_Extension",
            "block": "Tier4_Stage0_Stage1_Bridge_Extension",
            "stage_block": 1,
            "stage_block_B": 1,
            "X1": 1,
            "X2": -1,
            "X3": 1,
            "X4": 1,
            "X5": -1,
            "X6": -1,
            "continuous_Z3_tier": 1.0,
            "continuous_Z3_tier_mode_b_quadratic_q3_option": 0.0,
            "bridged_with_runs": ["HIP_FACTORIAL_RUN_14"],
            "coded_levels": {
                "X1": 1,
                "X2": -1,
                "X3": 1,
                "X4": 1,
                "X5": -1,
                "X6": -1,
            },
            "named_coded_levels": {
                "X1_HLAE_SCT": 1,
                "X2_CD47": -1,
                "X3_CXCL10_KO_SENTINEL": 1,
                "X4_TYK2_KO": 1,
                "X5_TXNIP_KO": -1,
                "X6_RNLS_KO": -1,
            },
            "locus1_physical_cassette_id": _locus1_physical_cassette_id(1, -1),
            "decoded_genotype": {
                "X1_MHC_I": "B2M::HLA-E*01:03(VMAPRTLVL)",
                "X2_CD47": "Endogenous_B2M_Promoter_CD47_WT",
                "X3_Locus3": "CXCL10::SERPINB9-GSG-tPT2A-PD-L1",
                "X4_TYK2": "TYK2-/-",
                "X5_TXNIP": "TXNIP+/+",
                "X6_RNLS": "RNLS+/+",
            },
            "role": "Stage-1 bridge repeat of Tier-1 Run 14 (bridge pair 6) & Stage x Main (B*X4, B*X5) de-aliasing anchor",
        },
    ]
    all_40_bridge_runs = factorial_runs + added_bridge_runs_37_to_40
    s_40_bridge = _hip_design_summary(all_40_bridge_runs)
    x23_40 = _hip_model_rows(all_40_bridge_runs)
    x29_40 = [row + [row[22] * row[k] for k in range(1, 7)] for row in x23_40]
    hat29_40 = _hip_hat_diag(x29_40)
    unit_leverage_runs_29col_40 = [r["run_id"] for r, h in zip(all_40_bridge_runs, hat29_40) if h == 1]
    if (