HelenaLC / CATALYST

Cytometry dATa anALYsis Tools
67 stars 30 forks source link

assay type in cluster function #306

Closed rahilgholami closed 1 year ago

rahilgholami commented 1 year ago

Hi,

I would like to pass the assay type (e.g. assay.type = “exprs_normalized”) to the cluster(spe, features = rownames(spe), maxK = 30, seed = 220410) function but it doesn't know the argument. Is there any way to set the assay type? My data are read in as a SpatialExperiment object.

I would be grateful for any help.

Best, Rahil

HelenaLC commented 1 year ago

Yes, this isn't ideal really... There's currently no argument for this. However: The cluster function defaults to using the "exprs" assay. So you could rename the assay you'd like to use to this, and run the clustering. I.e.,

i <- match("exprs_normalized", assayNames(sce))
assayNames(sce)[i] <- "exprs"
sce <- cluster(sce, ...)