MarioniLab / scran

Clone of the Bioconductor repository for the scran package.
https://bioconductor.org/packages/devel/bioc/html/scran.html
39 stars 23 forks source link

pseudoBulkDGE - logFC means upregulated in which condition? #119

Open jcasadogp opened 2 months ago

jcasadogp commented 2 months ago

Hello,

I have the following code:

de.results <- pseudoBulkDGE(sce_list$current_sce, 
                            label=paste0("group1: DON_A, group2: DON_B"),
                            design=~donor_id,
                            coef=paste0("donor_id", DON_B),
                            condition=sce_list$current_sce$donor_id
                            )

I want to compare two donors DON_A and DON_B with this code.

sce_list$current_sce$donor_id gives me "DON_A", "DON_B", "DON_A", "DON_B" and sce_list$current_sce has the following dimensions: [1] 33904 4

I want to know if positive logFC values mean:

I have not found it in any documentation or other post/issue.

Thank you in advance!

LTLA commented 2 months ago

pseudoBulkDGE is just a wrapper around edgeR or voom, and the design matrix and coefficients can be interpreted in the same manner. In your case, if sce$donor_id contains DON_A and DON_B, the matrix created by ~donor_id will have an intercept and a donor_idDON_B column that represents the log-fold change of DON_B over DON_A. So, if you set this as your coef, your reported log-fold changes will be that of DON_B over DON_A.

FYI your label setting is rather odd. It is intended to be the colData column that represents the cluster/cell types, as pseudoBulkDGE() will loop over all the different cell types and perform the specified DE analysis within each of them.