HelenaLC / CATALYST

Cytometry dATa anALYsis Tools
66 stars 30 forks source link

Exporting raw expression values #398

Closed kmincham closed 1 week ago

kmincham commented 3 weeks ago

Hello,

Thank you for a great package.

I would like to export the raw transformed marker expression values from a sce (post-clustering) for integration with a separate dataset. I have accessed the raw "exprs" data (which i believe are the raw marker values) but i am unsure how to correctly merge this data with the metadata so i can identify each sample.

Could you please provide some guidance on this if possible (using the BRC example dataset).

Thank you.

HelenaLC commented 2 weeks ago

If I understand correctly, basic R and SingleCellExperiment() handling should do, e.g.:

es <- assay(sce, "exprs")
cd <- colData(sce)
id <- cluster_ids(sce, "meta20")
dr <- reducedDim(sce, "UMAP")
...
df <- data.frame(t(es), cd, id, dr, ..., check.names=FALSE)

Let me know if this is what you meant or need further assistance - cheers!

kmincham commented 1 week ago

Thank you very much for this - it's exactly what i was trying to do.