SKILL.md
Version Compatibility
Reference examples tested with: MiXCR 4.6+, VDJtools 1.2.1+, ggplot2 3.5+, matplotlib 3.8+, pandas 2.2+, scanpy 1.10+, seaborn 0.13+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures - R:
packageVersion('<pkg>')then?function_nameto verify parameters - CLI:
<tool> --versionthen<tool> --helpto confirm flags
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
Repertoire Visualization
"Visualize my immune repertoire data" → Create publication-quality figures for TCR/BCR repertoires including circos plots, V(D)J gene usage heatmaps, diversity plots, and clonal tracking across samples.
- CLI:
vdjtools PlotFancyVJUsagefor circos-style V-J plots - Python:
matplotlib/seabornfor custom repertoire visualizations
Circos Plots (V-J Gene Usage)
VDJtools
# Generate V-J usage circos plot
vdjtools PlotFancyVJUsage \
-m metadata.txt \
output_dir/
# Generates PDF circos plots showing V-J pairing frequencies
Python with pyCircos
import pandas as pd
import matplotlib.pyplot as plt
from pycircos import Gcircle
def plot_vj_circos(clone_df):
'''Create circos plot of V-J usage'''
# Count V-J pairs
vj_counts = clone_df.groupby(['v_gene', 'j_gene']).size().reset_index(name='count')
# Create circos
circle = Gcircle()
# Add arcs for each V and J gene
v_genes = vj_counts['v_gene'].unique()
j_genes = vj_counts['j_gene'].unique()
# Add sectors and links
# ... (complex setup)
circle.save('vj_circos.pdf')
