OpenIslet

scripts/run_layer2_perturbation_and_regulatory_plane.py

Layer 2: Single-Cell Perturbation & Regulatory Sequence Plane (v0.8.0)

script Release v0.8.0 gen-eb955f8266035aba 1.13 MB · 71 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/run_layer2_perturbation_and_regulatory_plane.py · SHA-256: 3220e68f97203dbc…

                "tyk2_p1104a_ifna_orphan_hc_flux_sensitivity_branches_vs_wt": tyk2_ifna_orphan_hc_branches,
            },
            "b2m_ko_free_heavy_chain_surface_leakage_and_exogenous_b2m_rescue_gate_sol61_r5": {
                "finding_id": "AUDIT-REF",
                "decision_id": "DEC-044 / DEC-046 / DEC-078",
                "primary_citations": ["PMID:2124002", "PMID:1986378", "PMID:1512546", "PMID:8120026"],
                "mechanism": (
                    "While B2M-/- eliminates canonical beta2m-assembled MHC-I heterodimers, high-affinity intracellular peptides (including high-flux preproinsulin/PPI, IGRP, "
                    "and ZNT8 peptides in secretory beta cells under IFN-gamma immunoproteasome/TAP hyper-induction) can stabilize a minor fraction of beta2m-free MHC-I heavy chains "
                    "or transient open conformers that escape ER quality control to the plasma membrane (Bix & Raulet 1992 J Exp Med PMID:1512546; Demaria et al. 1994 J Biol Chem PMID:8120026), and once at the cell surface, "
                    "physiologic extracellular human serum beta2-microglobulin (~1.5-3.0 ug/mL, ~125-250 nM in vivo) can bind in trans to reconstitute functional peptide-presenting MHC-I complexes "
                    "as established for beta2m-free MHC-I heavy chains by Vitiello et al. 1990 Science PMID:2124002, Rock et al. 1991 PNAS PMID:1986378, Bix & Raulet 1992 J Exp Med PMID:1512546, and Demaria et al. 1994 J Biol Chem PMID:8120026, and evaluated here as a Stage-0 human B2M-/- SC-islet assay gate (DEC-078)."
                ),
                "stage0_gate_0e_er_and_0a_surface_exogenous_b2m_rescue_assay": {
                    "cytokine_and_serum_b2m_challenge_condition": "100 U/mL IFN-gamma + 1,000 U/mL IFN-alpha + 10 ng/mL TNF-alpha for 48 h in beta2m-depleted human serum with 0, 1.5, and 3.0 ug/mL (0, 125, and 250 nM) recombinant human beta2-microglobulin add-back for 24 h (plus 20% normal human serum comparator)",
                    "required_readouts_and_thresholds": {
                        "pan_hla_abc_w6_32_and_free_heavy_chain_hc10_l31_flow_shift_vs_isotype_max_mfi_ratio": 1.2,
                        "hla_a0201_ppi_15_24_igrp_265_273_and_znt8_186_194_autoreactive_cd8_tcr_lysis_after_exogenous_b2m_pct_max": 5.0,
                        "hla_a0201_ppi_15_24_and_igrp_265_273_autoreactive_cd8_tcr_lysis_after_exogenous_b2m_pct_max": 5.0,
                        "pan_hla_ip_lc_ms_ms_immunopeptidomics_endogenous_hla_abc_peptides_detected_max": 0,
                    },
                    "pivot_rule": (
                        "If exogenous human serum beta2m (1.5-3.0 ug/mL) reconstitutes detectable W6/32 conformational staining (> 1.2x isotype), HC10/L31 free heavy-chain surface staining (> 1.2x isotype), "
                        "> 5.0% primary HLA-matched T1D donor autoreactive CD8+ CTL lysis (across PPI_15-24, IGRP_265-273, and ZnT8_186-194 specificities), or > 0 endogenous HLA-A/B/C peptides by W6/32 + HC10 IP-LC-MS/MS on B2M-/- SC-beta cells, "
                        "escalate to NLRC5 promoter CRISPRoff silencing or K=6 HLA-A-/- HLA-B-/- heavy-chain debulking to eliminate endogenous heavy-chain transcription at the source (AUDIT-REF & AUDIT-REF [DEC-044/045])."
                    ),
                },
            },
        },
        "tyk2_inducible_promoter_epistasis_prior_band_muse_r3": {
            "evidence_class": "SIGNALING_EPISTASIS_PRIOR_BAND_REQUIRES_CO_PRIMARY_X1xX4_AND_X3xX4_INTERACTION_ESTIMANDS",
            "primary_citations": ["PMID:27807284", "PMID:36289205", "PMID:30578352", "PMID:42268925"],
            "mechanism": (
                "TYK2 P1104A (rs34536443) reduces IFN-alpha/beta-induced pSTAT1/pSTAT2 signaling by 80-90% in the iPSC-beta TYK2i/knockdown branch (0.15-0.35x ISRE induction; Chandra et al. 2022 PMID:36289205, which assayed TYK2 KO and pharmacologic TYK2i in SC-islets) "
                "versus 0-20% in the primary human P1104A/P1104A leukocyte WT-like high-dose IFN-alpha/beta branch (0.80-1.00x ISRE induction; Boisson-Dupuis et al. 2018 PMID:30578352; alongside the engineered HEK293T VAMP-seq/signaling screen of Howard et al. 2026 PMID:42268925) while leaving JAK1/JAK2-mediated "
                "IFN-gamma signaling largely intact (0.70-0.90x); consequently, in an early Type-I-IFN-dominated autoimmune flare (prior to heavy CD8/NK IFN-gamma release), "
                "TYK2 P1104A may attenuate ISRE-dependent transcription of Syn_5xISRE_minP -> HLA-E (Arm 1B) and endogenous CXCL10 -> SERPINB9/PD-L1 (Locus 3) unless paired with constitutive/basal-floor promoters."
            ),
            "ifna_dominant_early_flare_induction_multiplier_relative_to_tyk2_wt": [0.15, 0.35],
            "ifna_dominant_early_flare_induction_multiplier_two_branch_sensitivity_vs_tyk2_wt": tyk2_ifna_isre_induction_branches,
            "ifng_present_ctl_synapse_induction_multiplier_relative_to_tyk2_wt": [0.70, 0.90],
            "architectural_coupling_rule": (
                "Any candidate combining TYK2 P1104A (X4) with B2M-/- or Locus 3 must pair X4 with constitutive/basal-floor promoters "
                "(Arm 1X EEF1A1 -> HLA-E and L3-BF-B basal-floor SERPINB9) unless Stage-0 co-primary interaction estimands beta_{X1 x X4} and beta_{X3 x X4} "
                "and the 3x2 TYK2 x L3-BF-B satellite confirm >= 70% shield induction under combined IFN-alpha (1,000 U/mL) + low IFN-gamma (10 U/mL) (AUDIT-REF & AUDIT-REF)."
            ),
        },
        "differentiation_stages_modeled": stages,
        "l3_bfb_basalfloor_profile_projection_sonnet55_r4": l3_bfb_profile_projection,
        "coupled_five_transgene_hypoxic_isr_surface_decay_and_leader_rescue_audit_sonnet55_r5": {
            "finding_ids": ["AUDIT-REF", "AUDIT-REF", "AUDIT-REF", "AUDIT-REF"],
            "decision_id": "DEC-047 / DEC-078",
            "primary_citations": ["PMID:37156915", "PMID:11106749", "PMID:26823435", "PMID:16467844"],
            "mechanism": (
                "Under acute 72 h post-implant hypoxia (pO2 <= 5 mmHg in oversize >100 um clusters or stagnant >100 um seroma fluid films) "
                "combined with IL-1beta + IFN-gamma + TNF-alpha ER stress, PERK-eIF2alpha phosphorylation attenuates global cap-dependent 5'-m7G translation "
                "by f_ISR in [0.15, 0.35] across all 5 engineered cap-dependent transgenes simultaneously (CD47-IgV-GPI, HLA-E SCT, PD-L1, SERPINB9, and iCasp9), "
                "rather than SERPINB9 alone."
            ),
            "five_transgene_72h_hypoxic_isr_decay_trajectories_at_f_isr_0p20": {
                "CD47_IgV_GPI": {
                    "t_half_hours": 20.0,
                    "hour0_molecules_per_cell": 240000,
                    "layer2_arm1b_arm1x_prior_hour0_molecules_per_cell": 238004,
                    "steady_state_under_f_isr_0p20_molecules": 48000,
                    "hour24_molecules_per_cell": 131573,
                    "hour48_molecules_per_cell": 84377,
                    "hour72_molecules_per_cell": 63834,
                    "hour72_from_238004_prior_molecules_per_cell": 63303,
                    "breaches_180k_nk_macrophage_cliff_without_dxb_po2_or_isr_bypass_leader": True,
                },
                "HLAE_SCT_Arm1X": {
                    "t_half_hours": 14.0,
                    "hour0_molecules_per_cell": 22000,
                    "steady_state_under_f_isr_0p20_molecules": 4400,
                    "hour24_molecules_per_cell": 9760,
                    "hour48_molecules_per_cell": 6033,
                    "hour72_molecules_per_cell": 4898,
                    "breaches_15k_nkg2a_cliff_without_dxb_po2_or_isr_bypass_leader": True,
                },
                "PDL1_Locus3_BFB": {
                    "t_half_hours": 16.0,
                    "hour0_ifng_induced_molecules_per_cell": 45000,
                    "hour72_under_f_isr_0p20_molecules": 10588,
                },
                "SERPINB9_Locus3_BFB": {
                    "t_half_hours": 6.0,
                    "hour0_basal_uM": 0.30,
                    "ifng_induced_normoxic_uM": 0.89,
                    "ifng_induced_hypoxic_f_isr_0p45_uM": 0.4005,
                    "ifng_induced_severe_anoxic_f_isr_0p20_uM": 0.1780,
                },
                "iCasp9_AAVS1": {
                    "t_half_hours": 24.0,
                    "normoxic_dimerizable_monomer_fraction": 1.0,
                    "hour72_under_f_isr_0p20_fraction": 0.30,
                    "hour72_under_f_isr_0p45_fraction": 0.5188,
                    "requires_pulsed_ap1903_plus_birinapant_smac_mimetic_under_hypoxia": True,
                },
                "leader_rescue_f_isr_0p75_72h_trajectories": {
                    "CD47_IgV_GPI_hour72_molecules_at_f_isr_0p75_from_238004_prior": 183410,
                    "CD47_IgV_GPI_hour72_molecules_at_f_isr_0p75_from_240000_nominal": 184948,
                    "CD47_IgV_GPI_hour72_molecules_at_f_isr_0p75": 183354,
                    "HLA_E_SCT_hour72_molecules_at_f_isr_0p75_from_22000_arm1x": 16656,
                    "HLA_E_SCT_hour72_molecules_at_f_isr_0p75_from_20000_baseline": 15142,
                    "HLA_E_SCT_hour72_molecules_at_f_isr_0p75": 15250,
                    "clears_180k_cd47_and_15k_hlae_72h_retention_gates": True,
                },
            },
            "five_transgene_72h_hypoxic_isr_decay_trajectories_at_f_isr_0p45": {
                "decay_law": "S(t) = S_0 * (f_ISR + (1 - f_ISR) * 2^(-t / t_half))",
                "CD47_IgV_GPI_t_half_20h_from_238004_prior_hour72_molecules": 117897,
                "CD47_IgV_GPI_t_half_20h_from_240000_nominal_hour72_molecules": 118886,
                "HLAE_SCT_Arm1X_t_half_14h_from_22000_hour72_molecules": 10243,
                "PDL1_Locus3_BFB_t_half_16h_from_45000_hour72_molecules": 21341,
                "SERPINB9_Locus3_BFB_t_half_6h_from_0p89uM_hour72_uM": 0.4006,
                "iCasp9_AAVS1_t_half_24h_hour72_monomer_fraction": 0.5188,
            },
            "leader_rescue_f_isr_0p75_72h_trajectories": {
                "CD47_IgV_GPI_hour72_molecules_at_f_isr_0p75_from_238004_prior": 183410,
                "CD47_IgV_GPI_hour72_molecules_at_f_isr_0p75_from_240000_nominal": 184948,
                "CD47_IgV_GPI_hour72_molecules_at_f_isr_0p75": 183354,
                "HLA_E_SCT_hour72_molecules_at_f_isr_0p75_from_22000_arm1x": 16656,
                "HLA_E_SCT_hour72_molecules_at_f_isr_0p75_from_20000_baseline": 15142,
                "HLA_E_SCT_hour72_molecules_at_f_isr_0p75": 15250,
                "clears_180k_cd47_and_15k_hlae_72h_retention_gates": True,
            },
            "single_cell_lognormal_variegation_and_p10_floor_gate": {
                "lognormal_sd_ln_range": [0.35, 0.55],
                "bulk_mean_240k_at_sigma_0p45_median_molecules": 216890,
                "bulk_mean_240k_at_sigma_0p45_p10_molecules": 121838,
                "fraction_of_cells_below_200k_at_bulk_mean_240k_sigma_0p45": 0.4285,
                "fraction_of_cells_below_180k_at_bulk_mean_240k_sigma_0p45": 0.3393,
                "layer2_prior_238004_at_sigma_0p45_median_molecules": 215086,
                "layer2_prior_238004_at_sigma_0p45_p10_molecules": 120825,
                "fraction_of_cells_below_200k_at_prior_238004_sigma_0p45": 0.4358,
                "fraction_of_cells_below_180k_at_prior_238004_sigma_0p45": 0.3462,
                "required_bulk_mean_for_p10_ge_180k_at_sigma_0p35_molecules": 299690,
                "required_bulk_mean_for_p10_ge_180k_at_sigma_0p45_molecules": 354570,
                "post_72h_hypoxic_isr_stressed_single_cell_p10_joint_gate_terra61_r6": {
                    "finding_ids": ["AUDIT-REF", "AUDIT-REF", "AUDIT-REF", "AUDIT-REF", "AUDIT-REF"],
                    "stressed_72h_bulk_mean_183354_at_sigma_0p45_p10_molecules": 93081,
                    "stressed_72h_bulk_mean_183354_at_sigma_0p45_fraction_below_180k": 0.5730,
                    "stressed_72h_bulk_mean_183410_exact_retention_at_sigma_0p45_p10_molecules": 93109,
                    "stressed_72h_bulk_mean_183410_exact_retention_at_sigma_0p45_fraction_below_180k": 0.5727,
                    "required_72h_stressed_bulk_mean_for_p10_ge_180k_at_sigma_0p45_molecules": 354570,
                    "required_hour0_bulk_mean_for_post_72h_f_isr_0p75_p10_ge_180k_at_sigma_0p45_molecules": 460112,
                    "required_hour0_bulk_mean_for_post_72h_f_isr_0p75_p10_ge_180k_at_sigma_0p45_rounded_retention_molecules": 460252,
                    "required_hour0_bulk_mean_for_post_72h_f_isr_0p75_p10_ge_180k_at_sigma_0p32_molecules": 370487,
                    "required_hour0_bulk_mean_for_post_72h_f_isr_0p85_p10_ge_180k_at_sigma_0p32_molecules": 331068,
                    "hour0_bulk_mean_366000_at_f_isr_0p85_and_sigma_0p32_post_72h_p10_molecules": 198992,
                    "required_max_sigma_ln_at_hour0_bulk_mean_320k_and_f_isr_0p75_for_72h_p10_ge_180k": 0.2258,
                    "required_max_sigma_ln_at_hour0_bulk_mean_320k_and_f_isr_0p85_for_72h_p10_ge_180k": 0.2986,
                    "operational_sigma_ln_ceiling_at_hour0_320k_and_f_isr_0p85": 0.28,
                    "hour0_bulk_mean_320000_at_f_isr_0p85_and_sigma_0p28_post_72h_p10_molecules": 185344,
                    "hlae_arm1x_hour0_22000_at_f_isr_0p85_72h_bulk_mean_molecules": 18793,
                    "hlae_arm1x_hour0_22000_at_f_isr_0p85_and_sigma_0p28_post_72h_p10_molecules": 12622,
                    "required_hlae_hour0_bulk_mean_for_post_72h_f_isr_0p85_p10_ge_15k_at_sigma_0p28_molecules": 26144,
                    "required_hlae_max_sigma_ln_at_hour0_22000_and_f_isr_0p85_for_72h_p10_ge_15k": 0.1653,
                    "five_transgene_p10_joint_coverage_independent_fraction": round(0.90 ** 5, 5),
                    "five_transgene_p10_joint_coverage_frechet_lower_bound_fraction": 0.50,
                    "mandatory_72h_stressed_single_cell_p10_qualification_rule": (
                        "Stage-0 Gate 0A-surface / Gate 0E-ER requires that the 10th-percentile single-cell floor (p10 >= 180,000 CD47 molecules/cell "
                        "and p10 >= 15,000 HLA-E molecules/cell) hold not only at resting Hour 0 (obs_cd47_p10_single_cell_molecules >= 180,000) "
                        "but also after 72 h of 2% O2 hypoxia + cytokine stress (obs_hypoxic_72h_cd47_p10_single_cell_molecules >= 180,000 and "
                        "obs_hypoxic_72h_hlae_p10_single_cell_molecules >= 15,000, both required for READY_FOR_ENCAPSULATION_COMPLETE_STAGE0_EVIDENCE): "
                        "at the default Layer-2 prior (Hour-0 CD47 mean 238,004 -> 72-h mean 183,354 [183,410 exact] at f_ISR = 0.75) with unmitigated sigma_ln = 0.45, "
                        "the 72-h single-cell p10 is 93,081 [93,109 exact] molecules/cell with 57.30% [57.27%] of cells below 180,000; similarly, for HLA-E (t_1/2 = 14 h, R_HLAE = 0.854247 at f_ISR = 0.85), "
                        "Arm 1X Hour-0 mean 22,000 yields 72-h mean 18,793 and 72-h p10 = 12,622 (< 15,000) at sigma_ln = 0.28, requiring Hour-0 HLA-E mean >= 26,144 molecules/cell at sigma_ln = 0.28 (or sigma_ln <= 0.1653 at Hour-0 mean 22,000). "
                        "Clearing 72-h p10 >= 180,000 (CD47) and >= 15,000 (HLA-E) requires monoclonal UCOE/cHS4 variegation tightening + top-expression MCB sorting (Hour-0 CD47 >= 320,000-366,000 and Hour-0 HLA-E >= 26,144 at sigma_ln <= 0.28, f_ISR = 0.85; "
                        "AUDIT-REF, AUDIT-REF, AUDIT-REF & AUDIT-REF [DEC-050/051/052])."
                    ),
                },
                "joint_72h_hypoxic_isr_single_cell_p10_cd47_audit_sol61_r6": {
                    "finding_ids": ["AUDIT-REF", "AUDIT-REF", "AUDIT-REF", "AUDIT-REF", "AUDIT-REF"],
                    "stressed_72h_bulk_mean_183354_at_sigma_0p45_p10_molecules": 93081,
                    "stressed_72h_bulk_mean_183354_at_sigma_0p45_fraction_below_180k": 0.5730,
                    "stressed_72h_bulk_mean_183410_exact_retention_at_sigma_0p45_p10_molecules": 93109,
                    "stressed_72h_bulk_mean_183410_exact_retention_at_sigma_0p45_fraction_below_180k": 0.5727,
                    "required_72h_stressed_bulk_mean_for_p10_ge_180k_at_sigma_0p45_molecules": 354570,
                    "required_hour0_bulk_mean_for_post_72h_f_isr_0p75_p10_ge_180k_at_sigma_0p45_molecules": 460112,
                    "required_hour0_bulk_mean_for_post_72h_f_isr_0p75_p10_ge_180k_at_sigma_0p32_molecules": 370487,
                    "required_hour0_bulk_mean_for_post_72h_f_isr_0p85_p10_ge_180k_at_sigma_0p32_molecules": 331068,
                    "hour0_bulk_mean_366000_at_f_isr_0p85_and_sigma_0p32_post_72h_p10_molecules": 198992,
                    "required_max_sigma_ln_at_hour0_bulk_mean_320k_and_f_isr_0p75_for_72h_p10_ge_180k": 0.2258,
                    "required_max_sigma_ln_at_hour0_bulk_mean_320k_and_f_isr_0p85_for_72h_p10_ge_180k": 0.2986,
                    "hlae_arm1x_hour0_22000_at_f_isr_0p85_72h_bulk_mean_molecules": 18793,
                    "hlae_arm1x_hour0_22000_at_f_isr_0p85_and_sigma_0p28_post_72h_p10_molecules": 12622,
                    "required_hlae_hour0_bulk_mean_for_post_72h_f_isr_0p85_p10_ge_15k_at_sigma_0p28_molecules": 26144,
                    "required_hlae_max_sigma_ln_at_hour0_22000_and_f_isr_0p85_for_72h_p10_ge_15k": 0.1653,
                    "stage0_contract_endpoint_key": "obs_hypoxic_72h_cd47_p10_single_cell_molecules",
                    "stage0_contract_hlae_p10_endpoint_key": "obs_hypoxic_72h_hlae_p10_single_cell_molecules",
                },
                "mandatory_stage0_gate_0a_pass_criteria": {
                    "obs_cd47_p10_single_cell_molecules_min": 180000,
                    "obs_hypoxic_72h_cd47_p10_single_cell_molecules_min": 180000,
                    "obs_hypoxic_72h_hlae_p10_single_cell_molecules_min": 15000,
                    "obs_hypoxic_72h_cd47_retention_molecules_min": 180000,
                    "obs_hypoxic_72h_hlae_retention_molecules_min": 15000,
                    "obs_hypoxic_15mmhg_f_isr_translation_ratio_min": 0.50,
                },
            },
            "architectural_mitigations": [