Repository navigation
Add statistical comparison tutorial - #102
maltekuehl wants to merge 8 commits into
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
Hi Malte, |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Uses the BCR-XL stimulation data of the Bioconductor CyTOF workflow: FlowSOM on the type markers, per-sample counts and medians with pandas and scanpy, differential abundance with pertpy's scCODA and differential state with a paired linear model through pertpy's Statsmodels wrapper. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- install line pertpy[jax,de] plus session-info2, checked in a fresh venv - download with pooch and checksums; data cached outside the repository, so the gitignore rules are no longer needed - fixed number of meta-clusters (20) and populations named by rules on the cluster medians, which stop on ambiguous or missing matches; checked with seeds 0, 1 and 7; debris, doublets and unclear clusters are excluded - show that type markers shift with the stimulation, and that the monocyte decrease is largely a shift to the DC population - scCODA with CD4 T cells as explicit reference, with the dependence on the reference and the comparison with cytofWorkflow stated - state results filtered by effect size as well as BH, broad changes of pAkt, pNFkB, pp38, pBtk and pSlp76 described with the cytofWorkflow result Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The tutorial now downloads one archive of the QBC-CyTOF cross-species dataset from Zenodo (10.5281/zenodo.23406825, CC-BY 4.0) and compares 14 human donors before and after CD40L stimulation, instead of the BCR-XL data from an Internet Archive copy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- cite the Zenodo dataset (creators, title, version, DOI, licence) and the authors' code repository, without the unpublished manuscript - report all BH-significant state changes sorted by size instead of a cut-off chosen after seeing the data, and say plainly how small they are - show proportions and per-donor B cell changes as violin plots with one dot per sample instead of boxplots Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The tutorial now uses the Levine et al. (2015) CyTOF data from figshare (10.6084/m9.figshare.19867021, CC BY 4.0): the basal samples of 5 healthy donors and 8 AML patients, compared unpaired, with scCODA against T cells for abundance and Welch t-tests on per-sample medians for state markers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Simulated data with planted effects show differential abundance and differential state in an unpaired and a paired design, with known ground truth. Both questions are tested with pertpy's linear models: CLR-transformed cell counts for abundance, per-sample medians for state. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
9e7bce9 to
e1771db
Compare
|
This PR isn't adding pertpy as a dependency of pytometry. It just shows that you can use both of them together for a specific purpose. I think that's perfectly fine. |
|
Thank you both for the comments! @Zethson is right that this PR in particular does not add pertpy (yet), but I originally created this as a draft PR to discuss the possibility of adding some direct bindings and utils as part of pytometry, too. I will have a look next to explore what common utils might make sense to have as part of this lightweight package without adding pertpy as a dependency, only keeping it in the online tutorial. Thanks for the feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #102 +/- ##
=======================================
Coverage 76.69% 76.69%
=======================================
Files 15 15
Lines 618 618
=======================================
Hits 474 474
Misses 144 144 🚀 New features to boost your workflow:
|
Currently,
pytometrycovers file reading, transforms and clustering, but no guidance exists on what users can eventually do with that data to answer their biological questions.This PR adds a small example notebook based on
pertpyand simulated data. It contains a good chunk of data wrangling to bridge the gap between pytometry and pertpy, this could also be integrated into pytometry directly as pertpy wrappers but would require adding another dependency and broadening its surface. Wdyt?Happy to hear thoughts about having something like this in pytometry.