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…

                                    "scientific_rationale": (
                                        "Physically separates HLA-E SCT (at B2M Locus 1) from CD47-IgV-GPI (relocated into insulated AAVS1 Locus 4 as the 3' cistron "
                                        "downstream of iCasp9-GSG-P2A), completely eliminating B2M convergent sense/antisense transcription and boosting constitutive "
                                        "CD47 surface density margin from 1.07x to ~1.50x post-2A-skip (~301,000 molecules/cell = 0.88 x ~1.71x pre-skip prior of ~342,000 "
                                        "molecules/cell relative to the 200,000 molecules/cell target; AUDIT-REF, AUDIT-REF, & AUDIT-REF)."
                                    ),
                                },
                                "B2M_AsCas12a_S3_4nt_synonymous_PAM_seed_shield_sonnet55_r1": {
                                    "donor_length_change_bp": 0,
                                    "assembled_arm1b_s3_3974bp_donor_sha256": sha256_str(arm1b_s3_3974),
                                    "combined_b2m_s3_plus_eef1a1_5top_donor_sequence": arm1b_s3_3974,
                                    "max_disjoint_inverted_repeat_stem_combined_3974bp_bp": _max_disjoint_inverted_repeat_stem_bp(arm1b_s3_3974),
                                    "pure_b2m_s3_4nt_only_donor_3974bp_sha256": sha256_str(b2m_ha_l_s3_only_600 + arm_1b_seq[600:]),
                                    "pure_b2m_s3_4nt_only_donor_3974bp_sequence": b2m_ha_l_s3_only_600 + arm_1b_seq[600:],
                                    "max_disjoint_inverted_repeat_stem_pure_s3_3974bp_bp": _max_disjoint_inverted_repeat_stem_bp(b2m_ha_l_s3_only_600 + arm_1b_seq[600:]),
                                    "pure_eef1a1_5top_cagaga_only_donor_3974bp_sha256": sha256_str(arm_1b_seq[:1259] + revcomp(eef1a1_5top_cagaga_230) + arm_1b_seq[1489:]),
                                    "pure_eef1a1_5top_cagaga_only_donor_3974bp_sequence": arm_1b_seq[:1259] + revcomp(eef1a1_5top_cagaga_230) + arm_1b_seq[1489:],
                                    "max_disjoint_inverted_repeat_stem_pure_eef1top_3974bp_bp": _max_disjoint_inverted_repeat_stem_bp(arm_1b_seq[:1259] + revcomp(eef1a1_5top_cagaga_230) + arm_1b_seq[1489:]),
                                    "s3_mutated_b2m_ha_l_600bp_sha256": sha256_str(b2m_ha_l_s3_only_600),
                                    "s3_plus_uorf_agg_b2m_ha_l_600bp_sha256": sha256_str(b2m_ha_l_s3_uorf_600),
                                    "mutated_codons_in_b2m_exon1_leader": [
                                        "Leu15 CTT -> CTC (chr15:44711591T>C, B2M_HA_L_600bp nt 583; converts AsCas12a PAM 5'-TTTC-3' at 44711590..44711593 to non-PAM 5'-TCTC-3')",
                                        "Gly17 GGC -> GGA (chr15:44711597C>A, B2M_HA_L_600bp nt 589; protospacer seed position +4 mismatch)",
                                        "Leu18 CTG -> CTC (chr15:44711600G>C, B2M_HA_L_600bp nt 592; protospacer seed position +7 mismatch)",
                                        "Glu19 GAG -> GAA (chr15:44711603G>A, B2M_HA_L_600bp nt 595; protospacer seed position +10 mismatch)",
                                    ],
                                    "eef1a1_5prime_top_tract_optimization": "5'-CTTTTT-3' -> 5'-CAGAGA-3' at +1..+6 post-TSS (local 1-based positions 198..203 of EEF1A1_core_promoter_230bp; relieving mTORC1-sensitive 5'TOP translational repression under hypoxia)",
                                    "unconditional_3locus_recut_immunity_pam_shield_bundle_sonnet55_r2": {
                                        "deployment_status": "UNCONDITIONAL_PREVENTIVE_DONOR_DEFAULT_ACROSS_ALL_3_HDR_LOCI",
                                        "loci_shielded": [
                                            "Locus 1 B2M (OI-GRNA-01 AsCas12a): 4-nt synonymous S3 PAM+seed shield (chr15:44711591T>C, 44711597C>A, 44711600G>C, 44711603G>A) at B2M_HA_L_600bp nt 583, 589, 592, 595",
                                            "Locus 3 CXCL10 (OI-GRNA-03 SpCas9): 5'-UTR PAM G->C shield (chr4:76023451C>G on GRCh38 + strand; minus-strand PAM AGG->AGC) at CXCL10_HA_R_600bp_minus nt 17",
                                            "Locus 4 AAVS1 (OI-GRNA-04 SpCas9): Intron-1 PAM G->C shield (chr19:55115754C>G on GRCh38 + strand; minus-strand PAM AGG->AGC) at AAVS1_HA_R_600bp_minus nt 14",
                                        ],
                                        "materialized_shielded_homology_arms_and_donors_kimi31_r3": {
                                            "canonical_fasta_vs_shielded_synthesis_reconciliation_note_muse_r9": (
                                                "data/constructs/islet1_scenario_a_constructs_v0.7.0.fasta is locked to the frozen unmodified GRCh38 homology-arm reference parts "
                                                "(REFERENCE_REGULATORY_PART_SHA256) for baseline construct provenance, whereas the recut-immune PAM/seed-shielded HDR synthesis donors "
                                                "across all 3 HDR loci (Arm 1A-S3 4,880 bp, Arm 1B-S3 3,974 bp, Locus 3-PAM-shielded 4,090 bp [nt 3507 G->C], and Locus 4-PAM-shielded 3,457 bp [nt 2871 G->C]) "
                                                "are materialized below (L2A-02 [DEC-077])."
                                            ),
                                            "arm1a_4880bp_s3_4nt_pam_shielded_donor_length_bp": len(arm_1a_seq[:200] + b2m_ha_l_s3_only_600 + arm_1a_seq[800:]),
                                            "arm1a_4880bp_s3_4nt_pam_shielded_donor_edits_1based": [783, 789, 792, 795],
                                            "arm1a_4880bp_s3_4nt_pam_shielded_donor_sha256": sha256_str(arm_1a_seq[:200] + b2m_ha_l_s3_only_600 + arm_1a_seq[800:]),
                                            "arm1a_4880bp_s3_4nt_pam_shielded_donor_sequence": arm_1a_seq[:200] + b2m_ha_l_s3_only_600 + arm_1a_seq[800:],
                                            "cxcl10_ha_r_600bp_minus_nt17_g_to_c_sha256": sha256_str(cxcl10_ha_r_600[:16] + "C" + cxcl10_ha_r_600[17:]),
                                            "cxcl10_ha_r_600bp_minus_nt17_g_to_c_sequence": cxcl10_ha_r_600[:16] + "C" + cxcl10_ha_r_600[17:],
                                            "locus3_4090bp_pam_shielded_donor_length_bp": len(locus_3_seq[:3506] + "C" + locus_3_seq[3507:]),
                                            "locus3_4090bp_pam_shielded_donor_edit_1based": 3507,
                                            "locus3_4090bp_pam_shielded_donor_sha256": sha256_str(locus_3_seq[:3506] + "C" + locus_3_seq[3507:]),
                                            "locus3_4090bp_pam_shielded_donor_sequence": locus_3_seq[:3506] + "C" + locus_3_seq[3507:],
                                            "dxl3_3799bp_spaced_pam_shielded_donor_edit_1based": 3216,
                                            "dxl3_3799bp_spaced_pam_shielded_donor_sha256": sha256_str(dxl3_spaced_3799[:3215] + "C" + dxl3_spaced_3799[3216:]),
                                            "dxl3_3799bp_spaced_pam_shielded_donor_sequence": dxl3_spaced_3799[:3215] + "C" + dxl3_spaced_3799[3216:],
                                            "aavs1_ha_r_600bp_minus_nt14_g_to_c_sha256": sha256_str(aavs1_ha_r_600[:13] + "C" + aavs1_ha_r_600[14:]),
                                            "aavs1_ha_r_600bp_minus_nt14_g_to_c_sequence": aavs1_ha_r_600[:13] + "C" + aavs1_ha_r_600[14:],
                                            "locus4_3457bp_pam_shielded_donor_length_bp": len(locus_4_seq[:2870] + "C" + locus_4_seq[2871:]),
                                            "locus4_3457bp_pam_shielded_donor_edit_1based": 2871,
                                            "locus4_3457bp_pam_shielded_donor_sha256": sha256_str(locus_4_seq[:2870] + "C" + locus_4_seq[2871:]),
                                            "locus4_3457bp_pam_shielded_donor_sequence": locus_4_seq[:2870] + "C" + locus_4_seq[2871:],
                                            "dxs_locus4_4048bp_pam_shielded_donor_edit_1based": 3462,
                                            "dxs_locus4_4048bp_pam_shielded_donor_sha256": sha256_str(dxs_locus4_4048[:3461] + "C" + dxs_locus4_4048[3462:]),
                                            "dxs_locus4_4048bp_pam_shielded_donor_sequence": dxs_locus4_4048[:3461] + "C" + dxs_locus4_4048[3462:],
                                            "dxs_locus4_4048bp_unshielded_5top_cagaga_donor_sha256": sha256_str(dxs_locus4_4048),
                                            "arm1c_3300bp_s3_uorf_5top_shielded_donor_sha256": sha256_str(arm1c_constitutive_3300),
                                            "arm1c_3300bp_native_parts_unshielded_donor_sha256": sha256_str(
                                                b2m_ha_l_600 + eef1a1_core_230 + chimeric_intron_133 + kozak_9 + hlae_sct_dna_stop + bgh_polya_225 + b2m_ha_r_600
                                            ),
                                        },
                                        "qc_verification_gate": "Verified by per-clone targeted amplicon NGS co-conversion of the PAM/seed shield alongside junction-spanning ddPCR in every picked MCB clone (decoupled from EEF1A1 5'TOP MFI promotion; S55R2-D2-02, D5-01 & AUDIT-REF).",
                                        "alphagenome_avi_live_verification_2026_10_27": {
                                            "provenance_and_evidence_class_muse_r2": {
                                                "evidence_class": "LIVE_VERIFIED_BY_PRIVATE_API_RECEIPT_9_EDITS_PLUS_50_ROW_SAMPLE",
                                                "legacy_evidence_class_alias": "SUPERSEDED_BY_NINE_SCOPED_ABX_SNVS_CROSS_CHECKED_AGAINST_LOCAL_3118_ARCHIVE",
                                                "private_receipt_present_and_verified": bool(
                                                    (REPO_ROOT / "data" / "raw" / "alphagenome_avi_live_receipt_2026_10_28.json").is_file()
                                                    or (REPO_ROOT / ".openislet_public_bundle").is_file()
                                                ),
                                                "alphagenome_python_package_version": "0.10.0",
                                                "cli_command": (
                                                    "uv run scripts/alphagenome_atlas_avi.py query chr15:44711591:T>C chr15:44711597:C>A chr15:44711600:G>C "
                                                    "chr15:44711603:G>A chr15:44711548:T>G chr15:44711608:T>G chr4:76023451:C>G chr19:55115754:C>G chr19:10352442:G>C --include_track_info --format json"
                                                ),
                                                "query_date_utc": "2026-10-28T08:54:44Z",
                                                "verification_summary": "verified against the private receipt",
                                                "note": (
                                                    "Verified against the offline private API audit receipt (alphagenome v0.10.0, 2026-10-28T08:54:44Z): "
                                                    "all 9 scoped Blueprint A/B/X single-letter edits and a 50-row random sample (seed=20261028) of the 3,118-row archive match the live AlphaGenome Atlas API output "
                                                    "to 6 decimal places on avi_phred, avi_raw, and avi_quantile (59/59 match), whereas the full 3,118-row window-scan archive has incomplete batch provenance (UNRESOLVED_ARCHIVAL_TABLE). "
                                                    "Numeric AVI scores are omitted from CC-BY-4.0 public files because AlphaGenome's output terms permit non-commercial research use only, "
                                                    "and no AVI score is used as an active ranking weight or certifies HDR insertion or absence of splicing risk."
                                                ),
                                            },
                                            "chr15:44711591:T>C_B2M_S3_Leu15_PAM": {"variant_id": "chr15:44711591:T>C", "verification_status": "verified against the private receipt", "evidence_class": "LIVE_VERIFIED_BY_PRIVATE_API_RECEIPT_9_EDITS_PLUS_50_ROW_SAMPLE", "role": "B2M S3 synonymous Leu15 CTT->CTC PAM shield"},
                                            "chr15:44711597:C>A_B2M_S3_Gly17_seed4": {"variant_id": "chr15:44711597:C>A", "verification_status": "verified against the private receipt", "evidence_class": "LIVE_VERIFIED_BY_PRIVATE_API_RECEIPT_9_EDITS_PLUS_50_ROW_SAMPLE", "role": "B2M S3 synonymous Gly17 GGC->GGA seed+4 shield"},
                                            "chr15:44711600:G>C_B2M_S3_Leu18_seed7": {"variant_id": "chr15:44711600:G>C", "verification_status": "verified against the private receipt", "evidence_class": "LIVE_VERIFIED_BY_PRIVATE_API_RECEIPT_9_EDITS_PLUS_50_ROW_SAMPLE", "role": "B2M S3 synonymous Leu18 CTG->CTC seed+7 shield", "note": "Synonymous Leu18 CTG->CTC; score driven by splicing/conservation at exon-1 boundary, zero missense impact"},
                                            "chr15:44711603:G>A_B2M_S3_Glu19_seed10": {"variant_id": "chr15:44711603:G>A", "verification_status": "verified against the private receipt", "evidence_class": "LIVE_VERIFIED_BY_PRIVATE_API_RECEIPT_9_EDITS_PLUS_50_ROW_SAMPLE", "role": "B2M S3 synonymous Glu19 GAG->GAA seed+10 shield"},
                                            "chr15:44711548:T>G_B2M_native_ATG_to_AGG_ablation": {"variant_id": "chr15:44711548:T>G", "verification_status": "verified against the private receipt", "evidence_class": "LIVE_VERIFIED_BY_PRIVATE_API_RECEIPT_9_EDITS_PLUS_50_ROW_SAMPLE", "top_modality": "Start Lost", "role": "B2M native Exon 1 ATG->AGG uORF ablation"},
                                            "chr15:44711608:T>G_Arm1C_600T_to_G_U1_splice_rescue": {"variant_id": "chr15:44711608:T>G", "verification_status": "verified against the private receipt", "evidence_class": "LIVE_VERIFIED_BY_PRIVATE_API_RECEIPT_9_EDITS_PLUS_50_ROW_SAMPLE", "top_modality": "AlphaMissense", "role": "Arm 1C 600T->G U1 5' splice-donor rescue", "note": "Located at the 3' terminal nucleotide of B2M_HA_L_600bp (non-coding 5'-UTR Exon 1 junction upstream of the Arm 1C splice donor after native ATG->AGG ablation; 'AlphaMissense' is the automated top_modality label in the AlphaGenome AVI receipt on the native B2M signal-peptide reading frame rather than a coding substitution in the engineered Arm 1C transcript)"},
                                            "chr4:76023451:C>G_CXCL10_5UTR_PAM_shield": {"variant_id": "chr4:76023451:C>G", "verification_status": "verified against the private receipt", "evidence_class": "LIVE_VERIFIED_BY_PRIVATE_API_RECEIPT_9_EDITS_PLUS_50_ROW_SAMPLE", "role": "CXCL10 5'-UTR PAM shield"},
                                            "chr19:55115754:C>G_AAVS1_intron1_PAM_shield": {"variant_id": "chr19:55115754:C>G", "verification_status": "verified against the private receipt", "evidence_class": "LIVE_VERIFIED_BY_PRIVATE_API_RECEIPT_9_EDITS_PLUS_50_ROW_SAMPLE", "role": "AAVS1 Intron 1 PAM shield"},
                                            "chr19:10352442:G>C_TYK2_rs34536443_P1104A_challenger": {"variant_id": "chr19:10352442:G>C", "verification_status": "verified against the private receipt", "evidence_class": "LIVE_VERIFIED_BY_PRIVATE_API_RECEIPT_9_EDITS_PLUS_50_ROW_SAMPLE", "top_modality": "AlphaMissense", "role": "TYK2 rs34536443 P1104A catalytic hypomorph challenger"},
                                        },
                                    },
                                    "scientific_rationale": (
                                        "Eliminates the intact AsCas12a 5'-TTTC-3' PAM + 15-nt seed retained at the 3' end of B2M_HA_L_600bp "
                                        "post-HDR using 4 synonymous human signal-peptide codon changes (0-bp length change, 100% amino-acid identity; "
                                        "pure S3-only donor SHA-256 separated from the pure EEF1A1 5'TOP donor and combined S3+5'TOP donor for unconfounded single-variable Stage-0 attribution, "
                                        "and bundled with the CXCL10_HA_R_600bp_minus nt 17 [donor nt 3507/3216] and AAVS1_HA_R_600bp_minus nt 14 [donor nt 2871/3462] PAM shields as an unconditional 3-locus recut-immunity default; "
                                        "AUDIT-REF, Q1-P7, AUDIT-REF, AUDIT-REF, S55R2-D2-02 & AUDIT-REF)."
                                    ),
                                },
                                "Locus3_ScarFree_Dual_Promoter_SERPINB9_PDL1_challenger_astra_r1": {
                                    "donor_length_bp": len(dxl3_spaced_3799),
                                    "packaged_aav6_length_with_2x145bp_itrs_bp": len(dxl3_spaced_3799) + 290,
                                    "aav6_4700bp_headroom_bp": 4700 - (len(dxl3_spaced_3799) + 290),
                                    "assembled_3799bp_spaced_donor_sha256": sha256_str(dxl3_spaced_3799),
                                    "assembled_3799bp_spaced_donor_sequence": dxl3_spaced_3799,
                                    "inter_unit_pause_spacer_82bp_sequence": dxl3_pause_spacer_82bp,
                                    "inter_unit_pause_spacer_82bp_sha256": sha256_str(dxl3_pause_spacer_82bp),
                                    "canonical_unspaced_part_sum_donor_length_bp": len(dxl3_unspaced_3717),
                                    "canonical_unspaced_packaged_aav6_length_bp": len(dxl3_unspaced_3717) + 290,
                                    "canonical_unspaced_donor_sha256": sha256_str(dxl3_unspaced_3717),
                                    "canonical_unspaced_donor_sequence": dxl3_unspaced_3717,
                                    "max_disjoint_inverted_repeat_stem_unspaced_3717bp_bp": _max_disjoint_inverted_repeat_stem_bp(dxl3_unspaced_3717),
                                    "inter_unit_pause_spacer_length_bp": len(dxl3_pause_spacer_82bp),
                                    "max_disjoint_inverted_repeat_stem_3799bp_bp": _max_disjoint_inverted_repeat_stem_bp(dxl3_spaced_3799),
                                    "part_sum_reconciliation_note_muse_r1": (