Skip to content

dev-kvt/bio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bio - The Git of Genomics

A high-performance, unified command-line toolkit and web application for genomic file manipulation, format conversion, validation, offline annotation, and privacy-first analysis.

Written in Go with zero external C dependencies, bio handles massive 600,000+ line raw DNA files (like 23andMe and AncestryDNA) in milliseconds with zero memory bloat.


Overview

The bio ecosystem consists of two core components:

  1. bio CLI (Primary Component): A single executable written in Go that unifies common genomic workflows—converting raw text to VCF v4.2, validating structural integrity, performing offline ClinVar annotations, filtering by chromosome, searching RSIDs, and anonymizing forensic markers.
  2. Web Portal: A React and Vite web interface hosted on Vercel offering direct binary downloads and documentation for the bio toolkit.

Architecture and System Design

Processing raw genome exports (15-20MB, 600,000+ rows) efficiently requires stream-based execution patterns on the command line.

[ Input File (23andMe / VCF) ]
             │
             ▼
[ Go bufio.Scanner Stream Engine ] (O(1) Memory Usage)
             │
   ┌─────────┼──────────┬──────────┬──────────┬──────────┐
   ▼         ▼          ▼          ▼          ▼          ▼
convert   validate    stats    annotate    search     filter / anonymize
   │         │          │          │          │          │
   ▼         ▼          ▼          ▼          ▼          ▼
VCF v4.2  Lint Pass  Summary   ClinVar DB  RSID Match  Cleaned Output

CLI Engine Details

  • Stream-Based Parsing: Uses Go's bufio.Scanner paired with a callback pattern. Files are processed line-by-line without loading the entire payload into RAM.
  • Pure Go SQLite Integration: Utilizes modernc.org/sqlite for offline annotation lookups without requiring CGO or native toolchain dependencies.
  • Cross-Platform Static Compilation: Compiles to standalone binaries for macOS (ARM64/AMD64), Linux (AMD64), and Windows (AMD64).

CLI Features and Usage

Quick Start

Build from source:

cd cli
go build -o bio main.go
./bio

Or download pre-compiled binaries directly from the web interface at /download.

Commands Reference

1. Format Conversion (convert)

Streams raw consumer DNA text files into standard VCF v4.2 format.

bio convert 23andme.txt output.vcf

2. Format Validation (validate)

Performs structural and integrity checks on genomic files, detecting missing RSIDs, malformed positions, and duplicate entries.

bio validate 23andme.txt

3. Quick Statistics (stats)

Aggregates total variant counts and unique chromosome counts instantly.

bio stats 23andme.txt

4. Offline Clinical Annotation (annotate)

Queries a local SQLite database of ClinVar variants to append clinical significance (e.g., Pathogenic, Benign) and disease associations into the VCF INFO column offline.

bio annotate 23andme.txt annotated.vcf

5. Fast Variant Search (search)

Locates a specific RSID in milliseconds and outputs its exact genotype and genomic location.

bio search 23andme.txt rs429358

6. Chromosome Filtering (filter)

Outputs a subset file containing only variants from a specified chromosome.

bio filter 23andme.txt filtered.txt --chr 19

7. Forensic Anonymization (anonymize)

Removes personal headers and strips core kinship and forensic markers (e.g., CODIS loci), generating a dataset safe for public sharing.

bio anonymize 23andme.txt anonymous.txt

Monorepo Structure

GenomeUpload/
├── cli/                 # Go CLI source code and build pipeline
│   ├── cmd/             # Cobra command implementations (convert, validate, etc.)
│   ├── pkg/             # Parser engine and SQLite database driver
│   ├── build.sh         # Cross-compilation script for Darwin, Linux, Windows
│   └── README.md        # CLI-specific documentation
├── client/              # React + Vite frontend application
│   ├── src/             # Landing page and Download components
│   └── public/downloads # Compiled static CLI binaries served on Vercel
├── src/                 # Express backend API
├── api/                 # Vercel Serverless Functions
└── vercel.json          # Vercel deployment configuration

Web Portal

The web interface serves as the distribution portal and documentation hub for the bio CLI binaries.

Features

  • Binary Downloads: Direct access to bio-mac-arm64, bio-linux-amd64, and bio-windows-amd64.exe.
  • Interactive Documentation: Web-based guide and syntax reference.

License

Open-source under the MIT License.

About

High-performance, unified command-line toolkit and web application for genomic file manipulation, format conversion, validation, offline annotation, and privacy-first analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages