What is the difference between the SCT data stored in data and scale.data in Seurat?
1
0
Entering edit mode
8 days ago

Hi,

I have a seurat object, I am trying to find out marker gene and plot heatmap.

markers <- FindAllMarkers(seurat.data, only.pos = TRUE, min.pct = 0.25, logfc.threshold = 0.5)
avg_expr <- AverageExpression(seurat.data, assays = "SCT")$SCT

And I find some markers genes not in avg_expr

sum(!rowname(markers) %in% rownames(avg_expr))
[1] 9949

and then, I found their are to SCT data in seurat object with different dimensions

GetAssayData(seurat.data, slot = "scale.data", assay = "SCT") %>% dim()
[1] 22027 11089
GetAssayData(seurat.data, slot = "data", assay = "SCT") %>% dim()
[1] 26367 11089

I'm a little confused about this difference.

NGS seurat scRNA-seq • 252 views
ADD COMMENT
0
Entering edit mode
8 days ago

Briefly from the help information for SCTransform in Seurat

"Seurat object with a new assay (named SCT by default) with counts being (corrected) counts, data being log1p(counts), scale.data being pearson residuals; sctransform::vst intermediate results are saved in misc slot of the new assay."

SCTransform corrects the counts from your equivalent RNA assay and creates a new assay (typically SCT) where the counts slot is a corrected counts, data is a log transformation of corrected counts+1 and the scale.data are pearson residuals. Typically, the scale.data slot is only generated for the features listed in VariableFeatures(your_object) which is why it's usually smaller than your SCT data slot. You can tell SCTransform to scale all genes, but whether that's something you need or not is up to you.

NB It's recommended to run seurat.object <- PrepSCTFindMarkers(seurat.object) before running FindMarkers() if you are running it on an SCT assay.

ADD COMMENT
0
Entering edit mode

Thank you for your patient explanation, but what I still don't quite understand is why some genes in the results of FindMarkers() do not exist in SCT. In fact, I have tried to search for other assays, such as RNA, but I can't find these genes.

ADD REPLY

Login before adding your answer.

Traffic: 2724 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6