Teichlab / celltypist

A tool for semi-automatic cell type classification
https://www.celltypist.org/
MIT License
254 stars 40 forks source link

celltypist before/after batch correction #119

Open malonzm1 opened 2 months ago

malonzm1 commented 2 months ago

Hi,

I perform batch correction using scVI. But I perform celltypist prediction before batch correction. Is it better to perform celltypist after batch correction or it doesn't matter?

Good day.

ChuanXu1 commented 2 months ago

@malonzm1, predicted_labels is only dependent on gene expression matrix, but majority_voting will be influenced by the neighborhood graph if it is constructed from scVI latent space.

malonzm1 commented 2 months ago

Thanks!

malonzm1 commented 2 months ago

Is majority_voting more reliable if celltypist is run after batch correction?

ChuanXu1 commented 2 months ago

@malonzm1, depends, but majority_voting is usually more readable.

smallsmalltown commented 1 month ago

@ChuanXu1 Based on what you've described, it seems that batch effects will not impact the predicted_labels, but they can influence the majority_voting results??? After applying harmony to remove batch effects, my data also encountered the issue of "Invalid expression matrix in .X, expect log1p normalized expression to 10000 counts per cell; will use .raw.X instead."

ChuanXu1 commented 4 weeks ago

@smallsmalltown, as I remember, Harmony will not change the expression values but produce only the corrected latent space. To predict your data using CellTypist, you need to provide a normalized gene expression in either .X or .raw.X.