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

A quick question about application of liner mixed model method to detect degs #41

Open
HelloWorldLTY opened this issue May 4, 2023 · 7 comments

Comments

@HelloWorldLTY
Copy link

Hi, I intend to detect differential expressed genes for female people with diseases, so I change cell type into male/female and choose to assign conditions as diseases/health. Is it correct? I found that my current genes are in large divergence comparing with genes from Wilcoxon. Thanks a lot.

@HelloWorldLTY HelloWorldLTY changed the title A quick question about application of liner mixed model method to detect dogs A quick question about application of liner mixed model method to detect degs May 4, 2023
@jordansquair
Copy link
Collaborator

It's hard to know exactly what you mean? Is there an actual bug in Libra for this?

@HelloWorldLTY
Copy link
Author

Hi, I am not sure if it is a bug or the problem of my user case.

I intend to identify differential expressed genes for diseases, and I plan to use mixed model. But the result is very strange.

My codes are like:

`
expr = GetAssayData(data, slot = 'counts', assay = 'RNA')
meta = [email protected]

meta$cell_type = "Female"

meta[meta$gender == "HC_Female",]$cell_type = "Female"
meta[meta$gender == "AD_Female",]$cell_type = "Female"
meta[meta$gender == "HC_Male",]$cell_type = "Male"
meta[meta$gender == "AD_Male",]$cell_type = "Male"

de = run_de(expr, meta = meta, de_family = 'mixedmodel', de_method = 'negbinom')

head(de)
`
Is it correct? Thanks.

@jordansquair
Copy link
Collaborator

I don't understand why you would make cell type gender. Do you not have cell types?

@HelloWorldLTY
Copy link
Author

I have cell types but I intend to find gender-specific differental expressed genes for diseases. Is it clear? So I think the cell type here represents my gender labels. Thanks.

@jordansquair
Copy link
Collaborator

This would require a more complex design, but does not sound like a bug in libra.

@HelloWorldLTY
Copy link
Author

Emm I think my current idea fits my target well. Besides, I think there is a bug in mixed model like:

A tibble: 6 × 8

cell_type gene avg_logFC p_val p_val_adj de_family de_method de_type

1 Female A1BG 0.0433 0.206 0.894 pseudobulk negbinom LRT
2 Female A1BG-AS1 0.0523 0.0665 0.721 pseudobulk negbinom LRT
3 Female A1CF 0.00689 NA NA pseudobulk negbinom LRT
4 Female A2M -0.366 0.379 0.963 pseudobulk negbinom LRT
5 Female A2M-AS1 0.00708 0.380 0.963 pseudobulk negbinom LRT
6 Female A2ML1 0.00139 NA NA pseudobulk negbinom LRT

This is the output of mixedmodel method. Even if I have selected de_family as mixedmodel, its output still contained pseudobulk. I think it is abnormal.

@jordansquair
Copy link
Collaborator

This bug has been fixed.

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