A quick question about application of liner mixed model method to detect degs
HelloWorldLTY opened this issue · 7 comments
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.
It's hard to know exactly what you mean? Is there an actual bug in Libra for this?
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 = data@meta.data
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.
I don't understand why you would make cell type gender. Do you not have cell types?
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.
This would require a more complex design, but does not sound like a bug in libra.
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.
This bug has been fixed.