You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I and others have posted about issues related to V5 assays that have a single cell. While an assay with one cell is probably a fringe case and usually not very useful, there are valid situations where they could arise. Someone posted about uses of pseudobulking. We've found these when we iterate a lot of seurat objects with some kind of subset operation with the goal for merging the resulting objects. I dont really see a good argument for why a single-cell object is inherently invalid, outside of R making it inconvenient by converting a matrix to a vector if the code doesnt account for that. The earlier Assay object, SingleCellExperiment, etc., don't have this limitation.
Below is one more example of what I'd argue is inconsistent Seurat behavior around this. You'll see you can easily start with a valid object, but after subset end up with an object that is basically non-functional with no errors in seurat:
# Example matrix with two cells
mat <- matrix(rep(1, 10), ncol = 2)
colnames(mat) <- c('Cell1', 'Cell2')
rownames(mat) <- LETTERS[1:5]
# Make object, which is valid
seuratObj <- Seurat::CreateSeuratObject(mat)
# Subset to one cell. Seurat doesnt complain about this. If a one-cell object is invalid, it should error here:
seuratObj <- subset(seuratObj, cells = 'Cell1')
# But a very basic operation fails on that object:
GetAssayData(seuratObj, layer = 'counts')
Error in methods::slot(object = object, name = "layers")[[layer]][features, :
incorrect number of dimensions
The purpose of posting is to ask your team to consider re-enabling this case with V5 assays. While on the fact of it a one cell assay might not seem useful, the inability to support it does cause headaches when using a seurat object to handle data.
The text was updated successfully, but these errors were encountered:
I and others have posted about issues related to V5 assays that have a single cell. While an assay with one cell is probably a fringe case and usually not very useful, there are valid situations where they could arise. Someone posted about uses of pseudobulking. We've found these when we iterate a lot of seurat objects with some kind of subset operation with the goal for merging the resulting objects. I dont really see a good argument for why a single-cell object is inherently invalid, outside of R making it inconvenient by converting a matrix to a vector if the code doesnt account for that. The earlier Assay object, SingleCellExperiment, etc., don't have this limitation.
Below is one more example of what I'd argue is inconsistent Seurat behavior around this. You'll see you can easily start with a valid object, but after subset end up with an object that is basically non-functional with no errors in seurat:
The purpose of posting is to ask your team to consider re-enabling this case with V5 assays. While on the fact of it a one cell assay might not seem useful, the inability to support it does cause headaches when using a seurat object to handle data.
The text was updated successfully, but these errors were encountered: