theMILOlab / SPATA2

A Toolbox for Spatial Transcriptomics Analysis
https://themilolab.github.io/SPATA2/
102 stars 17 forks source link

Converting SingleCellExperiment to SPATA2 #55

Closed YaobangWang closed 8 months ago

YaobangWang commented 1 year ago

Hi, I am very pleased that SPATA2 has helped me so much in analyzing signal trajectory, and the plot produced by the function is pretty nice. However, I was interested to know if there was a way to convert the object of a SingleCellExperiment into that of SPATA2. I would be very grateful if you had any code to solve this problem!

kueckelj commented 1 year ago

Hello YaobangWang, Thanks for using SPATA2. I'll have a look into your request and will come back to you within the next few days.

Best regards

Jan

simonmfr commented 8 months ago

Hi @YaobangWang, sorry for the late reply. Are you referring to SpatialExperiment? SingleCellExperiment is intended for single-cell data.

For converting a SpatialExperiment object to SPATA2, what I recommend at the moment is initiaiting a new SPATA2 object from the raw data via initiateSpataObject_10X() and transferring metadata/matrices post-hoc.

If we implement a more elegant solution, we will reach out to you.