Skip to content

About

Reproducible computational genomics pipeline and benchmark datasets for The Structural Error Threshold

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Analysis Pipeline and Benchmark Datasets for: The Structural Error Threshold

DOI

Reproducible computational genomics pipeline, statistical models, and benchmark datasets accompanying the manuscript:

The Structural Error Threshold: How Replication-Fork Geometry and Multimer Stoichiometry Constrain the Exon Architecture of Biological Materials

Author: Manas Desai (Independent Researcher, Woodbridge Township, NJ, USA)
ORCID: 0009-0001-3700-2056 · Email: desaimanas12@gmail.com
Repository: https://github.com/desaimanas12/structural-error-threshold
Zenodo Concept DOI: 10.5281/zenodo.24742797
Release: v1.0.2 (2026-12-02) · License: MIT


Overview

Repetitive structural proteins exhibit sharply divergent exon architectures across metazoan lineages, ranging from quantized 54 bp micro-exons in fibrillar collagens to >10 kb single coding exons in fibroins, mucins, and epidermal barrier proteins. This repository implements the biophysical, sequence-alignment, and population-genetic pipeline testing a two-channel structural instability and stoichiometric poisoning framework: how intra-exonic G-quadruplex (G4) stall avoidance ($\Psi_{\text{micro}}$), lagging-strand Okazaki initiation-zone ssDNA exposure ($\Phi_{\text{fork}}$, $L_c \approx 180\text{ bp}$), and dominant-negative multimer poisoning ($P_{\text{poison}}[M, m] = 1 - 2^{-m}$ for $M \ge 2$; $0$ for $M = 1$) jointly partition exon architectures across 202,265 human GRCh38 MANE Select v1.4 exons (19,276 canonical transcripts) and 13 cross-kingdom structural protein loci.

Key analytical components include:

  1. Genome-wide MANE Select v1.4 & CpG initiation-zone proximity (202,265 exons intersected against 27,949 primary-chromosome UCSC cpgIslandExt initiation zones and gnomAD v4.1 selective constraint metrics, with partial Spearman rank-residualization controls).
  2. Exact global CpG-count-conserving synonymous codon null model (Null C2) via log-space dynamic-programming partition functions (seed = 2026, 10,000 Monte Carlo trials) quantifying non-overlapping 25 nt G4Hunter (|S| >= 1.50) stall elimination across fibrillar and network-forming collagens, alongside 128 adjacent helical exon-pair (d_intron) inter-exonic homology and 20-bp MEPS-width boundary tests.
  3. Exhaustive 1-bp prefix-sum lag autocorrelation, contiguous 20-bp MEPS seed, and Smith-Waterman gapped self-alignment audits across all 3,000 human MANE Select v1.4 giant coding exons (CDS > 1,000 bp), accompanied by a 5 x 5 $(L_c, I_{\text{MEPS}})$ threshold sensitivity grid, gnomAD v4.1 lof.oe / LOEUF / MOEUF sensitivity tests, continuous repeat-unit scaling ($L_{\text{unit}}$ vs. LOEUF) visualization across $L_c = 180\text{ bp}$, and HGNC paralog-family deduplication.

System Requirements & Environment Setup

  • Python >= 3.12 with uv for deterministic dependency locking (uv.lock).
  • bedtools (>= 2.31) for genome-wide nearest-feature genomic interval calculation in scripts/02_ingest_genome_wide.py (invoked natively on Linux/macOS or via WSL Ubuntu Bioconda on Windows).
  • Quarto (>= 1.5) + LuaLaTeX (tinytex) for compiling manuscript/paper.qmd.

Install the locked Python environment from the repository root:

uv sync

External Reference Data Configuration (STRUCTURAL_SHARED_DATA)

