Why of course. I thank you so much for your help!
• 0 views
•
link
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?
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
Log in to answer this question.