cellassign icon indicating copy to clipboard operation
cellassign copied to clipboard

Size factor of CellAssign

Open Bio-MingChen opened this issue 3 years ago • 1 comments

Directly compute size factor by sum of each cell's expression( through adata.obs["size_factor"] = adata.X.sum(1)) will lead to wrong celltype assignemnt when I recently run cellassign example by scvi-tools https://docs.scvi-tools.org/en/stable/user_guide/notebooks/cellassign_tutorial.html. The dataset tutorial used have a size factor in its meta data and I do not know how it comes from, there also a method to compute size factor in tutorial by sum of a cell's all expression but when I compute by this method, Cellassign just can not get right way to assign celltype,it's totally wrong result:

Using size factor which is tutorial dataset offered umap_cellassign_example

After computing size factor by adata.obs["size_factor"] = adata.X.sum(1) umap_cellassign_example_size_factor (2)

So, I have two questions: 1) what is exactly size factor is and its function which I tried to find something on Google but little information can get. 2)why size factor impact results so much and what is your suggest. Looking forward your relay. Best wishes!

Bio-MingChen avatar Jun 28 '21 10:06 Bio-MingChen