cole-trapnell-lab / monocle3

Other
318 stars 98 forks source link

`aggregate_gene_expression()` add `norm_method = "none"` #686

Open Erlmeierlu opened 8 months ago

Erlmeierlu commented 8 months ago

Hi,

I wanted to create pseudo-bulk samples, and instead of doing it by hand, I looked into the aggregate_gene_expression() function, in hopes it would get the job done. However, this function forces normalization (what probably makes sense for its usual applications).

I found a workaround to acutally use this function to create pseudo-bulk counts:

pData(cds)$Size_Factor <- 1
aggregate_gene_expression(cds, cell_group_df = group_df, norm_method = "size_only", scale_agg_values = FALSE)

However, an implementation of something like norm_method = "none", would solve the issue of having to change the size factors. I know, pseudo-bulk anaylsis is not part of the complete monocle workflow. But it could be useful for people, who like to use monocle for some parts of their analysis, like me.