stuart-lab / signac

R toolkit for the analysis of single-cell chromatin data
https://stuartlab.org/signac/
Other
328 stars 88 forks source link

GeneActivity on pseudo-bulk data #1746

Closed jgarces02 closed 3 months ago

jgarces02 commented 3 months ago

Hi there,

I calculated the gene activity scores for my dataset and realized there was a bias toward more abundant populations. Is there any way of performing this calculation on the averaged accessibility? Something like Seurat's AggregateExpression?

Thanks in advance!

jgarces02 commented 3 months ago

I tried this, does it make sense?

gene_activities <- GeneActivity(seuratobj_atac, biotypes = NULL, max.width = NULL)

seuratobj_atac[["gene_activities"]] <- CreateAssayObject(counts = gene_activities)
DefaultAssay(seuratobj_atac) <- "gene_activities"

seuratobj_atac_pseudobulk <- AggregateExpression(seuratobj_atac, assays = "gene_activities", return.seurat = T, 
    group.by = c("cell_type", "patient", "timepoint"))