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

Cannot RenameCells if only 1 cell #39

Open
JZL opened this issue Feb 14, 2022 · 0 comments
Open

Cannot RenameCells if only 1 cell #39

JZL opened this issue Feb 14, 2022 · 0 comments

Comments

@JZL
Copy link

JZL commented Feb 14, 2022

Hi,

If you run RenameCells on a seurat object with one cell (I'll put below why this came up in my analysis), it does not actually rename the cells because of a <= not < in RenameCells.Assay (see here). It's possible that this <= is required but git blame at least doesn't help me understand why it was added.

The reason why this came up is I had a list of Seurat objects, one cell type per object. I ultimately wanted a single seurat object of cell type averages so first AverageExpression'd each element of the list (to get a Seurat object with one 'cell') and then was going to merge together. It was impractical to first merge all the seurat objects, then average by Ident, because they were so large they hit R's 2^31-1 size limitations. However, AverageExpression leaves each cell's ID as just all so all the cell ID's were the same pre-merge. When merge.Seurat tries to make the cell IDs unique, it uses RenameCell which then silently fails and later processing errors. I can't manually unique-ify the cell names for similar RenameCell reasons.

I ended up just extracting the average matrices myself and rbind'ing but it's a pretty pernicious error :-)

Thanks
Jonah

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

1 participant