Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deal with "The expression of the highly-expressed gene _ decreases quite markedly after CellBender. Check to ensure this makes sense!" warning? #342

Open
Ratoncito opened this issue Mar 26, 2024 · 1 comment
Labels
user question User question about a specific dataset

Comments

@Ratoncito
Copy link

image

I just ran 69 samples through cellbender with default settings and noticed that in about 1/10th of my runs I get a warning like this:

WARNING: The expression of the highly-expressed gene Avp decreases quite markedly after CellBender. Check to ensure this makes sense!

In some cases it even includes biologically interesting genes such as Oxt, but I digress...

image

Just wondering if I should take this warning seriously or how would I "ensure this makes sense". Any feedback welcome.

@sjfleming
Copy link
Member

Hi @Ratoncito , yes we were a bit vague about that "ensure this makes sense" statement. And it does show up a lot! Including in cases where it's totally fine. The noisier the dataset, the more likely this will show up.

It is not meant to be an error, just a warning.

As for how to follow the advice and "ensure this makes sense", I'd recommend looking at some version of a plot like this:
image
where you label your gene of interest and sure it's not way off the diagonal. The diagonal here is kind of like our naive expectation about how much each gene should be removed.

  • x-axis: take some droplets you're sure are empty (from the empty droplet plateau) and take the mean expression over cells
  • y-axis: take the mean (over cells) counts removed for each gene np.array((adata.layers['raw'] - adata.layers['cellbender']).mean(axis=0)).squeeze()
  • (see here for some more detailed code)

Also look at UMAPs for those genes... UMAPs like this:
image

Make sure it doesn't look like cellbender is unfairly just destroying all counts for a gene. (As of v0.3.0, it should be protected against doing that... but I still like to tell people to check.)

Do I always "check to make sure"? No, if I'm running v0.3.0+, I do not always check. But if I see a gene that is "biologically interesting such as Oxt", then for sure I will check on that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user question User question about a specific dataset
Projects
None yet
Development

No branches or pull requests

2 participants