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

Size factor of CellAssign #89

Open
Bio-MingChen opened this issue Jun 28, 2021 · 1 comment
Open

Size factor of CellAssign #89

Bio-MingChen opened this issue Jun 28, 2021 · 1 comment

Comments

@Bio-MingChen
Copy link

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!

@adamgayoso
Copy link

adamgayoso commented Jul 13, 2021

Hi @Bio-MingChen can you raise this issue here? The scvi-tools implementation is independent of this one. Also, the sum of each cell's expression should be taken over all genes, not just the ones used as markers. Finally, it should work if you divide the library size per cell by the mean library size.

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

No branches or pull requests

2 participants