How-To Guides¶
Task-oriented guides for specific LZGraphs operations. Each guide focuses on a single task and gives you the recipe to accomplish it.
Available Guides¶
Prepare Your Data¶
Load sequences from CSV/TSV, clean input, and handle AIRR-format files
Save & Load Graphs¶
Persist graphs to disk in the fast .lzg binary format
Generate Sequences¶
Create new sequences with gene constraints, filtering, and reproducibility
Compare Repertoires¶
Measure similarity with JSD, diversity profiles, and cross-scoring
Personalize Graphs¶
Adapt a population graph to an individual using Bayesian posteriors
Distribution Analytics¶
Validate distributions, measure diversity, and predict occupancy
Graph Algebra¶
Union, intersection, difference — combine and decompose repertoires
Feature Extraction for ML¶
Extract fixed-size feature vectors for classifiers and pipelines
Quick Reference¶
| Task | Guide | Key Functions |
|---|---|---|
| Load from CSV/TSV | Data Preparation | csv.DictReader + LZGraph() |
| Save a graph | Serialization | graph.save() |
| Load a graph | Serialization | LZGraph.load() |
| Generate sequences | Sequence Generation | graph.simulate() |
| Compare repertoires | Comparison | jensen_shannon_divergence() |
| Personalize a graph | Posterior | graph.posterior() |
| Measure diversity | Distribution Analytics | graph.hill_number(), graph.predicted_richness() |
| Combine repertoires | Graph Algebra | graph \| other, graph & other, graph - other |
| ML features | Feature Extraction | ref.feature_aligned(query), graph.feature_stats() |
Need More?¶
- Step-by-step learning? See Tutorials
- Understanding the theory? See Concepts
- API details? See API Reference