choose 'AverageExpression() ' or 'AggregateExpression()' ? #9956
Unanswered
lilyliushasha
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I am using seuratv5, I want to get the average expression value of the genes in each sample. When I run the following code:
df <- AverageExpression(data,group.by = "ID",layer = "data",return.seurat=TRUE)
It shows 'As of Seurat v5, we recommend using AggregateExpression to perform pseudo-bulk analysis.'
Then I ran the following code:
df1<-AggregateExpression(data,group.by = "ID",assays="RNA",return.seurat=TRUE)
names(df1@assays[["RNA"]]@layers)
#[1] "counts" "data" "scale.data"
df[["RNA"]]$counts[1:6,1:6] #There is an integer matrix stored here.
df[[“RNA”]]$data[1:6,1:6]
I would like to know if df[[“RNA”]]$data is storing the average value of gene expression in each sample?
Beta Was this translation helpful? Give feedback.
All reactions