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 AAPLZGraph, NDPLZGraph, and NaiveLZGraph from your data.
2. Sequence Analysis¶
Beginner · 20 minutes
Calculate sequence probabilities, explore graph structure, and generate new sequences.
3. Diversity Metrics¶
Intermediate · 15 minutes
Measure repertoire diversity using K1000, LZCentrality, and entropy metrics.
4. Visualization¶
Intermediate · 20 minutes
Create publication-ready plots for sequence and repertoire analysis.
Prerequisites¶
Before starting, ensure you have:
- Installed LZGraphs (Installation Guide)
- Basic Python and pandas knowledge
- Sample data to work with (or use our example datasets)
Sample Data¶
All tutorials use example data included with LZGraphs:
import pandas as pd
# Load example TCR repertoire
data = pd.read_csv("Examples/ExampleData1.csv")
print(data.head())
Quick Reference¶
| Tutorial | Topics Covered |
|---|---|
| Graph Construction | AAPLZGraph, NDPLZGraph, NaiveLZGraph, gene annotation |
| Sequence Analysis | walk_probability, random_walk, encode_sequence, clean_node |
| Diversity Metrics | K1000_Diversity, LZCentrality, node_entropy, edge_entropy |
| Visualization | Ancestors/descendants plots, path variability, genomic heatmaps |
Next Steps¶
After completing the tutorials:
- Explore Concepts for deeper understanding
- Check How-To Guides for specific tasks
- Browse Examples for complete notebooks