STOmics / Stereopy

A toolkit of spatial transcriptomic analysis.
MIT License
179 stars 59 forks source link

use SingleR with H5MS or extract raw and normalized data from H5MS #278 #279

Open BioRB opened 1 month ago

BioRB commented 1 month ago

Hello, I'm not able to access raw and normalized data. We want to perform annotation using SingleR starting from H5MS file that we generated integrating different portions of slices from different samples. We see that probably is not possible to run SingleR on H5MS and thus the idea now is to extract singularly the data for each sample from the H5MS and performing the annotation. Do you think this strategy is correct? if yes, how can we extract the matrix to use in SingleR? I tried to access raw data using ms_data.t1.raw and I get this output: <function stereo.core.ms_pipeline.MSDataPipeLine.__getattr__.<locals>.temp(*args, **kwargs)> But how to see the matrix, or at least save it as a df. We would be able to extract singularly the slices starting from the integrated data present in the H5MS file.

BioRB commented 1 month ago

I tried also using the original gef file generated from SAW for only one sample. I get this error, whaterver reference I use: ValueError: operands could not be broadcast together with shapes (23169,) (29452,). I get same error using the H5MS as testfile, just with different values.