Menu ▾ ▴

GenBankVault

Bryan P White

Documentation Guides: Scientific Methods • User Guide

GenBankVault (crvscience-genbank-vault v1.1.0)

Safe-Rust native NCBI 5-type gated downloader, accession-list batch importer, Download-to-Set organizer, circular/linear genome & chromosome/ortholog viewer, region sequence exporter, and offline SQLite WAL sync vault.

Documentation Guides

  • [[Architecture & Validation|Architecture-and-Validation]]
  • [[Scientific Methods|Scientific-Methods]] (docs/SCIENTIFIC_METHODS.md)
  • [[User Guide|User-Guide]] (docs/USER_GUIDE.md)

Clone Commands

# GitHub
git clone https://github.com/bpwhite/crvscience-genbank-vault.git

# Codeberg
git clone https://codeberg.org/crvscience/crvscience-genbank-vault.git

# GitLab
git clone https://gitlab.com/bpcwhite/crvscience-genbank-vault.git

# SourceForge
git clone https://git.code.sf.net/p/crv-science-apps/code -b crvscience-genbank-vault

Documentation Overview

GenBankVault (ncbi-genome-vault)

Safe-Rust NCBI 5-Gate Genomic Downloader, Batch Accession-List Organizer, SQLite WAL Vault & Interactive Multi-Scale Genome Viewer

License: GPL v3+
Rust Safe Code
DOI

GenBankVault Workbench

GenBankVault (ncbi-genome-vault v1.1.0) is a standalone, native Rust (eframe/egui 0.31 + wgpu 24.0 + rusqlite 0.33 + ureq 2.12) bioinformatics workstation for querying NCBI Entrez & Datasets v2 across 5 mutually gated biological data modalities, staging multi-select search results or batch accession lists directly into named SQLite Sets, exporting clean Multi-FASTA datasets, and inspecting chromosomes, circular replicons, nucleotide loci, and protein hydropathy architectures interactively.


5-Gate Biological Architecture

Every query and accession in GenBankVault routes through an explicit modality gate so viral, mitochondrial, plasmid, chromosomal, transcript, and protein records render in the exact scientific coordinate system required:

Shortcut Gate (NcbiDataType) Upstream NCBI Endpoint Interactive Viewer Mode Canonical Seed Examples
1 Nucleotide Entrez nuccore (gbwithparts) Linear Nucleotide & 3-Frame Track + Window GC% NC_012920.1_COX1, NM_000546.6 (TP53)
2 Protein Entrez protein (gp / GenPept) Protein Domain, Site Pins & Kyte-Doolittle (+1.6 TM) YP_003024028.1 (COX1), NP_000537.3 (p53)
3 Circular Genome nuccore (circular[Topology]) / Datasets v2 Concentric Circular Genome, 0 bp / ori & GC-Skew Ring NC_012920.1 (rCRS), NC_000909.1, NC_013967.1
4 Linear Chromosome datasets_genome + nuccore (slen-clamped) Chromosome Ideogram & Dynamic Ortholog Synteny Map NC_000001.11 (GRCh38.p14 Chr 1)
5 Linear Genome NCBI Datasets v2 (assembly + sequence_reports) Multi-Chromosome Karyotype Map (GC% & Centromeres) GCF_000001405.40 (Human), GCF_000146045.2 (Yeast)

