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…

                                        "+ 65-bp MAZ4-inspired G-rich Pol II pause element (engineering sequence model motivated by Ashfield et al. 1994 PMID:7988563; lacks exact G5AG5 consensus copies, so functional Pol II pause/termination and dsRNA suppression require Stage-0 Readout 4 strand-specific RT-ddPCR and J2 anti-dsRNA dot-blot verification; AUDIT-REF), replacing the unspaced 122-bp sense SV40_late_polyA "
                                        "which would form a 244-bp zero-spacer perfect inverted repeat x + rc(x) [122-bp stem] against Arm 1B's antisense "
                                        "SV40_late_polyA at nt 601..722 (AUDIT-REF, Q1-P8, & AUDIT-REF)"
                                    ),
                                    "max_disjoint_inverted_repeat_stem_across_full_4128bp_donor_bp": _max_disjoint_inverted_repeat_stem_bp(arm1b_sense_term_4128_seq),
                                    "max_disjoint_inverted_repeat_stem_in_276bp_terminator_sv40_boundary_bp": _max_disjoint_inverted_repeat_stem_bp(spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:722]),
                                    "inverted_repeat_stems_ge_16bp_count": _count_disjoint_inverted_repeat_stems_ge_k(arm1b_sense_term_4128_seq, 16),
                                    "max_inverted_repeat_stem_bp": _max_disjoint_inverted_repeat_stem_bp(arm1b_sense_term_4128_seq),
                                    "passes_zero_inverted_repeat_ge16bp_ssdna_packaging_lint": bool(_max_disjoint_inverted_repeat_stem_bp(arm1b_sense_term_4128_seq) < 16),
                                    "matched_4128bp_spa_s3_15aa_l1_satellite_control_donor_length_bp": 4128,
                                    "matched_4128bp_spa_s3_15aa_l1_satellite_control_donor_sha256": sha256_str(
                                        b2m_ha_l_s3_only_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:]
                                    ),
                                    "matched_4128bp_spa_s3_15aa_l1_satellite_control_donor_sequence": (
                                        b2m_ha_l_s3_only_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:]
                                    ),
                                    "arm1b_spa_s3_15aal1_matched_linker_control_4128bp_donor_sha256": sha256_str(
                                        b2m_ha_l_s3_only_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:]
                                    ),
                                    "arm1b_spa_s3_15aal1_matched_linker_control_4128bp_donor_sequence": (
                                        b2m_ha_l_s3_only_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:]
                                    ),
                                    "matched_4128bp_spa_s3_uorf_agg_15aa_l1_satellite_control_donor_sha256": sha256_str(
                                        b2m_ha_l_s3_uorf_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:]
                                    ),
                                    "matched_4128bp_spa_s3_uorf_agg_15aa_l1_satellite_control_donor_sequence": (
                                        b2m_ha_l_s3_uorf_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:]
                                    ),
                                    "sense_hla_e_sct_coordinate_table_in_4143bp_and_4128bp_donors_astra_r3": {
                                        "Syn_5xISRE_minP_148bp_sense_1based": "1644..1791",
                                        "Kozak_9bp_sense_1based": "1792..1800",
                                        "HLAE_SCT_start_codon_ATG_1based": "1801..1803",
                                        "HLAE_SCT_B2M_signal_peptide_20aa_1based": "1801..1860",
                                        "HLAE_SCT_VMAPRTLVL_9aa_peptide_1based": "1861..1887",
                                        "L1_linker_15aa_45bp_in_4128bp_donor_1based": "1888..1932",
                                        "L1_linker_20aa_60bp_in_4143bp_donor_1based": "1888..1947",
                                        "mature_B2M_first_20aa_in_4143bp_donor_1based": "1948..2007",
                                        "HLAE_SCT_ORF_4128bp_15aa_L1_1based": "1801..3303",
                                        "HLAE_SCT_ORF_4128bp_15aa_L1_length_bp": 1503,
                                        "HLAE_SCT_ORF_4143bp_20aa_L1_1based": "1801..3318",
                                        "HLAE_SCT_ORF_4143bp_20aa_L1_length_bp": 1518,
                                        "bGH_polyA_225bp_sense_in_4128bp_donor_1based": "3304..3528",
                                        "bGH_polyA_225bp_sense_in_4143bp_donor_1based": "3319..3543",
                                        "B2M_HA_R_600bp_in_4128bp_donor_1based": "3529..4128",
                                        "B2M_HA_R_600bp_in_4143bp_donor_1based": "3544..4143",
                                        "l1_codon_diversification_note": (
                                            "Note: the 60-bp 20-aa L1=(GGGGS)4 block at 1888..1947 in 4,143-bp Embodiment A* is a codon-diversified "
                                            "(GGGGS)4 nucleotide sequence that differs at 14 synonymous nucleotide positions across 10 shared codons in the first 45 bp relative to the "
                                            "45-bp 15-aa L1=(GGGGS)3 block at 1888..1932 in the 4,128-bp satellite control while preserving 100% (GGGGS)n amino-acid identity "
                                            "(making the 4,143-bp vs 4,128-bp comparison a joint linker-length + synonymous-codon-schedule intervention bundle unless paired with an identical-45bp-prefix codon control; AUDIT-REF & AUDIT-REF)."
                                        ),
                                    },
                                    "embodiment_a_star_combined_4143bp_donor_length_bp": 4143,
                                    "embodiment_a_star_combined_4143bp_packaged_aav6_length_bp": 4433,
                                    "embodiment_a_star_combined_4143bp_donor_sha256": sha256_str(
                                        b2m_ha_l_s3_only_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:1733] + div_l1_20aa_60bp + arm_1b_seq[1778:]
                                    ),
                                    "embodiment_a_star_combined_4143bp_donor_sequence": (
                                        b2m_ha_l_s3_only_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:1733] + div_l1_20aa_60bp + arm_1b_seq[1778:]
                                    ),
                                    "embodiment_a_star_combined_4143bp_with_uorf_agg_ablation_donor_sha256": sha256_str(
                                        b2m_ha_l_s3_uorf_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:1733] + div_l1_20aa_60bp + arm_1b_seq[1778:]
                                    ),
                                    "embodiment_a_star_combined_4143bp_with_uorf_agg_ablation_donor_sequence": (
                                        b2m_ha_l_s3_uorf_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:1733] + div_l1_20aa_60bp + arm_1b_seq[1778:]
                                    ),
                                    "embodiment_a_star_combined_4143bp_with_5top_cagaga_donor_sha256": sha256_str(
                                        b2m_ha_l_s3_only_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:1259] + revcomp(eef1a1_5top_cagaga_230) + arm_1b_seq[1489:1733] + div_l1_20aa_60bp + arm_1b_seq[1778:]
                                    ),
                                    "embodiment_a_star_combined_4143bp_with_5top_cagaga_donor_sequence": (
                                        b2m_ha_l_s3_only_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:1259] + revcomp(eef1a1_5top_cagaga_230) + arm_1b_seq[1489:1733] + div_l1_20aa_60bp + arm_1b_seq[1778:]
                                    ),
                                    "embodiment_a_star_native_b2m_atg_uorf_and_ablation_note_kimi31_r3": (
                                        "In the primary 4,143-bp Embodiment A* donor (b2m_ha_l_s3_only_600, SHA-256 prefix 0995f8e35791d219), the endogenous B2M Exon-1 ATG at 539..541 is preserved "
                                        "and terminates at the in-frame stop TAG at 623..625 (87-bp / 28-aa uORF) inside the 154-bp SPA+spacer+MAZ4 terminator prior to the "
                                        "antisense CD47 unit, while sense HLA-E SCT is driven independently by internal Syn_5xISRE_minP_148bp_sense at 1644..1791 (1490..1637 + 154-bp upstream terminator) -> Kozak_9bp at 1792..1800 -> HLA-E start codon ATG at 1801..1803 (complete 1,518-bp / 505-aa + stop HLA-E SCT ORF at 1801..3318 in 4,143-bp A* vs 1,503-bp / 500-aa + stop at 1801..3303 in the 4,128-bp 15-aa L1 control, with the 60-bp 20-aa L1 linker internal to the ORF at 1888..1947 [and mature B2M residues 1..20 at 1948..2007]; note 1907..1909 is GTG); "
                                        "the companion 4,143-bp donor with 540 T->G (b2m_ha_l_s3_uorf_600, chr15:44711548T>G, SHA-256 prefix e1dbe2bbe797058c) additionally ablates the 539..541 ATG to AGG, and matched_4128bp_spa_s3_15aa_l1_satellite_control_donor_sequence provides the exact S3-matched 4,128-bp 15-aa L1 satellite control (AUDIT-REF, AUDIT-REF, AUDIT-REF & AUDIT-REF)."
                                    ),
                                    "max_disjoint_inverted_repeat_stem_across_4143bp_embodiment_a_star_bp": _max_disjoint_inverted_repeat_stem_bp(
                                        b2m_ha_l_s3_only_600 + spa49_spacer40_maz4_65_154bp + arm_1b_seq[600:1733] + div_l1_20aa_60bp + arm_1b_seq[1778:]
                                    ),
                                    "scientific_rationale": (
                                        "Terminates sense-strand Pol II readthrough from the endogenous B2M Exon 1 promoter (chr15:44711477..44711547) "
                                        "before it traverses the antisense CD47-IgV-GPI transcription unit, preventing convergent sense/antisense dsRNA "
                                        "formation and MDA5/IFIH1 innate immune sensing in T1D beta-cells (Liddicoat et al. 2015 PMID:26275108; AUDIT-REF) "
                                        "while using an orthogonal sequence-divergent SPA+spacer+MAZ4 sense terminator so zero hairpins >=16 bp form in the "
                                        "single-stranded AAV6 genome (max disjoint inverted-repeat stem = 8 bp across the 276-bp terminator-SV40pA boundary and "
                                        "15 bp across the full 4,128-bp donor; AUDIT-REF, Q1-P8, & AUDIT-REF)."
                                    ),
                                },
                                "Arm_1A_lite_AAV6_compatible_challenger_sonnet55_r1": {
                                    "donor_length_bp": len(arm1a_lite_canonical_3891),
                                    "packaged_aav6_length_with_2x145bp_itrs_bp": len(arm1a_lite_canonical_3891) + 290,
                                    "aav6_4700bp_headroom_bp": 4700 - (len(arm1a_lite_canonical_3891) + 290),
                                    "canonical_parts_assembled_donor_sha256": sha256_str(arm1a_lite_canonical_3891),
                                    "canonical_parts_assembled_donor_sequence": arm1a_lite_canonical_3891,
                                    "max_disjoint_inverted_repeat_stem_canonical_3891bp_bp": _max_disjoint_inverted_repeat_stem_bp(arm1a_lite_canonical_3891),
                                    "edited_3891bp_with_uorf_agg_s3_and_5top_cagaga_donor_sha256": sha256_str(arm1a_lite_edited_3891),
                                    "edited_3891bp_with_uorf_agg_s3_and_5top_cagaga_donor_sequence": arm1a_lite_edited_3891,
                                    "max_disjoint_inverted_repeat_stem_edited_3891bp_bp": _max_disjoint_inverted_repeat_stem_bp(arm1a_lite_edited_3891),
                                    "edited_3906bp_with_20aa_l1_g4s4_donor_length_bp": len(arm1a_lite_edited_20aa_l1_3906),
                                    "edited_3906bp_with_20aa_l1_g4s4_packaged_length_bp": len(arm1a_lite_edited_20aa_l1_3906) + 290,
                                    "edited_3906bp_with_20aa_l1_g4s4_donor_sha256": sha256_str(arm1a_lite_edited_20aa_l1_3906),
                                    "edited_3906bp_with_20aa_l1_g4s4_donor_sequence": arm1a_lite_edited_20aa_l1_3906,
                                    "max_disjoint_inverted_repeat_stem_edited_3906bp_bp": _max_disjoint_inverted_repeat_stem_bp(arm1a_lite_edited_20aa_l1_3906),
                                    "diversified_20aa_l1_g4s4_60bp_sequence": div_l1_20aa_60bp,
                                    "architecture": (
                                        "600-bp B2M_HA_L (canonical 3,891-bp SHA-256 above, plus sequence-materialized 3,891-bp edited variant carrying "
                                        "0-bp native B2M ATG->AGG uORF ablation at nt 539..541 and 4-nt synonymous S3 AsCas12a PAM+seed shield at nt 583, 589, 592, 595, "
                                        "and 3,906-bp +15-bp 20-aa L1=(G4S)4 variant; AUDIT-REF) + 230-bp EEF1A1_core_promoter (5'TOP CTTTTT->CAGAGA at nt 798..803) "
                                        "+ 133-bp Chimeric_Intron + 9-bp Kozak + 1,500-bp (or 1,515-bp) HLA-E*01:03(VMAPRTLVL) SCT + 66-bp GSG-P2A + 528-bp CD47-IgV-GPI "
                                        "+ 225-bp bGH_polyA + 600-bp B2M_HA_R (omitting 589-bp WPREmut6 and trimming 2x800-bp HAs to 2x600-bp)"
                                    ),
                                    "cross_donor_locus3_longest_shared_block_bp": 225,
                                    "cross_donor_locus3_longest_shared_block_canonical_parts_bp": 225,
                                    "cross_donor_locus3_longest_shared_block_with_orthogonal_polya_and_diversified_2a_bp": 11,
                                    "scientific_rationale": (
                                        "Compresses canonical 4,880-bp Arm 1A by 989 bp into a 3,891-bp donor (4,181 bp packaged with 2x145 bp ITRs; "
                                        "+519 bp AAV6 headroom, or 3,906 bp / 4,196 bp packaged with the 20-aa L1=(G4S)4 linker), enabling an unconfounded "
                                        "single-AAV6 head-to-head comparison against 3,974-bp Arm 1B while eliminating the 589-bp WPREmut6 portion of the "
                                        "821-bp WPREmut6+bGHpA cross-donor homology block with Locus 3 (reducing canonical shared homology to 225 bp at bGH_polyA "
                                        "and 69 bp at GSG-P2A+ATG, and to 11 bp when paired with orthogonal polyA + diversified 2A or 2A-free DX-L3) and ablating "
                                        "the upstream native B2M ATG uORF (AUDIT-REF, Q1-P2, AUDIT-REF, & AUDIT-REF)."
                                    ),
                                },
                                "DX_S_Split_Cassette_Arm1C_HLAE_plus_Locus4_CD47_challenger_sonnet55_r1": {
                                    "locus1_arm1c_donor_length_bp": len(arm1c_trapped_3459),
                                    "locus1_arm1c_packaged_aav6_length_bp": len(arm1c_trapped_3459) + 290,
                                    "locus1_arm1c_aav6_headroom_bp": 4700 - (len(arm1c_trapped_3459) + 290),
                                    "locus1_arm1c_promoter_trapped_wpre3_3459bp_donor_sha256": sha256_str(arm1c_trapped_3459),
                                    "locus1_arm1c_promoter_trapped_wpre3_3459bp_donor_sequence": arm1c_trapped_3459,
                                    "max_disjoint_inverted_repeat_stem_arm1c_3459bp_bp": _max_disjoint_inverted_repeat_stem_bp(arm1c_trapped_3459),
                                    "wpre3_compact_389bp_sequence": wpre3_compact_389bp,
                                    "wpre3_compact_389bp_sha256": sha256_str(wpre3_compact_389bp),
                                    "wpre3_compact_389bp_provenance_note_astra_r2": (
                                        "389-bp 5' gamma+alpha prefix of WPREmut6_589bp (WHV J04514.1:1093..1481; distinct from the 247-bp Choi et al. 2014 [PMID:24618276, PMC3975461] "
                                        "gamma+alpha WPRE3 bridge J04514.1:1093..1339 and from the full 589-bp tripartite gamma-alpha-beta WPREmut6; AUDIT-REF)."
                                    ),
                                    "promoter_trapped_post_splice_uorf_audit_and_rescue_astra_r2": {
                                        "unmodified_3459bp_post_splice_uorf_hazard": (
                                            "In unmodified promoter-trapped Arm 1C (3,459 bp), excising the 133-nt chimeric intron (601..733) joins B2M_HA_L nt 600 (5'-...CTCGCGCTACTCTCTCTTTCTGGCCTGGAGGCTAT-3') "
                                            "to Kozak_9bp nt 734 (5'-GCCGCCACCATG...-3'), placing the HLA-E start codon at spliced 610..612 while both the native B2M ATG at 539..541 "
                                            "(24-aa uORF MSRSVALAVLALLSLSGLEAMPPP*) and a de novo splice-junction ATG at 599..600+734 (4-aa uORF MPPP*) read through GCCGCCACC in frame "
                                            "and terminate at TGA (spliced 611..613, overlapping HLA-E ATG 610..612 across 2 shared nucleotides [611..612 TG] in a 4-nt ATGA start/stop overlap [-1 frame shift]; AUDIT-REF)."
                                        ),
                                        "double_uaug_ablated_rescue_mutations": "B2M_HA_L nt 540 T->G (native ATG->AGG), nt 599..600 AT->CC (eliminating splice-junction ATG), plus 4-nt S3 PAM+seed shield at nt 583, 589, 592, 595",
                                        "double_uaug_ablated_3459bp_donor_sha256": sha256_str(
                                            (b2m_ha_l_600[:539] + "G" + b2m_ha_l_600[540:582] + "C" + b2m_ha_l_600[583:588] + "A" + b2m_ha_l_600[589:591] + "C" + b2m_ha_l_600[592:594] + "A" + b2m_ha_l_600[595:598] + "CC")
                                            + arm1c_trapped_3459[600:]
                                        ),
                                        "double_uaug_ablated_3459bp_donor_sequence": (
                                            (b2m_ha_l_600[:539] + "G" + b2m_ha_l_600[540:582] + "C" + b2m_ha_l_600[583:588] + "A" + b2m_ha_l_600[589:591] + "C" + b2m_ha_l_600[592:594] + "A" + b2m_ha_l_600[595:598] + "CC")