Closed nbutyrate closed 10 months ago
You can install the latest version of SCP. I have removed the restriction in FeatureStatPlot
that required the slot
parameter to be either "counts" or "data". Therefore, in the new version of FeatureStatPlot, you can use the scale.data
slot to plot. You can apply various methods to scale or normalize the data/counts, and then store the results in scale.data. When plotting with FeatureStatPlot, you can specify the parameter slot="scale.data"
:
data <- pancreas_sub@assays$RNA@data
pancreas_sub@assays$RNA@scale.data <- as.matrix(data / rowMeans(data))
FeatureStatPlot(pancreas_sub,
stat.by = c("Neurog3", "Rbp4", "Ins1"), group.by = "CellType",
slot = "scale.data", ylab = "FoldChange", same.y.lims = TRUE, y.max = 4
)
Thanks
I tried to do the same, currently getting the following error
Error in ExpressionStatPlot(exp.data = exp.data, meta.data = meta.data, : 'stat.by' must be type of numeric variable.
please ignore my previous message, got it working thanks fo your help.
Hi,
thanks for the great tool,
Is there any way to change/normalize the y-axis in FeatureStatPlot? I understand that currently it utilizes the expression data stored in the 'data' slot in default, but can we do something like relative abundance or any other normalization?
Thanks in advance