PSEUDOBULK HELP-DE Expression in scRNA-seq
1
0
Entering edit mode
12 months ago

I have been trying for days to get my pseudobulk code to work, this is the current code snippet:

#rna$SampleIDs<-rownames(rna@meta.data)

rna<-NormalizeData(rna)
rna<-FindVariableFeatures(rna)
rna<-ScaleData(rna)
rna<-RunPCA(rna)

##### Aggregate counts across the cells at the sample level.
cts<-AggregateExpression(rna, 
                         group.by = "cellClass", "SampleIDs",
                         assays='RNA',
                         slot="counts",
                         return.seurat=FALSE,
                         verbose=TRUE
)

Error is:
Warning: The following 1 features were not found in the RNA assay: SampleIDs
Warning: None of the features specified were found in the RNA assay.

I re-scaled and normalized everything thinking this would work, and the issue persists. Any pointers, please?
scRNA-seq seurat • 954 views
ADD COMMENT
0
Entering edit mode
12 months ago
jv ★ 1.8k

You need to concatenate your group.by strings:

cts<-AggregateExpression(rna, 
                         group.by = c("cellClass", "SampleIDs"),
                         assays='RNA',
                         slot="counts",
                         return.seurat=FALSE,
                         verbose=TRUE
ADD COMMENT
0
Entering edit mode

Why of course. I thank you so much for your help!

ADD REPLY
0
Entering edit mode

if the solution fixed your issue, please accept the answer and up-vote

ADD REPLY

Login before adding your answer.

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