-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature demo: web application for YASA #186
Comments
Hi @bartromb, Thanks so much for your work on this. Following up on our email conversation, I tried this on an example EDF file (not from a Somnomedics device), and it did work well in outputting the YASA-scored hypnogram and plot (see attached). yasa_example_night_young.edf_hypnogram.pdf yasa_example_night_young.edf.csv I do have a few questions for you:
Thanks again, |
Hi Raphael, Thank you for trying out the web app and for sharing your feedback. I’m glad to hear it worked well with your example EDF file and successfully generated the hypnogram and CSV outputs. To address your questions: Channel Selection and Metadata Specification Intended Use Expanding to Other YASA Functions Please let me know if you have any other suggestions or requirements. I’d be happy to adapt the app further to align with your vision for YASA's broader use cases. Best regards, |
Thanks @bartromb — great that you added the channel selection! I think we can add the link to YASA Flaskified in both the README of YASA and the FAQ. If that's okay with you, feel free to submit a PR. Thanks, |
Hi Raphaël,
Thank you! I’ve drafted this description—feel free to adjust it if needed:
**YASA Flaskified:** A web-based application leveraging the YASA library
for EEG-based sleep analysis. It provides:
- **User Authentication:** Secure login for authorized users with password
encryption.
- **File Management:** An intuitive upload system for `.edf` EEG files,
with support for multiple uploads.
- **Background Processing:** Efficient processing of EEG data using
Redis-backed workers.
- **Results Management:** Automatic generation of hypnograms (PDF) and
sleep stage data (CSV), viewable and downloadable through the app.
- **Monitoring:** Real-time status tracking of uploaded jobs.
**Easily Deployable:** YASA Flaskified includes a deployment script, making
it easy to install on local or domain-based servers, whether real or
virtual. Deployment takes just a few minutes, requiring minimal setup.
**Showcases:**
Live deployments are available at:
- [sleepai.be](http://sleepai.be)
- [sleepai.eu](http://sleepai.eu)
_User accounts for these showcases can be created on request._
### What technologies power YASA Flaskified?
YASA Flaskified is built on a robust and modern software stack to ensure
reliability and performance:
- **YASA Library:** At the core of the application, YASA (Yet Another
Spindle Algorithm) enables advanced EEG-based sleep staging and hypnogram
generation. Kudos to Raphaël Vallat, the developer of YASA, for his
significant contributions to sleep science.
- **Flask:** A lightweight Python web framework that powers the web
application, providing routing, templating, and session management.
- **Gunicorn:** A WSGI HTTP server used to serve the Flask application in
production environments with support for multiple workers and robust
request handling.
- **Redis:** A fast, in-memory data store used for managing background task
queues and caching.
- **RQ (Redis Queue):** A Python library that handles long-running
background tasks, such as processing EEG files and generating results.
- **SQLAlchemy:** A database toolkit and ORM (Object-Relational Mapper) for
managing user accounts and application data.
- **Matplotlib & Pandas:** Used for creating hypnograms and processing
sleep stage data from EEG files.
These technologies work together to provide a scalable, efficient, and
user-friendly application for EEG sleep analysis.
Explore the app and source code: [YASA Flaskified GitHub Repository](
https://github.com/bartromb/YASAFlaskified).
…On Sun, Dec 22, 2024 at 3:19 PM Raphael Vallat ***@***.***> wrote:
Thanks @bartromb <https://github.com/bartromb> — great that you added the
channel selection!
I think we can add the link to YASA Flaskified
<https://github.com/bartromb> in both the README
<https://github.com/raphaelvallat/yasa/blob/master/README.rst#how-do-i-get-started-with-yasa>
of YASA and the FAQ
<https://github.com/raphaelvallat/yasa/blob/master/docs/faq.rst#sleep-staging>.
If that's okay with you, feel free to submit a PR.
Thanks,
Raphael
—
Reply to this email directly, view it on GitHub
<#186 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BNWMDUKAHMUIYI6KBIG6HRT2G3C6BAVCNFSM6AAAAABT645A5WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJYGQ3TCOJTGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Discussed in #185
Originally posted by bartromb December 14, 2024
Hi everyone,
I’ve developed a web application that integrates the excellent yasa library into a user-friendly web platform. The application, named YASA Flaskified, is built with Flask, Gunicorn, and Nginx. I currently use it on internal servers as a quality control step after manual scoring. (I am a pulmonologist and somnologist.)
You can find it on my GitHub repository: YASA Flaskified.
I have used only Somnomedics EDF files so far, but the script attempts to automatically identify EEG channels, so I believe it is usable for other EDF files as well. It generates both a hypnogram PDF and a CSV output for further analysis. You can see a showcase on sleepai.be and sleepai.eu, though due to bandwidth constraints, only admin users can register new accounts. I can provide a test login and password upon request.
I want to thank Raphael for the fantastic yasa library—it has been incredibly useful for this project!
Contributions and feedback are more than welcome, and I’m happy to assist with any issues you encounter during deployment on a server.
Looking forward to hearing your thoughts!
Best regards,
Bart
The text was updated successfully, but these errors were encountered: