Skip to content

Compare patient references with Ann_Level1 for tumor/mesenchymal - #1429

Merged
sjspielman merged 5 commits into
AlexsLemonade:mainfrom
sjspielman:sjspielman/compare-patient-references-annlevel1
Sep 1, 2026
Merged

Compare patient references with Ann_Level1 for tumor/mesenchymal#1429
sjspielman merged 5 commits into
AlexsLemonade:mainfrom
sjspielman:sjspielman/compare-patient-references-annlevel1

Conversation

@sjspielman

Copy link
Copy Markdown
Contributor

Purpose/implementation Section

Please link to the GitHub issue that this pull request addresses.

Ever towards #1424

What is the goal of this pull request?

This PR adds a notebook that is very similar to the one we completed in #1428, except I use Ann_Level1..ish! In the last notebook, it appeared that SingleR had similar difficult with cell types in the "Tumor" and "Mesenchymal" groups. For this round, I therefore decided to group all into a single category each (all tumor together, all mesenchymal together); this is the Ann_Level1 usage. For the other cell types (endo, epi, immune), I still use their Ann_Level2 finer annotations.

When constructing the combined reference versions here, I performed aggregation on Ann_Level2 and then collapsed the tumor & mesenchymal categories, rather than aggregating on an object with all those labels combined in the first place. This allows each of the sub cell types to still contribute more even weight towards the final aggregation, although this of course was a choice which can/should be empirically tested, as I indicated at the bottom of the notebook.

With this approach, we definitely get more confidence in calling tumor cells, but mesenchymal delta.next are still pretty low overall. Based on this notebook, I think this is a safer annotation approach and a harmonized reference (where we merge labels) would work well. I imagine that next steps would likely be comparing different ways to aggregate.

Notebook:
03b-compare-patient-references-combined-ann-levels.nb.html

I also found and fixed a few typos in the last notebook, which I renamed to 03a.

Author checklists

Analysis module and review

Reproducibility checklist

  • Code in this pull request has been added to the GitHub Action workflow that runs this module.
  • The dependencies required to run the code in this pull request have been added to the analysis module Dockerfile.
  • If applicable, the dependencies required to run the code in this pull request have been added to the analysis module conda environment.yml file.
  • If applicable, R package dependencies required to run the code in this pull request have been added to the analysis module renv.lock file.

@sjspielman
sjspielman requested review from allyhawkins and removed request for jaclyn-taroni August 28, 2026 18:55

@allyhawkins allyhawkins left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this all looks good and answers the questions we want to address here. I like the approach you used to combine tumor and mesenchymal and then use the normal cell labels from level 2. And I think at least with these samples, using the harmonized reference makes sense. I had a few minor comments but nothing that I need to see again.

In this case, we're interested in:

- All tumor and mesenchymal from level 1 combined into a single label each
- Other labels take from level 1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this bullet needs to be updated?



We see that the Tumor `delta.next` scores are all much higher than what we previously observed in the `03a` notebook, suggesting that combining this into a single category is giving us higher confidence to label malignant cells.
But, it is notable that the Mesenchymal category still has low associated `delta.next` values.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me given how similar tumor is to mesenchymal here. But I do think this is a good validation of why combining the tumor labels makes sense for now.


```{r}
#| fig.width: 6
#| fig.height: 4

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you increase the height here so we can read all the labels?

plot_delta_next_per_reference(results)
```

There's not much of a strong trend here; median values look about the same for each set of `delta.next` distributions, but it's worth noting that the mesenchymal `delta.next` appears larger for the matched metastasis reference vs the combined.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this and I don't think it's strong enough evidence to choose the matched references over the harmonized ones. That is to say, I like the choice of using the harmonized reference for all samples.

@sjspielman
sjspielman merged commit 4d07a70 into AlexsLemonade:main Sep 1, 2026
2 checks passed
@sjspielman
sjspielman deleted the sjspielman/compare-patient-references-annlevel1 branch September 1, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants