-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
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.
convert2anndata/R/extract_counts_matrix.R
Lines 19 to 20 in 550bfb0
| } 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:
convert2anndata/R/extract_counts_matrix.R
Lines 12 to 18 in 550bfb0
| 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) | |
| } |
katosh
Metadata
Metadata
Assignees
Labels
No labels