docs: add BEAM-T receptor query tutorial - #724
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #724 +/- ##
==========================================
+ Coverage 78.31% 78.32% +0.01%
==========================================
Files 51 51
Lines 4607 4628 +21
==========================================
+ Hits 3608 3625 +17
- Misses 999 1003 +4 🚀 New features to boost your workflow:
|
|
Thanks for putting this together @matteobroketa. I suggest the following improvements:
To show a bit better that the querying works, I was thinking of the following evaluation. Do you think this makes sense, or would that not work at all in the small demo dataset?
LMK what you think. |
| @@ -0,0 +1,1182 @@ | |||
| { | |||
There was a problem hiding this comment.
Line #22. for column in antigen_table.columns:
I think instead of the loop, you could just do
python
mdata.mod["airr"].obs = mdata.mod["airr"].obs.join(antigen_table.set_index("barcode"), validate="1:1")
Reply via ReviewNB
|
Thanks a lot for these suggestions, I am always learning more as I go. I’ve separated the Antigen Capture features from the gene-expression AnnData, expanded the explanations of the gex, antigen, and airr modalities and the antigen-score columns. I also added a GEX UMAP with basic T-cell markers and the EBV/CMV scores. For the additional antigen QC, I checked the current EBV reference candidates before applying a filter. Some cells have non-zero negative-control or CMV UMIs, but all candidates have more EBV UMIs than either the negative control or CMV. Since the Cell Ranger specificity score already incorporates the negative-control counts, I think it is more transparent to show these as QC diagnostics rather than automatically discard every cell with a non-zero control/off-target count. I also added the sequence-mismatch evaluation idea. I ran unique receptor groups rather than individual cells to avoid clone-size weighting, and put a comparison as agreement with BEAM-derived labels. There's also a validation subset for the distance cutoff rather than tuning it on the final query set. |
Summary
ir_dist,define_clonotype_clusters,ir_query,ir_query_annotate_df, andgroup_abundanceThe score threshold of 90 is used only to select a conservative EBV reference subset. The tutorial explicitly treats it as an illustrative, dataset-specific convention rather than a universal cutoff.
Scope
This is a documentation-only contribution. It downloads the processed data directly from 10x Genomics using pinned hashes.
This first version does not add a
scirpy.datasetsloader, mirror the dataset, or include an unrelated external query dataset.Validation
git diff --checkCloses #677