This is a small application that allows you to find matching proteins from a tiny database of nucleotide codes.
Please visit https://protein-finder-jspear.herokuapp.com/
Type a dna sequence into the text input and search away. For long-running queries the results will update every 1.5 seconds.
These are the steps to build the application on my operating system. The exact instructions may be different for your environment, but the high-level steps should be the same.
git clone [email protected]:Joboman555/ProteinFinder.git
brew install redis
pip install -r requirements.txt
4. Run the server. I created a script that runs all 3 server components together and kills them as a package.
bash start.sh
This was a really fun project. I learned and re-learned a lot of cool things. In no particular order, they were:
- Refreshing django concepts
- Polling asyncronously from a javascript frontend
- Using celery for django async tasks
- Using redis
- Passing and parsing JSON responses from get requests.
- How to configure heroku with django, celery, and postgres
If I had more time to devote to this application, here are the things that I would make better.
Current UI is very bare/minimal; I didn't even use a css file. :o
Currently the page reloads every 1.5 seconds, whether there is data that needs to be fetched or not. A better alternative is to store whether the backend is processing data, and only fetch more data while there are queries that are still running. If I did this then we could set the re-fetch time much lower than 1.5 milliseconds.
A way to improve the result speed significantly would be to add caching using something like memcache. This would make queries that have been run before, run much faster.