Getting Started#
Tutorials for using single-cell data with PyTorch. These materials are aimed at two groups: machine learning practitioners new to genomics, and genomics researchers wanting to use deep learning.
Tutorials#
Tutorial |
Audience |
Duration |
Open in Colab |
What it covers |
|---|---|---|---|---|
ML practitioners new to single-cell data |
30-45 min |
What scRNA-seq data is and how it differs from typical ML datasets |
||
Genomics researchers new to ML |
45-60 min |
PyTorch basics explained using genomics examples |
||
All participants |
45-60 min |
Use AnnData’s |
||
Participants interested in sample-level prediction |
30-45 min |
Model patient-level cell populations with PyTorch datasets and |
Suggested workshop flow: Choose the primer for the domain that is less familiar to you. In a mixed workshop, participants can work through the two primers in parallel, then regroup for Single-cell data in PyTorch. Continue with Patient-level learning as an optional advanced tutorial.
Local installation#
Google Colab requires no local setup. To run the tutorials locally on macOS or Linux:
git clone https://github.com/DaminK/AnnData_Pytorch_Tutorials.git
cd AnnData_Pytorch_Tutorials
python -m venv .venv && .venv/bin/python -m pip install -r requirements.txt
.venv/bin/python -m jupyter lab
The third line creates the virtual environment and installs the dependencies
into it in one shell command. Activation is not required. On Windows, replace
.venv/bin/python with .venv\Scripts\python.exe.
What you’ll learn#
These tutorials show you how to:
Load scRNA-seq data with Scanpy and inspect AnnData objects
Build supervised models with PyTorch
Handle sparse, high-dimensional biological data
Batch cells with AnnData’s
AnnLoaderand model patient-level data withggml-otEvaluate classification and regression workflows
The tutorials include notes explaining genomics concepts for ML practitioners and ML concepts for genomics researchers.
Acknowledgments#
These tutorials use Scanpy, AnnData, PyTorch, and ggml-ot. Documentation is built with Jupyter Book.
Additional Resources#
Useful links:
AnnLoader documentation - PyTorch batches from AnnData
ggml-ot - Patient-level distribution learning
License#
This project is available under the MIT License.