Closed enricoferrero closed 2 years ago
Hello Enrico, that's a very good suggestion.
As you have shown with your piece of code, it's quite straightforward to make UCell interact with sce
objects. But I agree that we could implement a wrapper function to explicitly support SingleCellExperiment in our package. I'm adding this to the to-do list for the next release.
Cheers! -m
Hey again,
support for SingleCellExperiment
objects has now been added to the development version of UCell
(to be installed using remotes::install_github("carmonalab/UCell", ref="dev")
)
Following your suggestion, the new function ScoreSignatures_UCell_sce()
takes as input a sce
object and returns UCell scores in its altExp
:
sce <- ScoreSignatures_UCell_sce(sce, assay = "counts", features, ...)
Would be great to have feedback!
PS: Seurat
was removed from Imports, so you do not need to have it installed if you run UCell
on a matrix or sce
object.
Thanks @mass-a! I get this warning when running ScoreSignatures_UCell on a SingleCellExperiment object:
Warning message:
In .check_altexp_columns(x, value, withDimnames = withDimnames, :
'colnames(value)' are not the same as 'colnames(x)' for 'altExp<-'. This will be an error in
the next release of Bioconductor.
Hello @enricoferrero, thanks for the heads up.
Which version of SingleCellExperiment are you using? UCell seems to play fine with the development version of Bioconductor: https://bioconductor.org/packages/3.15/bioc/html/UCell.html
Thanks for developing a really useful package!
Are you considering openly supporting
SingleCellExperiment
(on top ofSeurat
)? I'm sure this would be very appreciated by the Bioconductor community.For reference, given a
SingleCellExperiment
objectsce
, and alist
of signaturessignatures
this is how I've been using UCell: