scripts/run_layer2_perturbation_and_regulatory_plane.py
Use this file in any AI chat (paste-only or attachment-capable):
Pinned raw file: https://openislet.org/files/gen-eb955f8266035aba/scripts/run_layer2_perturbation_and_regulatory_plane.py · SHA-256: 3220e68f97203dbc…
"Direct canonical part sum without inter-cistronic pause spacer is 600 (CXCL10_HA_L) + 9 (Kozak) + 1128 (SERPINB9_CDS) "
"+ 3 (TGA stop) + 122 (SV40pA) + 148 (Syn_5xISRE_minP) + 9 (Kozak) + 873 (PDL1_full_stop_CDS) + 225 (bGHpA) + 600 (CXCL10_HA_R) "
"= 3,717 bp donor (4,007 bp packaged, saving 373 bp vs 4,090-bp LOCUS3 after omitting 66-bp GSG-P2A and 589-bp WPREmut6); "
"including the sequence-materialized 82-bp inter-transcription-unit pause spacer between SV40pA and Syn_5xISRE_minP yields "
"3,717 + 82 = 3,799 bp donor (4,089 bp packaged, saving 291 bp vs 4,090-bp LOCUS3; AUDIT-REF & AUDIT-REF)."
),
"architecture": (
"600-bp CXCL10_HA_L + native SERPINB9 (376 aa, terminating at native Pro376-Stop with zero 21-aa GSG-P2A stub) "
"+ 122-bp SV40pA + [0-bp unspaced (3,717 bp) or 82-bp pause spacer (3,799 bp)] + 148-bp Syn_5xISRE_minP + Kozak "
"+ native signal-peptide PD-L1 (290 aa, starting at native Met1 without N-terminal Proline) + 225-bp bGHpA + 600-bp CXCL10_HA_R"
),
"scientific_rationale": (
"Eliminates both the 21-aa C-terminal -PG/-PGP C-degron candidate on SERPINB9 (Koren et al. 2018 PMID:29779948) "
"and the N-terminal Proline adjacent to the PD-L1 signal-peptidase cleavage site, while saving 291 bp (with 82-bp spacer) "
"or 373 bp (unspaced 3,717 bp) relative to the 4,090-bp GSG-P2A + 589-bp WPREmut6 donor (AUDIT-REF, AUDIT-REF, & AUDIT-REF)."
),
},
"Locus3_BasalFloor_ScarFree_SERPINB9_PDL1_challenger_muse_r3": (
lambda basalfloor_230, cxcl10_r_shielded, l3_bfb_seq, l3_bfc_ortho_seq, l3_bfc_bicistronic_3915_seq, l3_syn5xisre_matched_3996_seq: {
"product_variant_id": "ISLET1_A4_L3_BFB_BASALFLOOR",
"l3_bfb_donor_length_bp": len(l3_bfb_seq),
"l3_bfb_packaged_aav6_length_with_2x145bp_itrs_bp": len(l3_bfb_seq) + 290,
"l3_bfb_aav6_4700bp_headroom_bp": 4700 - (len(l3_bfb_seq) + 290),
"l3_bfb_assembled_4078bp_pam_shielded_donor_sha256": sha256_str(l3_bfb_seq),
"l3_bfb_assembled_4078bp_pam_shielded_donor_sequence": l3_bfb_seq,
"l3_bfb_hybrid_230bp_basalfloor_isre_nfkb_hpgk1_promoter_sequence": basalfloor_230,
"l3_bfb_hybrid_230bp_basalfloor_isre_nfkb_hpgk1_promoter_sha256": sha256_str(basalfloor_230),
"l3_bfb_5top_oligopyrimidine_tract_present": ("CTTTTT" in basalfloor_230),
"l3_syn5xisre_matched_2afree_comparator_3996bp_donor_length_bp": len(l3_syn5xisre_matched_3996_seq),
"l3_syn5xisre_matched_2afree_comparator_3996bp_packaged_aav6_length_bp": len(l3_syn5xisre_matched_3996_seq) + 290,
"l3_syn5xisre_matched_2afree_comparator_3996bp_donor_sha256": sha256_str(l3_syn5xisre_matched_3996_seq),
"l3_syn5xisre_matched_2afree_comparator_3996bp_donor_sequence": l3_syn5xisre_matched_3996_seq,
"l3_bfc_dual_basal_floor_donor_length_bp": len(l3_bfc_ortho_seq),
"l3_bfc_dual_basal_floor_packaged_aav6_length_bp": len(l3_bfc_ortho_seq) + 290,
"l3_bfc_dual_basal_floor_aav6_headroom_bp": 4700 - (len(l3_bfc_ortho_seq) + 290),
"l3_bfc_assembled_4160bp_pam_shielded_donor_sha256": sha256_str(l3_bfc_ortho_seq),
"l3_bfc_assembled_4160bp_pam_shielded_donor_sequence": l3_bfc_ortho_seq,
"l3_bfc_single_promoter_bicistronic_3915bp_donor_length_bp": len(l3_bfc_bicistronic_3915_seq),
"l3_bfc_single_promoter_bicistronic_3915bp_packaged_aav6_length_bp": len(l3_bfc_bicistronic_3915_seq) + 290,
"l3_bfc_single_promoter_bicistronic_3915bp_donor_sha256": sha256_str(l3_bfc_bicistronic_3915_seq),
"l3_bfc_single_promoter_bicistronic_3915bp_donor_sequence": l3_bfc_bicistronic_3915_seq,
"ssa_direct_repeat_elimination_audit_argon_r4": {
"l3_bfb_unit1_vs_unit2_promoter_identity": "Orthogonal 230-bp Syn_3xISRE_2xNFkB_hPGK1_Sp1_basalfloor (Unit 1, zero 5'TOP, 5'-CAGAGA-3' TSS) vs 148-bp Syn_5xISRE_minP (Unit 2); preserves both 0.30 uM Hour-0 Sp1 basal floor and 0.89 uM 24-h IFN-gamma/TNF-alpha inducible surge",
"l3_bfc_4160bp_promoter_orthogonality": "Unit 1 driven by 230-bp Syn_3xISRE_2xNFkB_hPGK1_Sp1_basalfloor and Unit 2 driven by 230-bp EEF1A1_5top_cagaga_230 (eliminating the 242-bp tandem direct repeat that risked SSA loop-out deletion of SERPINB9; AUDIT-REF)",
"l3_bfc_3915bp_single_promoter_bicistron": "600 (CXCL10_HA_L) + 49 (SPA) + 230 (EEF1A1_5top_cagaga_230) + 9 (Kozak) + 1128 (SERPINB9_nostop) + 66 (GSG-P2A) + 873 (PDL1_stop) + 135 (WPREmut6_5prime_core_135bp = wpre_mut6_589[:135]) + 225 (bGHpA) + 600 (CXCL10_HA_R) = 3,915 bp single-promoter bicistron with zero tandem promoter repeats (retains 21-aa C-terminal GSG-P2A tail on SERPINB9; included only as an SSA-repeat-free bicistronic control, whereas L3-BF-B 4,078 bp and L3-BF-C 4,160 bp provide scar-free SERPINB9)",
"l3_bfc_3915bp_retains_21aa_gsg_p2a_tail": True,
"exact_50mer_window_repeat_audit_kimi31_r4": {
"l3_bfb_4078bp_duplicated_50mer_windows": sum(1 for c in Counter(l3_bfb_seq[i:i + 50] for i in range(len(l3_bfb_seq) - 49)).values() if c > 1),
"l3_bfc_4160bp_duplicated_50mer_windows": sum(1 for c in Counter(l3_bfc_ortho_seq[i:i + 50] for i in range(len(l3_bfc_ortho_seq) - 49)).values() if c > 1),
"l3_bfc_3915bp_bicistronic_duplicated_50mer_windows": sum(1 for c in Counter(l3_bfc_bicistronic_3915_seq[i:i + 50] for i in range(len(l3_bfc_bicistronic_3915_seq) - 49)).values() if c > 1),
"l3_syn5xisre_matched_3996bp_duplicated_50mer_windows": sum(1 for c in Counter(l3_syn5xisre_matched_3996_seq[i:i + 50] for i in range(len(l3_syn5xisre_matched_3996_seq) - 49)).values() if c > 1),
"l3_scarfree_3799bp_orthogonal_inducible_comparator_duplicated_50mer_windows": sum(1 for c in Counter(dxl3_spaced_3799[i:i + 50] for i in range(len(dxl3_spaced_3799) - 49)).values() if c > 1),
"tandem_242bp_inter_unit_promoter_duplications_in_l3_bfb_and_l3_bfc": 0,
"tandem_160bp_syn5xisre_kozak_atg_inter_unit_repeat_in_3996bp_matched_comparator_bp": 160,
"repeat_provenance_note": (
"In L3-BF-B (4,078 bp), L3-BF-C (4,160 bp), and the canonical 3,799-bp scar-free comparator (ISLET1_A4_L3_SCARFREE_3799, where Unit 1 uses the endogenous CXCL10 promoter and Unit 2 uses Syn_5xISRE_minP), "
"the 8, 4, and 4 duplicated 50-mer windows arise strictly from the local multimerized 3xISRE_2xNFkB / 5xISRE enhancer tandem arrays (<=68 bp local motif array) with zero inter-unit promoter duplication, "
"and the 3,915-bp EEF1A1 bicistronic control has 0 duplicated 50-mer windows. By contrast, the 3,996-bp synthetic dual-Syn_5xISRE_minP comparator repeats the 160-bp Syn_5xISRE_minP + Kozak + ATG block across both units (108 duplicated 50-mer windows), "
"so Stage-0 runs both the 3,996-bp synthetic promoter-swap control (with junctional long-read PCR/ddPCR copy-number verification against SSA loop-out) and the repeat-free 3,799-bp CXCL10p::SERPINB9 + Syn_5xISRE_minP::PD-L1 inducible control (AUDIT-REF & AUDIT-REF)."
),
},
},
"part_breakdown_l3_bfb_4078bp": (
"600 (CXCL10_HA_L) + 49 (SPA_upstream_terminator) + 230 (Syn_3xISRE_2xNFkB_hPGK1_Sp1_basalfloor_230_non5TOP_CAGAGA) + 9 (Kozak) "
"+ 1131 (SERPINB9_scarfree_stop) + 122 (SV40pA) + 82 (inter_unit_pause_spacer) + 148 (Syn_5xISRE_minP) + 9 (Kozak) "
"+ 873 (PDL1_full_stop) + 225 (bGHpA) + 600 (CXCL10_HA_R_nt17_PAM_shielded) = 4,078 bp donor (4,368 bp packaged, +332 bp AAV6 headroom)"
),
"hour0_kinetic_race_and_stoichiometric_bolus_model_muse_r3": {
"perforin_gzmb_delivery_seconds_lopez_2013_pmid_23377437": [20, 80],
"caspase3_bid_commitment_minutes": [5, 15],
"serpinb9_protein_half_life_hours": 6.0,
"serpinb9_fraction_of_steady_state_at_2h_4h_6h": {"2h": 0.11, "4h": 0.29, "6h": 0.45},
"suicide_inhibitor_stoichiometry_si_sun_1996_pmid_8910377": {
"wt_si": 1.0,
"c_terminal_stub_degraded_si_bound": 1.5,
},
"endogenous_6p25_serpinb9_basal_uM": 0.08,
"locus3_1_to_2pct_basal_leak_serpinb9_uM": [0.0089, 0.0178],
"total_hour0_serpinb9_canonical_locus3_uM": [0.089, 0.098],
"single_hit_gzmb_bolus_uM": [0.10, 0.30],
"canonical_locus3_hour0_bolus_coverage_at_0p20uM_si_1p5": 0.30,
"l3_bfb_basal_floor_target_serpinb9_uM": 0.30,
"l3_bfb_24h_ifng_licensed_target_serpinb9_uM": 0.89,
"stage0_gate_0c_kinetic_pass_criteria": (
"Hour-0 unstimulated [SERPINB9]_0 >= 0.30 uM AND 4-h unstimulated CTL/NK Annexin-V+ <= 15% "
"AND 24-h IFN-gamma-licensed [SERPINB9]_24 >= 0.80 uM AND Stage-7 yield >= 0.90x WT (AUDIT-REF & Gate 0C-kinetic)"
),
"serpinb9_suicide_substrate_serial_pulse_ode_and_perk_eif2a_isr_audit_sol61_r4": (
lambda _pulse_traj, _pulse_traj_n: {
"governing_depletion_ode": "dS/dt = p(O2, cytokines) * f_ISR(pO2, ER_stress) - k_deg * S - SI * sum_k delta(t - t_k) * Delta_GzmB",
"analytic_inter_pulse_recurrence": "S_pre(n+1) = S_eq + (S_post(n) - S_eq) * exp(-k_deg * Delta_t); S_post(n+1) = max(0, S_pre(n+1) - SI * Delta_GzmB), where S_eq = f_ISR * S_0 and exp(-k_deg * 2h) = 2^(-1/3) = 0.793701",
"primary_citations": ["PMID:8910377", "PMID:23377437", "PMID:16467844", "PMID:18052927", "PMID:21857942", "PMID:15494398", "PMID:26670609"],
"k_deg_h_inv_at_t12_6h": round(math.log(2.0) / 6.0, 6),
"unstimulated_basal_replenishment_p0_uM_per_h_at_S0_0p30uM": round(0.30 * math.log(2.0) / 6.0, 6),
"ifng_licensed_replenishment_p24_uM_per_h_at_S_0p89uM": round(0.89 * math.log(2.0) / 6.0, 6),
"perk_eif2a_hypoxic_er_stress_translation_multiplier_f_isr": {
"normoxic_pO2_gt_15mmHg": 1.00,
"moderate_hypoxia_pO2_8_to_12mmHg_plus_cytokines": 0.45,
"severe_hypoxia_pO2_lt_5mmHg_plus_er_stress": 0.25,
"mechanism": (
"5'TOP deletion (5'-CAGAGA-3') prevents mTORC1/LARP1 selective repression of ribosomal/EEF1A1 5'TOP mRNAs, "
"but PERK-mediated eIF2-alpha Ser51 phosphorylation under combined hypoxia + inflammatory ER stress depletes global ternary complex "
"(eIF2-GTP-Met-tRNAi^Met) across all cap-dependent non-uORF transcripts (Koritzinsky et al. 2006 PMID:16467844; Gomez et al. 2008 PMID:18052927)."
),
},
"serial_granzyme_b_pulse_trajectories_delta_gzmb_0p15uM_every_2h": {
"scarfree_L3_BF_B_SI_1p0_normoxic_S0_0p30uM_post_pulse_1_2_3_uM": _pulse_traj(0.30, 1.00, 1.0, 4),
"scarfree_L3_BF_B_SI_1p0_ifng_licensed_S0_0p89uM_normoxic_post_pulse_1_2_3_uM": _pulse_traj(0.89, 1.00, 1.0, 4),
"scarfree_L3_BF_B_SI_1p0_ifng_licensed_S0_0p89uM_hypoxic_fISR_0p45_post_pulse_1_2_3_uM": _pulse_traj(0.89, 0.45, 1.0, 4),
"scarred_P2A_SI_1p5_ifng_licensed_S0_0p89uM_hypoxic_fISR_0p45_post_pulse_1_2_3_uM": _pulse_traj(0.89, 0.45, 1.5, 4),
},
"serial_granzyme_b_pulse_trajectories_exact_6dec_uM": {
"scarfree_L3_BF_B_SI_1p0_normoxic_S0_0p30uM_post_pulse_1_2_3_uM": _pulse_traj(0.30, 1.00, 1.0, 6),
"scarfree_L3_BF_B_SI_1p0_ifng_licensed_S0_0p89uM_normoxic_post_pulse_1_2_3_uM": _pulse_traj(0.89, 1.00, 1.0, 6),
"scarfree_L3_BF_B_SI_1p0_ifng_licensed_S0_0p89uM_hypoxic_fISR_0p45_post_pulse_1_2_3_uM": _pulse_traj(0.89, 0.45, 1.0, 6),
"scarred_P2A_SI_1p5_ifng_licensed_S0_0p89uM_hypoxic_fISR_0p45_post_pulse_1_2_3_uM": _pulse_traj(0.89, 0.45, 1.5, 6),
},
"sustained_12_pulse_22h_depletion_and_stationary_reserve_audit_astra6_r4": {
"scarfree_L3_BF_B_SI_1p0_normoxic_S0_0p30uM_12pulses_22h": _pulse_traj_n(0.30, 1.00, 1.0, 12, 6),
"scarfree_L3_BF_B_SI_1p0_ifng_licensed_S0_0p89uM_normoxic_12pulses_22h": _pulse_traj_n(0.89, 1.00, 1.0, 12, 6),
"scarfree_L3_BF_B_SI_1p0_ifng_licensed_S0_0p89uM_hypoxic_fISR_0p45_12pulses_22h": _pulse_traj_n(0.89, 0.45, 1.0, 12, 6),
"scarred_P2A_SI_1p5_ifng_licensed_S0_0p89uM_hypoxic_fISR_0p45_12pulses_22h": _pulse_traj_n(0.89, 0.45, 1.5, 12, 6),
"stationary_post_pulse_reserve_formula": "S_post_star = f_ISR * S_0 - (SI * Delta_GzmB) / (1 - 2^(-1/3)); positive stationary reserve under infinite 2-h serial hits requires S_0 > (SI * 0.15) / (f_ISR * (1 - 2^(-1/3)))",
"minimum_S0_uM_for_positive_stationary_reserve": {
"normoxic_fISR_1p00_SI_1p0": round(0.15 / (1.0 - 2.0 ** (-1.0 / 3.0)), 6),
"hypoxic_fISR_0p45_SI_1p0": round(0.15 / (0.45 * (1.0 - 2.0 ** (-1.0 / 3.0))), 6),
"hypoxic_fISR_0p45_SI_1p5_P2A_scarred": round((1.5 * 0.15) / (0.45 * (1.0 - 2.0 ** (-1.0 / 3.0))), 6),
},
"stationary_post_pulse_reserve_uM_at_S0_0p89_normoxic_SI_1p0": round(0.89 - 0.15 / (1.0 - 2.0 ** (-1.0 / 3.0)), 6),
"minimum_S0_uM_for_12_pulse_22h_finite_window_survival_sonnet55_r4": (
lambda _bisect_s0: {
"computation_mode": "LIVE_BISECTION_DERIVED_6DEC_EXACT",
"from_pre_accumulated_S0_start": {
"normoxic_fISR_1p00_SI_1p0": _bisect_s0(1.00, 1.0, False),