Skip to content

G2P Explorer: A Native iOS Framework for Residue-Level Genomics to Proteomics Visualization and Structural Variant Interpretation

Source: arXiv:2607.09838 · Published 2026-07-10 · By Arifa Akter Eva, Md Abrar Hamim, Md. Manzurul Hasan

TL;DR

This paper addresses the practical challenge of bridging genomics variation data to three-dimensional proteomics context on mobile devices. While the Genomics 2 Proteins (G2P) portal provides a dense residue-level annotation table coupled with structural models primarily targeted at desktop browsers, G2P Explorer introduces a native iOS framework that consumes the same public APIs and renders an integrated multi-module interface optimized for small touchscreens. Key contributions include faithful on-device parsing of rich 71-column TSV data, reconstruction of unavailable isoform alignments via local Needleman–Wunsch computation, a SwiftUI Canvas-based high-performance multi-track sequence renderer, and a bidirectional Swift–JavaScript bridge to embed and control the Mol* 3D viewer with AlphaFold models. The system robustly handles semi-structured free-text annotations, caches data for offline use, and provides interactive biochemical analytic views like pLDDT versus accessible surface area quadrants and Ramachandran plots.

Quantitative benchmarking on six proteins ranging from 189 to 1,863 residues showed interactive frame times from 3.1 to 16.6 ms and memory usage between 16 and 72 MB on an iPhone 13, sustaining a smooth user experience without residue binning. By rethinking the architecture rather than simply porting the desktop interface, G2P Explorer provides a mobile-native hypothesis generation and variant interpretation tool adapted to clinicians, students, and researchers working on tablets or phones without desktops.

Key findings

  • Parse latency scales linearly with protein length at approximately 53 microseconds per residue, ranging from 10.2 ms (KRAS, 189 residues) to 98.4 ms (BRCA1, 1,863 residues).
  • End-to-end cold load times over 200 Mbps WiFi range from 0.7 s (KRAS) to 2.3 s (BRCA1), dominated by network latency rather than parsing or rendering.
  • Mean SwiftUI Canvas frame times during continuous zoom and scroll remain interactive between 3.1 ms (KRAS) and 16.6 ms (BRCA1), staying within a 60 fps budget.
  • Resident memory consumption ranges from 16.4 MB to 71.8 MB across tested proteins, comfortably below iOS foreground limits.
  • On-device Needleman–Wunsch isoform alignment recovers large splice-associated length differences (e.g., 178 residues in LDLR) not accessible from the portal's programmatic API, preserving coordinate stability across modules.
  • A cascading AlphaFold model loader tries multiple versioned URLs (v6, v4, v3, v2) dynamically to ensure robust 3D structure fetching despite upstream changes.
  • Rich protein features including disulfide bonds and druggable pockets are parsed from semi-structured free text using regex parsers that omit unparseable entries rather than fabricating data, preserving data authenticity.
  • Cross-module residue selection state propagates instantly via a shared @Observable view model, enabling seamless linkage between sequence, 3D structure, variant landscape, isoform mapping, and pocket views.

Threat model

n/a — This work is not a security paper and does not consider malicious adversaries. The focus is on faithful data ingestion and rendering on constrained mobile platforms rather than adversarial resistance.

Methodology — deep read

The authors started from the need to make residue-level genomics-to-proteomics data accessible on iOS devices, addressing three user groups who rely on mobile devices rather than desktops: clinicians, students, and field researchers. Their threat model is not adversarial but focuses on data fidelity and interaction usability under constraints of mobile devices (limited memory, CPU, and screen space).

They ingested public data served through the G2P REST API, which returns tab-separated 71-column feature tables for proteins alongside associated gene-to-structure identifier mappings. These data include complex attributes such as AlphaFold pLDDT scores, accessible surface area, secondary structure, disulfide bonds, and predicted binding pockets derived from fpocket and p2rank.

