Skip to content

Conversation

@maxkarlsson
Copy link

This is a fix of an issue that arises when an assay is subset to a single cell. For example, calling for a data layer in such a subsetted would return a numeric vector instead of a Matrix:

> seur <- LayerData(subset(pbmc_small, cells = 1))
> class(seur)
[1] "numeric"

> seur <- LayerData(subset(pbmc_small, cells = 1:2))
> class(seur)
[1] "dgCMatrix"
attr(,"package")
[1] "Matrix"

This fix makes sure that the returned object is a Matrix, and I have added a test to control for that. This may seem like a specialized case, but it is an issue that creates trouble for certain deep sequenced assays where inspecting individual cells are more common.

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

Successfully merging this pull request may close these issues.

1 participant