Hello,
I'm using the Seurat function VlnPlot() to visualize some of my data.
VlnPlot(object = data.combined, features.plot = c( 'Xist' )
When I plot it, the values range between 0 and 5.
I then wanted to extract the expression value matrix used to generate VlnPlot. By peeking inside the VlnPlot command, it looks like this is the command used to extract data:
exprs <- data.frame(FetchData(object = data.combined, vars.all = c('Xist' ) ), check.names = F)
However, when I run that, the values range between 0 and 120 - that is, they seem unscaled.
I see those same values no matter what I'm pulling for FetchData:
exprs <- data.frame(FetchData(object = data.combined, vars.all = c('Xist' ) ), use.imputed = T)
exprs <- data.frame(FetchData(object = data.combined, vars.all = c('Xist' ) ), use.scaled = T)
exprs <- data.frame(FetchData(object = data.combined, vars.all = c('Xist' ) ), use.raw = T)
What is VlnPlot doing differently to get data that only ranges between 0 through 5?
Thank you for your help.
1 answer
UPDATE: It looks like the issue lied in confusing a combined Seurat object representing multiple samples and using an object that had a single sample. Previously, I had been plotting VlnPlot on combined sample, but accidentally trying to extract data from a single sample, which I'm guessing had not been scaled/regressed correctly, thus causing the confusion. Once I corrected this bug, this works as I would expect now:
exprs <- data.frame(FetchData(object = data.combined, vars.all = c('Xist' ))
Log in to answer this question.