This project implements a sequence alignment application with a Python backend and a React frontend. The backend generates two identical DNA sequences with random mutations and implements the Needleman-Wunsch algorithm for sequence alignment. The frontend visualizes the sequences and allows users to control the mutation rate through a slider.
sequence-alignment-app
├── backend
│ ├── app.py # Entry point for the Flask backend
│ ├── needleman_wunsch.py # Implementation of the Needleman-Wunsch algorithm
│ ├── sequence_generator.py # Functions to generate random DNA sequences
│ ├── requirements.txt # Python dependencies for the backend
│ └── README.md # Documentation for the backend
├── frontend
│ ├── public
│ │ └── index.html # Main HTML file for the React application
│ ├── src
│ │ ├── App.js # Main component of the React application
│ │ ├── components
│ │ │ ├── SequenceVisualizer.js # Component to visualize sequences
│ │ │ └── MutationRateSlider.js # Component for controlling mutation rate
│ │ └── index.js # Entry point for the React application
│ ├── package.json # Configuration file for npm
│ └── README.md # Documentation for the frontend
└── README.md # Overview of the entire project
- Navigate to the
backenddirectory. - Install the required dependencies:
pip install -r requirements.txt - Run the Flask application:
python app.py
- Navigate to the
frontenddirectory. - Install the required dependencies:
npm install - Start the React application:
npm start
- The backend API will generate two sequences with a specified mutation rate.
- The frontend allows users to visualize the sequences and adjust the mutation rate using a slider.
- The aligned portions of the sequences will be highlighted in the visualization.