A modern, client-side web application for viewing and analyzing VCF (Variant Call Format) files. Built with Svelte 4 and designed to run entirely in the browser without requiring server infrastructure.
Try it now: https://yxuil.github.io/vcfview
No installation required! Just click the link above to start analyzing VCF files immediately.
- Client-side VCF Processing: Upload and analyze VCF files directly in your browser
- Multiple Loading Methods: Upload files, load from URLs, or use sample data
- Excel-like Interface: Professional data grid with sorting, filtering, and pagination
- Hierarchical Column Management: Expand/collapse INFO and sample columns for detailed analysis
- INFO Column Expansion: Toggle between compact VCF format and individual INFO field columns
- Sample Column Expansion: Toggle between FORMAT strings and separate sub-columns per sample
- Interactive Headers: Click βΆ/βΌ icons in headers to expand/collapse sections independently
- File Format Support: Handles both .vcf and .vcf.gz files (local and remote)
- Advanced Filtering: Column-specific filters with text, numeric, and range operations
- Multi-format Export: Export filtered data as VCF, CSV, or JSON
- Optimized Column Sizing: Smart initial widths with auto-sizing functionality
- Performance Optimized: Handles large datasets with virtual scrolling
- Responsive Design: Works on desktop and tablet devices
- Sample Data: Includes demonstration datasets for immediate exploration
Want to deploy your own instance immediately? Here's the fastest way:
- Click "Use this template" or Fork this repository
- Enable GitHub Pages:
- Go to Settings β Pages
- Under "Source", select "GitHub Actions"
- Wait for deployment (check the Actions tab)
- Access your app at
https://yxuil.github.io/vcfview
That's it! Your VCF viewer is now live and ready to use.
- Node.js (version 18 or higher)
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd vcfview- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:5173
To create a production build:
npm run buildThe built files will be in the build directory, ready for deployment to any static hosting service.
- Choose loading method: Select between "Upload File" or "Load from URL"
- Upload a VCF file: Click "Upload File" or drag and drop a .vcf or .vcf.gz file
- Load from URL: Enter a direct URL to a VCF file (must support CORS)
- Load sample data: Click "Load Sample Data" to explore with demonstration data
Once your data is loaded, you'll see a professional data grid with standard VCF columns:
Base Columns (always visible):
- Chromosome, Position, ID, Reference, Alternative, Quality, Filter
INFO Column Management:
- Collapsed (default): Shows INFO data in original VCF format (
AC=2;AF=1.00;AN=2) - Expanded: Click the βΆ icon in INFO header to show individual columns for each INFO field
- Collapse back: Click the βΌ icon in the expanded INFO header to return to compact format
Sample Column Management:
- Collapsed (default): Shows sample data in original FORMAT format (
1/1:0,26:26:78) - Expanded: Click the βΆ icon in any sample header to show individual FORMAT sub-columns (GT, AD, DP, etc.)
- Collapse back: Click the βΌ icon in the expanded sample header to return to compact format
- Independent control: Each sample can be expanded/collapsed separately
- Sorting: Click any column header to sort data
- Filtering: Use the filter icon in column headers for advanced filtering
- Column Resizing: Drag column borders to adjust widths
- Auto-sizing: Click "Auto-size Columns" to fit all columns to screen width
- Row Selection: Click checkboxes to select specific variants
- Pagination: Navigate through large datasets with built-in pagination
- Select data: Choose specific rows or use "Select All"
- Export format: Choose from VCF, CSV, or JSON formats
- Download: Filtered and selected data will be exported
- Export results: Select rows and export filtered data in your preferred format
Interactive Column Headers:
- π½ Expand Icons (βΆ): Indicates collapsed columns that can be expanded
- πΌ Collapse Icons (βΌ): Indicates expanded sections that can be collapsed
- Color Coding: Gray backgrounds for INFO sections, blue backgrounds for sample sections
- Hover Effects: Headers highlight on hover to show interactivity
Data Formats:
- Original VCF Format: Maintains data integrity with standard VCF field formatting
- Expanded Analysis: Individual columns allow for precise filtering and sorting of specific metrics
- Best of Both Worlds: Switch between compact view for overview and detailed view for analysis
When using the URL loading feature:
- The URL must point directly to a VCF file (.vcf or .vcf.gz)
- The server hosting the file must support CORS (Cross-Origin Resource Sharing)
- Both HTTP and HTTPS URLs are supported
- Compressed files (.vcf.gz) are automatically detected and decompressed
Example URLs:
https://example.com/data/variants.vcf
https://example.com/data/variants.vcf.gz
https://ftp.example.com/pub/genomics/sample.vcf
CORS Limitations: If you encounter CORS errors, the server doesn't allow cross-origin requests. In this case:
- Download the file manually and use the file upload feature instead
- Or use a CORS proxy service (not recommended for sensitive data)
You can load VCF files directly from GitHub repositories using the URL loading feature:
GitHub Raw URLs:
https://raw.githubusercontent.com/USERNAME/REPOSITORY/BRANCH/path/to/file.vcf
https://raw.githubusercontent.com/USERNAME/REPOSITORY/BRANCH/path/to/file.vcf.gz
jsDelivr CDN URLs (faster and more reliable):
https://cdn.jsdelivr.net/gh/USERNAME/REPOSITORY@BRANCH/path/to/file.vcf
https://cdn.jsdelivr.net/gh/USERNAME/REPOSITORY@BRANCH/path/to/file.vcf.gz
Examples:
https://raw.githubusercontent.com/johndoe/genomics-data/main/samples/variants.vcf
https://cdn.jsdelivr.net/gh/johndoe/genomics-data@main/samples/variants.vcf.gz
Tips for GitHub VCF files:
- Use jsDelivr CDN URLs for better performance and reliability
- GitHub raw files work but may be slower for large files
- Both compressed (.vcf.gz) and uncompressed (.vcf) files are supported
- Make sure your repository is public or the files are accessible
This repository includes a GitHub Actions workflow that automatically deploys to GitHub Pages:
-
Fork or clone this repository
-
Enable GitHub Pages:
- Go to your repository's Settings
- Navigate to "Pages" in the sidebar
- Under "Source", select "GitHub Actions"
-
Push to main branch:
git push origin main
-
Your app will be available at:
https://yxuil.github.io/vcfview
- The workflow automatically triggers on pushes to the
mainbranch - It builds the application using
npm run build - Deploys the
builddirectory to GitHub Pages - Your site updates automatically with each push
- 404 Error: Make sure GitHub Pages is enabled and set to "GitHub Actions"
- Build Failed: Check the Actions tab for error details
- Site not updating: Wait 1-2 minutes after pushing changes
- Permission errors: Ensure your repository has Actions enabled
Deploy the build directory to any static hosting service:
- Netlify
- Vercel
- AWS S3
- Azure Static Web Apps
- Firebase Hosting
- Frontend: Svelte 4 + SvelteKit
- UI Components: Tailwind CSS + AG-Grid Community
- Data Processing: Custom VCF parser with fflate for compression
- Export: Papa Parse for CSV, native JSON, and VCF format support
- Virtual scrolling for large datasets
- Progressive file parsing with progress indicators
- Client-side filtering and sorting
- Memory-efficient data structures
- Hierarchical column grouping with dynamic rendering
- Optimized column sizing and auto-fit algorithms
- Custom header components for interactive UI elements
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run check- Run TypeScript checks
src/
βββ lib/
β βββ components/ # Svelte components
β βββ services/ # VCF parsing and export services
β βββ stores/ # State management
β βββ types/ # TypeScript definitions
βββ routes/ # SvelteKit routes
βββ app.css # Global styles
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Run
npm run checkto ensure code quality - Submit a pull request
This project is open source and available under the MIT License.