A major engineering challenge was that the G2P portal’s isoform alignment API endpoint is unavailable (404 response), so they reimplemented isoform pairwise alignment locally on the device by fetching canonical and alternative isoform FASTA sequences from UniProt, then computing Needleman–Wunsch global alignment on-device with match +2, mismatch -1, gap -2 scoring. This preserves canonical coordinate anchors for downstream modules.

The application is architected in Swift 5.9 and SwiftUI for iOS 16+, with six modular views (Search, Sequence Viewer, Structure Viewer, Landscape Analysis, Isoform Mapping, Pockets Explorer). They share a single @Observable ProteinViewModel owning all parsed data arrays and selection state. Network requests are handled by an actor-isolated G2PService, parsing by a content-agnostic TSVParser, alignment by a SequenceAligner, and 3D rendering by a MolStarBridge embedding Mol* 4.9.0 in a WKWebView controlling AlphaFold models.

The sequence renderer is implemented as a SwiftUI Canvas drawing six shared-residue tracks (pLDDT, accessible surface area, secondary structure, domain features, disulfide bonds as Bézier arcs, and functional sites), using an immediate-mode filled-rectangle-per-residue-per-track approach optimized for smooth scrolling and zoom on large proteins up to ∼2,000 residues. No binning or paging is applied.

3D structures are fetched from the AlphaFold DB at EBI using dynamic version fallbacks to avoid breaking changes. Confidence bands are rendered by partitioning atoms’ B-factors encoding pLDDT scores.

Free-text cell annotations are parsed with regexes into typed records with omission on failure and explicit nil for missing data rather than zero, preserving fidelity and avoiding misleading figures.

All fetched data are cached persistently on device keyed by gene/accession to allow instant reopen and offline usage.

Performance was benchmarked on an iPhone 13 over WiFi using six proteins (KRAS to BRCA1). Cold launch times, parse latencies, interactive frame times, and resident memory were recorded. The integrated test workflow exercises cross-module linked residue selection, isoform mapping, druggable pocket visualization, and structural rendering through touch-driven user gestures.

The full system is open source, with no third party Swift dependencies beyond embedding the Mol* JavaScript bundle via WKWebView from a CDN. The LDLR protein dataset is bundled locally for offline demonstration.

One example workflow: A user searches LDLR; concurrent G2P and mapping endpoints return TSV features and isoforms. The TSVParser processes 71 columns without loss. Isoform FASTA sequences are fetched from UniProt; Needleman–Wunsch runs on device to align canonical and isoforms, producing residue mappings. The Sequence module renders six annotation lanes with smooth zoom and scroll. A tap on a residue focuses it in the Mol* Structure module, triggering Swift to call JavaScript to highlight the residue in 3D with pLDDT confidence coloring. Free-text disulfide bonds are shown as arcs in the sequence view. Pocket cards parsed from text show druggability scores and toggle between fpocket and p2rank predictions. Cached data enable instant offline revisits.

Technical innovations

  • On-device reconstruction of unavailable isoform pairwise alignments by fetching UniProt FASTA sequences and implementing Needleman–Wunsch alignment locally, preserving stable canonical residue indexing.
  • A SwiftUI Canvas immediate-mode multi-track sequence renderer optimized to render six residue-level biochemical annotation tracks for proteins up to ~2,000 residues with interactive frame times under 17 ms.
  • A bidirectional Swift–JavaScript bridge that controls Mol* 3D viewer embedded in a WKWebView with dynamic AlphaFold model version fallback and per-residue pLDDT confidence rendering from mmCIF B-factor fields.
  • Fault-tolerant parsing of complex 71-column TSV annotations including semi-structured free text with explicit nil lifting to distinguish missing data from zeros, preventing silent data fabrication.

Datasets

  • LDLR sample protein data — approximately 347 KB TSV — bundled offline with the app
  • Six benchmark proteins spanning 189 to 1,863 residues (KRAS, TP53, LDLR, DNMT3A, MORC2, BRCA1) — public G2P REST API / UniProt / AlphaFold DB