Large public reference archives (MANE*, gnomad*, *.parquet, *.bed, and cached GenBank records) are excluded from Git/Zenodo via .gitignore and resolved portably via the STRUCTURAL_SHARED_DATA environment variable, falling back automatically to ./data/raw/ if STRUCTURAL_SHARED_DATA is unset or does not exist:

# Linux / macOS
export STRUCTURAL_SHARED_DATA="/path/to/shared_reference_data"

# Windows PowerShell
$env:STRUCTURAL_SHARED_DATA = "C:\Research\99_SHARED_DATA"

Scripts resolve the following public GRCh38 / RefSeq reference files from either structured subdirectories (genomes_GRCh38/ and gnomad_and_variants/) or a flat ./data/raw/ directory (downloading automatically on first run if missing and network access is enabled):

Reference Dataset Filename Official Source
NCBI / EMBL-EBI MANE Select v1.4 GFF3 MANE.GRCh38.v1.4.ensembl_genomic.gff.gz https://ftp.ncbi.nlm.nih.gov/refseq/MANE/MANE_human/release_1.4/
NCBI / EMBL-EBI MANE Select v1.4 mRNA FASTA MANE.GRCh38.v1.4.ensembl_rna.fna.gz https://ftp.ncbi.nlm.nih.gov/refseq/MANE/MANE_human/release_1.4/
UCSC hg38 CpG Islands (cpgIslandExt) hg38_cpgIslandExt.txt.gz https://hgdownload.soe.ucsc.edu/goldenPath/hg38/database/cpgIslandExt.txt.gz
gnomAD v4.1 Transcript Constraint Metrics gnomad.v4.1.constraint_metrics.tsv https://storage.googleapis.com/gcp-public-data--gnomad/release/4.1/constraint/
13-Locus RefSeq / GenBank Sequence Cache ./data/genbank_cache/*.gb Fetched automatically via NCBI Entrez on first run and reused automatically from local cache

Deterministic Reproduction Pipeline

All stochastic simulations use fixed seed seed = 2026 (10,000 trials). Run the pipeline scripts sequentially from the repository root:

# 0. (Optional) Live REST/GraphQL endpoint schema preflight check (Ensembl, UCSC, gnomAD)
uv run python scripts/01_preflight_endpoints.py

# 1. Ingest GRCh38 MANE Select v1.4 exons & compute nearest CpG initiation-zone distances
uv run python scripts/02_ingest_genome_wide.py

# 2. Join gnomAD v4.1 constraint metrics, run partial Spearman controls & render Figure 1
uv run python scripts/03_constraint_and_fork_geometry.py

# 3. Validate 13 cross-kingdom loci & run Exact CpG-Conserving Null C2 benchmark (seed = 2026)
uv run python scripts/fetch_and_validate_13_loci.py

# 4. Run exact 1-bp lag autocorrelation audit on all 3,000 MANE v1.4 giant coding exons & render Figure 4
uv run python scripts/audit_mane_giant_cds_exons.py

# 5. Render two-panel Figure 5 (whole-exome giant-exon constraint & continuous L_unit scaling transition)
uv run python scripts/05_plot_giant_exon_regime_transition.py

# 6. Render manuscript (Quarto + LuaLaTeX; inline Figures 2 & 3 are generated from data/table1_*.csv & data/table2_*.csv)
uv run quarto render manuscript/paper.qmd

# 7. Execute 7-part mathematical, alignment, gnomAD v4.1, 5x5 sensitivity & compiled PDF glyph verification suite
uv run python scripts/04_sensitivity_and_robustness_checks.py

(Note: scripts/04_sensitivity_and_robustness_checks.py is strictly read-only on data/, figures/, and manuscript/; Checks 1–6 verify all sequence, null-model, and population-genetic datasets directly, while Check 7 programmatically audits embedded glyph streams and delimiter balance in manuscript/paper.pdf rendered by Step 6.)


Repository Layout & Tracked Benchmark Datasets

structural-error-threshold/
├── scripts/
│   ├── 01_preflight_endpoints.py                 # Live Ensembl / UCSC / gnomAD schema preflight check
│   ├── 02_ingest_genome_wide.py                  # MANE v1.4 exon parsing & bedtools CpG distance calculation
│   ├── 03_constraint_and_fork_geometry.py        # Genome-wide constraint join, partial Spearman & Figure 1
│   ├── fetch_and_validate_13_loci.py             # 13-locus validator & Exact CpG Null C2 DP sampler (Table 1 & 2)
│   ├── audit_mane_giant_cds_exons.py             # Exhaustive 1-bp periodicity scan of 3,000 giant CDS exons & Figure 4
│   ├── 05_plot_giant_exon_regime_transition.py   # Two-panel Figure 5 regime constraint & L_unit scaling transition
│   └── 04_sensitivity_and_robustness_checks.py   # 7-part sensitivity, Smith-Waterman, 5x5 grid & PDF glyph audit suite
├── data/
│   ├── table1_codon_g4_benchmark.{csv,json}      # Collagen synonymous codon & Exact CpG Null C2 G4 benchmark
│   ├── table2_13_loci_phase_diagram.{csv,json}   # 13 cross-kingdom structural loci stoichiometry & homology table
│   ├── validation_summary.json                   # Summary metadata (v1.0.2) for 13-locus sequence validation
│   ├── mane_v14_giant_cds_audit.csv              # All 3,000 human MANE v1.4 coding exons with pure CDS > 1,000 bp
│   └── mane_v14_high_identity_hits.csv           # All 543 Class B & Class C high-identity giant coding exons
├── figures/
│   ├── README.md                                 # Figure manifest and generating script index
│   ├── fig1_structural_error_threshold.{pdf,png} # Figure 1: Genome-wide exon size & CpG initiation-zone constraint
│   ├── fig_mane_cds_quantization_clean.{pdf,png} # Figure 4: Pure CDS exon-length distributions across 191,797 MANE v1.4 coding exons
│   └── fig5_giant_exon_regime_transition.{pdf,png} # Figure 5: Giant-exon regime constraint & L_unit transition across L_c = 180 bp
├── results/
│   ├── phase3_statistical_report.md              # Genome-wide constraint & partial Spearman statistical report
│   ├── 13_loci_audit_report.md                   # 13-locus sequence & biophysical audit summary
│   ├── mane_giant_cds_audit_report.md            # Summary report of MANE v1.4 giant coding exon scan
│   ├── track1_class_bc_catalog.csv               # Full 543-row biological family & domain stoichiometry catalog
│   └── sensitivity_and_robustness_audit.{md,json}# Complete outputs of all 7 methodological sensitivity & robustness checks
├── manuscript/
│   ├── paper.qmd                                 # Quarto manuscript source (LuaLaTeX PDF + HTML; inline Figs 2 & 3)
│   └── references.bib                            # BibTeX bibliography (45 entries)
├── pyproject.toml                                # Project metadata (v1.0.2) & Python >=3.12 dependencies
├── uv.lock                                       # Deterministic uv dependency lockfile
├── CITATION.cff                                  # Citation File Format (CFF 1.2.0) metadata
├── .zenodo.json                                  # Zenodo software archive metadata
└── LICENSE                                       # MIT License

Data, Code Availability & Citation

All reproducible pipeline code, statistical simulation engines, and benchmark datasets are openly available at https://github.com/desaimanas12/structural-error-threshold with release v1.0.2 permanently archived under Zenodo Concept DOI 10.5281/zenodo.24742797.

Released under the MIT License. If you use this software or benchmark datasets, please cite using CITATION.cff:

Desai, M. (2026). Analysis pipeline and benchmark datasets for: The Structural Error Threshold (Version 1.0.2) [Software]. Zenodo. https://doi.org/10.5281/zenodo.24742797

About

Reproducible computational genomics pipeline and benchmark datasets for The Structural Error Threshold

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages