extract_expression_matrix fails when doing something like sce_assay=1; this setting is occasionally necessary when assayNames is full of empty strings and/or if you know the input object only has one assay (but not what it's called). This is caused by a custom error check for the validity of sce_assay, but there is no need for that because assay will do this check anyway.
library(SingleCellExperiment)
example(SingleCellExperiment)
assay(sce, "whee")
## Error in assay(sce, "whee") :
## 'assay(<SingleCellExperiment>, i="character", ...)' invalid subscript 'i'
## 'whee' not in names(assays(<SingleCellExperiment>))
extract_expression_matrix
fails when doing something likesce_assay=1
; this setting is occasionally necessary whenassayNames
is full of empty strings and/or if you know the input object only has one assay (but not what it's called). This is caused by a custom error check for the validity ofsce_assay
, but there is no need for that becauseassay
will do this check anyway.