Closed huiyijiangling closed 1 week ago
subset spots p < 0.05 ?
You can use the localResult
getter to get the p-values and then subset the SFE object before plotting, something like
lr <- localResult(sfe, "LOSH.cs", "TP53")
is_sig <- lr[,"-log10p_adj"] > -log10(0.05)
sfe_sub <- sfe[,is_sig]
Though I'm not sure if only plotting spots that are significant is a good idea because the 0.05 cutoff is rather arbitrary.
plotLocalResult(sfe_tissue, "LOSH.cs", features = "TP53", attribute = "-log10p_adj", colGeometryName = "spotPoly", divergent = TRUE, diverge_center = -log10(0.05), swap_rownames = "symbol", image_id = "lowres") + theme_void()