This project provides two interfaces:
- A CLI tool for translating DNA and finding motifs.
- A web app (FastAPI + HTML/JS) for browser-based analysis.
- DNA normalization/validation (
A,C,G,T,N) - Translation in frame
1,2, or3 - Reverse-complement option
- Optional stop-at-first-stop behavior
- Motif search with overlapping matches
- IUPAC motif ambiguity support (e.g.,
AAR,GGN)
python3 dna_translation_motif_finder.py "ATGGCCATTGTAATGGGCCGCTGAAAGGGTGCCCGATAG" --motif "GGN"--frame {1,2,3}: Select translation reading frame (default1)--reverse-complement: Analyze reverse complement instead of input sequence--stop-at-stop: Stop translation at first stop codon--motif MOTIF: Find motif and print all match positions (0-based)
If you run from Python IDLE with no command-line arguments, an interactive menu collects:
- DNA sequence
- reading frame
- reverse-complement choice
- stop-at-stop choice
- optional motif
python3 -m pip install -r requirements.txtuvicorn app:app --reloadVisit: http://127.0.0.1:8000
Use the form to submit sequence/options and view translation + motif results.
POST /api/analyze
Example JSON payload:
{
"sequence": "ATGAAATGA",
"frame": 1,
"reverse_complement": false,
"stop_at_stop": true,
"motif": "AAR"
}Example response fields:
dnaproteinmotif_positions- plus selected option flags