Key Capabilities & Scientific Accuracy

  • Non-Blocking Async NCBI Network Pipeline: Live Search & Stage, Download Selected to Set, Sync Queue Now, and Fetch Live Region (efetch seq_start/seq_stop) run on background worker threads over mpsc::channel with live progress bars and one-click Cancel so the 60 FPS GUI never freezes.
  • Full SQLite WAL Vault & Set CRUD: Instant 0 ms seeded offline startup across 10 reference records and 2 Sets ("Homo sapiens COX1", "Archaea Reference Replicons"), plus interactive Rename Set, Delete Set, Remove Member from Set (-Set), Delete Record (Del), portable OfflineVaultBundle JSON Export/Import, and runtime NCBI_API_KEY switching (3 req/s anonymous -> 10 req/s authenticated).
  • GenBank & GFF3 Parser Integrity:
  • Multi-line DEFINITION continuation parsing and wrapped multi-line join(...) / complement(join(...)) exon interval preservation (AnnotationFeature::exons).
  • source feature db_xref="taxon:<id>" extraction across mid-file, pre-ORIGIN, and EOF boundary cases without polluting biological annotations.
  • Automated circular replicon accession detection for RefSeq NZ_CP* and INSDC CP[0-9]* accessions alongside mitochondrial/archaeal/phage baselines.
  • Genetic Codes (Table 1 & Table 2): 3-frame protein translation (+1, +2, +3) via translate_dna_frame_with_table supporting both GeneticCode::Standard (Table 1) and GeneticCode::VertebrateMitochondrial (Table 2: ATA -> M, TGA -> W, AGA/AGG -> *).
  • Circular Origin-Wrap, Reverse-Strand & GFF3 Accuracy:
  • ExportFormat::GenBankSlice accurately remaps both circular origin-wrapping slices (start > end, merging features across the N -> 1 seam) and Strand::Reverse slices (pos' = L - pos + 1, inverting feature strands and exon order).
  • ExportFormat::Gff3 aligns ##sequence-region and ##FASTA sequence headers identically to GFF3 column 1 (seqid).
  • build_multifasta_report preserves ambig_count == 0 and gc_percent == None for uncached metadata-only records (rec.sequence.is_empty()) without injecting synthetic NNNNNNNNNN bases into QA counts.
  • Dynamic Chromosome & Viewer Fidelity:
  • LinearChromosome live fetches clamp seq_start..seq_stop against upstream NCBI Entrez slen lengths; unknown centromere coordinates from Datasets v2 remain None instead of fabricated midpoints (length / 2).
  • Nucleotide GC% traces align strictly with the active [win_s..win_e] zoom window with 0% / 50% / 100% grid ticks; circular maps add directional 3' arrowheads, kb rulers, 0 bp / ori marks, ring legends, and radial label deconfliction; karyotype pins center dynamically on chromosome bars; protein views add pin labels and the +1.6 Kyte-Doolittle transmembrane (TM) threshold line.

Interactive Controls & Keyboard Shortcuts

Text-editing boxes and modal dialogs guard all global single-key shortcuts via !ctx.wants_keyboard_input().

Control / Key Action Scope
Ctrl+F Focus the NCBI search bar Main Window (modals closed)
1 – 5 Switch active modality gate (Nucleotide -> Linear Genome) & jump to matching cached record Single Record Viewer
M Toggle between Single Record Viewer and Set Multi-FASTA View Main Workspace
+ / = Zoom in (1.45x, up to 250x) Record Viewer Canvas
- Zoom out (1 / 1.45x, down to 1.0x) Record Viewer Canvas
0 Reset zoom (1.0x), pan (0.5), and circular rotation (-pi/2) Record Viewer Canvas
Mouse Wheel Smooth zoom centered on current locus window Record Viewer Canvas
Left Drag Pan linear genome/chromosome/nucleotide/protein window or rotate circular ring Record Viewer Canvas
Left Click Select gene, exon group, cytoband, ortholog ribbon, chromosome bar, or site pin into Inspector Record Viewer Canvas
Hover Live coordinate crosshair & entity telemetry tooltip (bp/aa, GC%, KD score, feature bounds) Record Viewer Canvas
F1 / Esc Toggle About / Close open modal dialogs Global

CLI Usage & Flags

Global options apply before subcommands:

Global Flag Default Description
--vault-db <PATH> OS local app data genbank_vault.sqlite3 Custom path to SQLite WAL database
--api-key <KEY> NCBI_API_KEY env var (optional) NCBI Entrez / Datasets v2 API key (10 req/s vs 3 req/s)
--headless-screenshot <PATH> (none) Render a 1600x1000 offscreen wgpu PNG and exit
--screenshot-view <1\|2\|3> 1 Headless preset: 1 Linear Chr 1, 2 Circular rCRS Mitogenome, 3 Set Multi-FASTA

Subcommands

# Launch native eframe/wgpu workstation
ncbi-genome-vault gui

# Gated natural-language search (offline or live) & Download All into a named Set
ncbi-genome-vault search "homo sapiens COX1" --offline --download-all --to-set "Homo sapiens COX1"

# Batch import an accession list (.txt / .csv / .tsv) into a Set
ncbi-genome-vault import-list sample_cox1_accessions.txt --set "COX1 Panel" --offline

# List Sets or export a wrapped / filtered Set Multi-FASTA
ncbi-genome-vault sets
ncbi-genome-vault sets --export-fasta "Homo sapiens COX1" --output cox1.fasta --wrap 60 --header-style accession --alphabet nucleotide

# Direct gated accession fetch pinned to SQLite
ncbi-genome-vault download NC_012920.1 --gate circular-genome --to-set "Mitogenomes"

# Extract FASTA, GenBank Slice, or GFF3 region (supports circular origin wrap & reverse complement)
ncbi-genome-vault export-region NC_012920.1 --start 16550 --end 20 --format genbank --reverse-complement

# Process offline sync queue and/or import/export portable OfflineVaultBundle JSON
ncbi-genome-vault sync --export-bundle vault_backup.json

Build & Verification

Run Cargo with bounded build parallelism:

$env:CARGO_BUILD_JOBS='4'
cargo test --all-targets

Observed Validation Metrics (v1.1.0)

  • Test Suite (cargo test --all-targets): 12 passed; 0 failed (tests/integration_tests.rs: 12 integration tests covering 5-gate routing, accession parsing, multi-line GenBank & GFF3 parsing, GeneticCode::VertebrateMitochondrial Table 2 translation ATGATATGATAA -> MMW*, NZ_CP/CP circular gate inference, circular origin-wrap + reverse-strand GenBankSlice coordinate flipping, GFF3 ##FASTA seqid alignment, empty-sequence Multi-FASTA zero ambig_count, ESearch OR grouping parentheses, chromosome fetch window clamping, and full SQLite Set/Record CRUD).
  • Safety Posture: #![forbid(unsafe_code)] enforced across library (src/lib.rs, all 9 library modules) and integration tests (tests/integration_tests.rs); #![deny(unsafe_code)] in src/main.rs with a single scoped #[allow(unsafe_code)] for Windows parent-console attachment on CLI invocations.
  • Provenance & Checksums: Every cached VaultRecord tracks canonical NCBI/UniProt URLs and a SHA-256 digest over (accession, sequence, annotation_count).

Citation & License

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software or its validation telemetry, please cite both the software repository and the CRV Science Public Apps Network."
type: software
title: "GenBankVault: Safe-Rust NCBI 5-Gate Downloader, Batch Accession-List Organizer & Genome Viewer"
version: "1.1.0"
date-released: "2026-11-22"
doi: "10.5281/zenodo.24451850"
url: "https://crvscience.com/apps"
repository-code: "https://github.com/bpwhite/crvscience-genbank-vault"
license: "GPL-3.0-or-later"
authors:

  - family-names: "White"
    given-names: "Bryan P."
    affiliation: "CRV Science Labs"
    orcid: "https://orcid.org/0000-0003-4191-3511"
keywords:
  - "bioinformatics"
  - "NCBI"
  - "GenBank"
  - "Multi-FASTA"
  - "SQLite WAL"
  - "Rust"
preferred-citation:
  type: article
  title: "GenBankVault: Safe-Rust NCBI Five-Gate Genomic Downloader, Multi-FASTA Set Organizer, and Offline SQLite Synchronization Workstation"
  authors:
    - family-names: "White"
      given-names: "Bryan P."
      affiliation: "CRV Science Labs"
      orcid: "https://orcid.org/0000-0003-4191-3511"
  year: 2026
  journal: "CRV Science Apps Preprints"
  doi: "10.5281/zenodo.24451850"
  url: "https://crvscience.com/apps/preprints/genbank-vault-ncbi-5gate-multifasta"
  notes: "Preprint ID: APP-PREPRINT-24"
references:
  - type: article
    title: "The CRV Science App Network: Twenty-Three Open-Source Rust Programs for Science, Data, and Simulation"
    authors:
      - family-names: "White"
        given-names: "Bryan P."
        affiliation: "CRV Science Labs"
        orcid: "https://orcid.org/0000-0003-4191-3511"
    year: 2026
    journal: "CRV Science Apps Preprints"
    doi: "10.5281/zenodo.24222398"
    url: "https://crvscience.com/apps/preprints/crv-science-public-apps-network"
    notes: "Preprint ID: APP-PREPRINT-01 (CRV Science Open-Source Apps Network Overview)"

GenBankVault — Architecture, Modules & Validation

Version: 1.1.0
Repository: crvscience-genbank-vault

Source Modules (src/)

  • src/exporter.rs
  • src/gui.rs
  • src/icon.rs
  • src/lib.rs
  • src/main.rs
  • src/models.rs
  • src/ncbi_client.rs
  • src/parsers.rs
  • src/query_router.rs
  • src/seed_catalog.rs
  • src/vault_sqlite.rs

Test Suites (tests/)

  • tests/integration_tests.rs

Preprints & Documentation

  • Preprint PDF: Preprints/crv-science-public-apps-network.pdf
  • Preprint PDF: Preprints/genbank-vault-ncbi-5gate-multifasta.pdf
  • Doc: docs/SCIENTIFIC_METHODS.md
  • Doc: docs/USER_GUIDE.md

Standard Build & Test

cargo test --release

Related

Wiki: GenBankVault_Scientific_Methods
Wiki: GenBankVault_User_Guide
Wiki: Home