Baselines vs proposed

  • Parse latency: KRAS (189 residues) 10.2 ms vs BRCA1 (1,863 residues) 98.4 ms
  • Cold load time (end-to-end): KRAS 0.7 s vs BRCA1 2.3 s on 200 Mbps WiFi
  • Canvas rendering frame time: KRAS 3.1 ms vs BRCA1 16.6 ms, within 60 fps budget
  • Resident memory: KRAS 16.4 MB vs BRCA1 71.8 MB
  • Isoform alignment API: returns HTTP 404 (unusable) vs on-device Needleman–Wunsch recovers canonical coordinate alignment (e.g. LDLR 178 residue gap)

Figures from the paper

Figures are reproduced from the source paper for academic discussion. Original copyright: the paper authors. See arXiv:2607.09838.

Fig 1

Fig 1: G2P Explorer system architecture. Six SwiftUI modules (Search, Sequence Viewer, Structure Viewer,

Fig 3

Fig 3: Cross module residue linking through the shared view model. Every module both reads and writes the

Fig 5

Fig 5: Embedded Mol viewer driven from Swift. The Structure module hosts Mol* 4.9.0 inside a WKWebView;*

Fig 6

Fig 6: Variant landscape dashboard for LDLR. (a) Summary cards report secondary structure composition,

Fig 7

Fig 7: Pairwise isoform alignment reconstructed on device. Left: the Isoform module lists the five LDLR isoforms

Fig 8

Fig 8: Druggable pocket explorer. Left: fpocket and p2rank predictions parsed from the seventy one column

Fig 9

Fig 9: Three engineering challenges in bringing an aggregating web service to the phone. (a) The documented

Fig 10

Fig 10: Quantitative performance across six benchmark proteins. (a) Parse latency scales near linearly with

Limitations

  • The application targets iOS 16+ and Apple devices only; no Android or cross-platform support is discussed.
  • Limited to proteins up to approximately 2,000 residues; performance and usability on larger proteins untested.
  • Structural rendering leverages Mol*’s desktop-oriented layout reduced for phones but lacks advanced 3D interaction features users may expect on desktop.
  • No formal user study or usability evaluation reported, so practical benefits to clinicians or researchers remain qualitative.
  • No adversarial robustness testing or security analysis since this is a visualization tool without authentication.
  • Dependent on third-party data sources (G2P API, UniProt, AlphaFold DB) which may change or become unavailable causing failures.

Open questions / follow-ons

  • Could the on-device alignment approach be extended to handle multi-isoform or transcriptomic complexity beyond pairwise alignments?
  • How can user interaction and 3D visualization ergonomics be further optimized for small touchscreens and mobile use cases?
  • What is the impact of delivering this tool in clinical or educational settings on interpretation accuracy and speed?
  • Can the framework be generalized to other platforms (Android, web PWA) or enriched with real-time variant effect predictors?

Why it matters for bot defense

While this work targets bioinformatics visualization rather than bot defense, the engineering strategies have parallels relevant to bot-detection practitioners. The authors handle complex, semi-structured data ingestion robustly and build a fluid interactive experience on resource-limited mobile devices by optimizing parsing, rendering, and cross-language communication. Similarly, CAPTCHA or bot defense systems embedding rich client-side visualizations could adopt such fault-tolerant parsing, incremental rendering, and modular cross-module state sharing to support responsive, resource-efficient mobile deployments. The explicit treatment of incomplete or irregular data without silent failure is also instructive for security sensitive data pipelines. From a usability standpoint, the rethinking of interaction grammars away from desktop-centric metaphors toward mobile-appropriate idioms offers insight for designing CAPTCHA challenges optimized for touch. However, there is no direct applicability to adversarial threat models or bot detection algorithms here.

Cite

bibtex
@article{arxiv2607_09838,
  title={ G2P Explorer: A Native iOS Framework for Residue-Level Genomics to Proteomics Visualization and Structural Variant Interpretation },
  author={ Arifa Akter Eva and Md Abrar Hamim and Md. Manzurul Hasan },
  journal={arXiv preprint arXiv:2607.09838},
  year={ 2026 },
  url={https://arxiv.org/abs/2607.09838}
}

Read the full paper

Articles are CC BY 4.0 — feel free to quote with attribution