Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pseudoBulkDGE - logFC means upregulated in which condition? #119

Open
jcasadogp opened this issue May 6, 2024 · 1 comment
Open

pseudoBulkDGE - logFC means upregulated in which condition? #119

jcasadogp opened this issue May 6, 2024 · 1 comment

Comments

@jcasadogp
Copy link

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:

  • Upregulation in DON_A compared to DON_B
  • Upregulation in DON_B compared to DON_A

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

Thank you in advance!

@LTLA
Copy link
Collaborator

LTLA commented May 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants