Skip to content

Converting assays inheriting Assay class only allows assays named counts #3

@jordanc17

Description

@jordanc17

When converting assays from Seurat to SingleCellExperiment, if they're of the Assay type, the conversion function doesn't properly handle assays other than counts. If there's no slot named counts, this will return a matrix with 0 rows or 0 columns and cause the conversion to fail.

} else if (inherits(assay_object, "Assay")) {
GetAssayData(assay_object, slot = "counts")

This section should be updated with the if/else logic used for assays of the Assay5 class:

if (inherits(assay_object, "Assay5")) {
if ("counts" %in% Layers(assay_object)) {
GetAssayData(assay_object, layer = "counts")
} else {
# If counts layer doesn't exist, try default
GetAssayData(assay_object)
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions