A powerful FastAPI-based Bioinformatics API for DNA sequence analysis. The project provides nucleotide composition analysis, GC/AT content calculation, DNA-to-RNA transcription, protein translation, mutation detection, ORF detection, restriction enzyme analysis, primer design, sequence alignment, phylogenetic analysis, and automated report generation.
The API supports both single-sequence analysis and batch processing through FASTA file uploads, making it useful for bioinformatics research, education, and software development.
- DNA sequence validation
- Nucleotide composition analysis
- GC & AT content calculation
- DNA → RNA transcription
- Protein translation
- Reverse complement generation
- Mutation detection
- Mutation summary
- ORF (Open Reading Frame) detection
- Restriction enzyme site analysis
- Molecular weight calculation
- Melting temperature (Tm)
- Needleman–Wunsch sequence alignment
- Primer design
- FASTA file upload & batch analysis
- Multiple sequence comparison
- Phylogenetic distance matrix
- Newick tree generation
- JSON report generation
- PDF report generation
- Interactive Swagger API documentation
BioSequence-Analyzer-API/
│
├── constants/
│ ├── __init__.py
│ ├── codon_table.py
│ └── dna.py
│
├── features/
│ ├── alignment.py
│ ├── enzymes.py
│ ├── multiple_alignment.py
│ ├── orf.py
│ ├── phylogeny.py
│ ├── primer.py
│ └── properties.py
│
├── reports/
│ ├── report_generator.py
│ └── pdf_report.py
│
├── sample_data/
│ └── sample.fasta
│
├── analyzer.py
├── main.py
├── models.py
├── parser.py
├── requirements.txt
├── README.md
└── LICENSE
- Python 3.11+
- FastAPI
- Pydantic
- Uvicorn
- Biopython
- ReportLab
- NumPy
- Matplotlib (for future visualization)
Clone the repository:
git clone https://github.com/YOUR_USERNAME/BioSequence-Analyzer-API.gitMove into the project directory:
cd BioSequence-Analyzer-APIInstall dependencies:
pip install -r requirements.txtStart the FastAPI server using Uvicorn:
uvicorn main:app --reloadThe API will start at:
http://127.0.0.1:8000
FastAPI automatically generates interactive API documentation.
http://127.0.0.1:8000/docs
http://127.0.0.1:8000/redoc
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
API welcome message |
| POST | /analyze |
Analyze a DNA sequence |
| POST | /upload-fasta |
Upload and analyze FASTA file |
| POST | /generate-report |
Generate analysis report |
{
"sequence": "ATGCGTGAATTCGCGTAA",
"reference": "ATGCGTGAATTCGCGTAA"
}{
"sequence_analysis": {
"sequence": "ATGCGTGAATTCGCGTAA",
"length": 18,
"reverse_complement": "TTACGCGAATTCACGCAT"
},
"composition": {
"GC_content": 50.0,
"AT_content": 50.0
},
"translation": {
"protein": "MREFA"
}
}Add a screenshot of the interactive Swagger documentation.
Add a screenshot showing a successful DNA sequence analysis.
Add a screenshot of batch sequence analysis.
- 📊 DNA sequence visualization
- 📈 GC content and nucleotide composition charts
- 🗄️ Database integration (SQLite / PostgreSQL / MongoDB)
- 👤 User authentication
- 📜 Analysis history
- 🤖 Machine Learning-based mutation prediction
- 🧬 Disease classification models
- 🐳 Docker support
- ☁️ Cloud deployment
- 🌐 Public API endpoint
Contributions are welcome!
If you'd like to improve this project:
- Fork the repository.
- Create a new feature branch.
- Commit your changes.
- Open a Pull Request.
This project is licensed under the MIT License.
Muhammad Moeen Asim
Bioinformatics Student | Python Developer | FastAPI Developer


