Repository navigation
Figure 3 pairs: CITE-seq violins as one comparison, and R's labelled PBMC 3k UMAP - #138
Merged
Merged
Conversation
Reviewer 2 of the Frontiers paper (major comment 4) found R's and Truecell's figure 10 in different orders and colours, which defeats the side-by-side the paper prints as Figure 3C/D. Both scripts now take the group order and colours from one list, CELL_TYPES in cbmc_citeseq_tutorial.py: every label annotate_cells can return, in vln_plot's order. Colours come from Seurat's hue_pal over all twelve (truecell.hue_pal(12) matches scales::hue_pal()(12) exactly), so the 69-cell DC / Mono cluster that only R's clustering finds moves no other colour. Neither side draws points. The R script adds the median bar vln_plot draws, across each violin at its median, and the titles and y-axis labels match. R also writes r_10_adt_weight_by_celltype_manuscript.png, laid out at the 3.30 in the paper prints it, with the same 1350 x 750 pixels. Saved with Seurat's default type sizes, that copy overprinted its y-axis labels and squashed the violins, so its type is set to the sizes Truecell's panel prints at. Drawing only. The CITE-seq --report is identical before and after, and every other R and Python figure regenerated byte-identical. The label lists are guarded, and all six mutations tried were caught. The smoke suite checks the figure's layout at full size, at 0.55 and at 3.30 in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pbmc3k_verify.R drew no UMAP, so the Frontiers paper's Figure 3A/B had no R panel from the same run to set beside Truecell's 11_umap_labeled.png. It now saves r_11_umap_labeled.png: DimPlot with labels, repelled, with the same title and size as Truecell's figure. The cell types are levelled in Truecell's order. dim_plot sorts names by code point, and a radix sort reproduces that in any locale, while R's default sort under en_US.UTF-8 puts "Naive CD4 T" before "NK" and would have swapped two colours. With the order matched, Seurat's default hue_pal gives each type Truecell's colour. Drawing only. The PBMC 3k --report is identical before and after, and r_12_ridge_plot.png regenerated byte-identical. The tutorial page keeps the published vignette's image on R's side. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The resolution-sweep comment still gave the ARI documented before 2.0.0. The measured and documented value at resolution 0.5 is 0.928, which the tutorial page and README print. The remaining 0.938, at line 94, is the history of that number and stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Frontiers revision shows Truecell's own tutorial figures in its Figure 3, and it asked for two of them to pair properly with R's (
truecell_paper/Truecell_Revision1/TUTORIAL_CHANGES_2.0.0.md). Tutorial scripts, figures, tests and docs only: no package code changes, so no release. The paper will cite this PR's merge commit.1. CITE-seq ADT-weight violins, drawn as one comparison (Reviewer 2, major comment 4). R's and Truecell's figure 10 used different group orders and colours. Now both scripts:
vln_plot's, fromCELL_TYPES: every labelannotate_cellscan return;hue_palover all twelve labels, so the 69-cell DC / Mono cluster that only R's clustering finds moves no other colour.truecell.hue_pal(12)matchesscales::hue_pal()(12)exactly, now pinned intest_plotting_theme.py;vln_plotdraws, across each violin at its median;R also writes
r_10_adt_weight_by_celltype_manuscript.png, laid out at the 3.30 in the paper prints the panel at. Saved as the hand-off specified, with Seurat's default type sizes, it overprinted its y-axis labels and squashed the violins. So that copy uses the type sizes Truecell's panel prints at.2. R's labelled PBMC 3k UMAP,
r_11_umap_labeled.png.pbmc3k_verify.Rdrew no UMAP, so Figure 3A/B had no R panel from the same run. It now draws one, with the same title and size, and the cell types in Truecell's order. They are radix-sorted, because R's default sort underen_US.UTF-8puts "Naive CD4 T" before "NK" and would have swapped two colours.3. A comment in
pbmc3k_tutorial.pystill gave ARI 0.938; the measured value is 0.928.Checks
--reports are identical before and after. Every other R and Python figure regenerated byte-identical.tests/test_multimodal_tutorial.pyholds R's copy ofCELL_TYPESto Python's, invln_plot's order, as the set of labels bothannotate_cellsimplementations can return. A behaviour test checks each violin's colour against its slot. All six mutations tried were caught: a reordered R list, a dropped label, a new label on either side, a palette over present types only, and points back on.pytest tests/gives 1734 passed, 30 skipped here; CI's counts will be read from its logs. The opt-in smoke tests-k "cbmc or labelled or cell_type"give 5 passed, including the new layout test, and the tree was clean after both.🤖 Generated with Claude Code