This is a Flask-based web application that provides ability to search for similar .bed files (similarity is based on Jaccard index) through database.
-
Clone the repository:
git https://github.com/ppaa23/chip-seq-ppaa23.git cd your-repo -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python -m flask --app app/server.py run
-
(Optional) Run the tests:
python -m pytest
- Python 3.11+
- Flask
- Flask-SQLAlchemy
- pytest
- requests
- flasgger
All the required packages (with the appropriate versions) are stated in the requirements.txt file.
- Logging: The app uses Singleton pattern to avoid multiple instances of logger.
- Using database: The app uses SQLite database to store the .bed files which might be helpful in the future.
- API Documentation: The app uses flasgger to provide API documentation (also for the future development).
- Testing: The app uses pytest to test the application (including negative tests, e.g. 404 error).
Current version of the app is appropriate for development purposes only.
/(GET, POST) - Displays the landing page with file upload and input N fields./results(GET) - Displays the results of the search.
chip-seq-ppaa23/
│
├── app/
│ ├── instance/
│ │ └── chipseq_data.db # Database with given .bed files (helpful for future development)
│ ├── static/ # Stores basic .css style
│ ├── templates/ # Contains .html files
│ ├── __init__.py
│ ├── jaccard.py # Jaccard index calculation
│ ├── server.py # Main application file
│ └── app.log
├── bed_data/ # Hardcore storing .bed files for loading to chipseq_data.db
├── tests/
│ └── test_app.py # Tests for the application
├── README.md
└── requirements.txt
It is important to mention that given above tree doesn't contain all the files (e.g. .gitignore, pytest.ini, etc.).