markrobinsonuzh / cytofWorkflow

MIT License
14 stars 3 forks source link

run pipeline with previously transformed data #28

Closed mflookp closed 2 years ago

mflookp commented 2 years ago

Hi,

I have cytof data that already has already been arcsinh-transformed with cofactor 5 from by the pre-processing pipeline, when I create the sce, with transform set to FALSE: sce <- prepData(x=d_flowSet,panel=panel_meta, md=sample_meta, features = panel_meta$fcs_colname, md_cols=md_cols, transform = FALSE)

then the following sets of the pipeline cannot be followed as it does not store the expression values, returning errors such as: pbMDS(sce, color_by = "condition") Error in assay(x, assay) : 'assay(, i="character", ...)' invalid subscript 'i' 'exprs' not in names(assays())

Could you suggest a way to overcome this problem?

I have also tried to use sce created with scDataviz, but it seems incompatible.

HelenaLC commented 2 years ago

Indeed. When transform = FALSE, the first (and only) assay will be named "counts", whereas the majority of functions expects an "exprs" assay to exist (containing expression-like values). Setting assayNames(sce) <- "exprs" should resolve this.

mflookp commented 2 years ago

Thank you!