seurat `<obj>@assays$RNA@counts` vs `<obj>@assays$RNA@data`?
1
0
Entering edit mode
3.3 years ago
mk ▴ 300

I have two matrices called <object>@assays$RNA@counts and <object>@assays$RNA@data that are both real non-negative.

What is the difference between these?

seurat • 5.6k views
ADD COMMENT
0
Entering edit mode
3.3 years ago

@data will hold the normalized counts if you run NormalizeData. @counts will always hold the raw counts.

ADD COMMENT
0
Entering edit mode

Hi rpolicastro , I noticed that:

> min(<object>@assays$RNA@data)
[1] 0

Shouldn't this be negative assuming that seurat still normalizes to zero-centered values?

ADD REPLY
0
Entering edit mode

The ScaleData function scales and centers the normalized data. I believe it goes to the @scale.data slot though and not @data.

ADD REPLY
0
Entering edit mode

oh, that's interesting, so would <object>@assays$RNA@data just be linear in some previously-computed cell-wise size-factors (i didn't know seurat did that so generally use scran to compute size factors separately)?

if so then that matrix is very useful for some other stuff, too

ADD REPLY
1
Entering edit mode

NormalizeData divides each feature in a cell with the total UMI counts for that cell, multiples the number by 10000, and then natural log + 1 transforms the counts, so you don't expect any negative values. ScaleData then centers and scales those counts.

ADD REPLY

Login before adding your answer.

Traffic: 1808 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