Nanostring-Biostats / SpatialDecon

The SpatialDecon library implements the SpatialDecon algorithm for mixed cell deconvolution in spatial gene expression datasets. (This algorithm also works in bulk expression profiling data.)
MIT License
33 stars 8 forks source link

Reverse Deconvolution analysis #4

Closed JpGuegan closed 3 years ago

JpGuegan commented 3 years ago

Hello,

I just have a foolish question concerning your reverseDecon function. Can I split my result from spatialdecon by condition (let's say by segments), apply the reverse deconvolution and look after for differentially expressed genes in each cell types using the coefs as input (limma or others) ?

data_annot$Segment <- as.factor(c("stroma_treated", "tumor_treated", "stroma_control","tumor_control"))

restils <- spatialdecon(norm = data_norm,
raw = data_raw,
bg = bg,
X = safeTME,
cell_counts = data_annot$AOINucleiCount,
is_pure_tumor = data_annot$istumor,
n_tumor_clusters = 2)

list_rdecon <- list()

for (i in 1:nlevels(data_annot$Segment)) { Sample <- data_annot %>% dplyr::filter(as.integer(Segment)==i) %>% rownames() x <- reverseDecon(norm = data_norm[,Sample], beta = restils$beta[,Sample]) list_rdecon[i]<-x }

Thanks for your help!

patrickjdanaher commented 3 years ago

That's a nice idea. I think it's an exploratory analysis that might produce interesting results. But methodology-wise it's fairly avant garde, so I wouldn't want to have to defend that analysis to a journal.

JpGuegan commented 3 years ago

Thanks for the reply. I should thus wait !