Link to the Web-App: https://vcfanalysis.pythonanywhere.com/
A Flask web application for analyzing VCF (Variant Call Format) files containing genetic variants such as SNPs (Single Nucleotide Polymorphisms).
- Upload and validate VCF files (supports .vcf, .vcf.gz, and .bcf formats)
- Automatic fixing of common VCF format issues
- Comprehensive variant analysis including:
- Variant type distribution
- Chromosome distribution
- Quality score distribution
- Transition/Transversion ratio
- Population genetics metrics
- Interactive visualizations using Plotly
- Asynchronous processing of large files with job status tracking
- Python 3.8+
- pip
-
Clone this repository:
git clone https://github.com/yourusername/snp-analyzer-app.git cd snp-analyzer-app
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Start the application:
python app.py
-
Open your web browser and navigate to
http://127.0.0.1:5000/
-
Upload a VCF file:
- Click on "Choose File" and select a VCF file
- Click "Analyze File" to process the file and view results
- Alternatively, click "Validate Only" to check if the file is valid without running analysis
-
View analysis results:
- Chromosome distribution visualization
- Quality score distribution
- Variant type statistics
- Ts/Tv ratio and other metrics
- Backend: Flask (Python)
- Data Processing: cyvcf2, numpy
- Frontend: HTML, JavaScript, Tailwind CSS
- Visualization: Plotly
- File Management: Only temporary files used during processing (no persistent storage)
To contribute to this project:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin feature-name
- Submit a pull request