Tutorials¶
Welcome to the LZGraphs tutorials. These step-by-step guides will help you master TCR repertoire analysis using LZGraphs.
Learning Path¶
We recommend following these tutorials in order:
1. Graph Construction¶
Beginner · 15 minutes
Learn to build AAP, NDP, and Naive graph variants from your data.
2. Sequence Analysis¶
Beginner · 20 minutes
Calculate sequence probabilities, explore graph structure, and simulate new sequences.
3. Diversity Metrics¶
Intermediate · 15 minutes
Measure repertoire complexity using k-diversity, Hill numbers, and occupancy models.
Prerequisites¶
Before starting, ensure you have:
- Installed LZGraphs (Installation Guide)
- Basic Python knowledge
- Sample data to work with (or use our example datasets)
Sample Data¶
All tutorials use example data included with LZGraphs:
import csv
# Load sample data
with open("examples/ExampleData1.csv") as f:
sequences = [row['cdr3_amino_acid'] for row in csv.DictReader(f)]
Quick Reference¶
| Tutorial | Topics Covered |
|---|---|
| Graph Construction | LZGraph variants, gene annotations, abundance weighting |
| Sequence Analysis | lzpgen, simulate, lz76_decompose |
| Diversity Metrics | k_diversity, hill_numbers, predicted_richness |
Next Steps¶
After completing the tutorials:
- Explore Concepts for deeper understanding
- Check How-To Guides for specific tasks
- Browse Examples for complete notebooks