DavisLaboratory / standR

Spatial transcriptomics analyses and decoding in R
https://davislaboratory.github.io/standR/
Other
18 stars 4 forks source link

`norm.factors` not being transferred from `SpatialExperiment` to `DGEList` #20

Closed jaredmcollette closed 1 year ago

jaredmcollette commented 1 year ago

When using TMM normalisation on a spatial experiment object using geomxNorm(), the norm.factors are stored in the metadata.

Later, when using SE2DGEList() to convert the spatial experiment object to a dgeList, the norm.factors are not automatically carried over to the dge, and I have to manually transfer over the norm.factors:

dge$samples$norm.factors <- metadata(spe_tmm)$norm.factor

It would be helpful to have this process automated

ningbioinfo commented 1 year ago

Hi @jaredmcollette , thanks for the suggestion. The SE2DGEList is from the edgeR package, hence wouldn't aware any of the metadata we stored in the spe. I'll probably write a new function to replace SE2DGEList before the next release to incorporate the suggested ability.