Open nihalasalem opened 3 years ago
update: I got the same issue as well while running "MAST"
Column cell_type
is not found.
DE method should be "DESeq2" not "DEseq2". Can you fix that and see if it works?
I encountered the same issue and can confirm it persists after correct spelling of "DESeq2" or 'MAST'.
It only worked when I used on Seurat object , but not through providing count matrix and metadata separately
Pushed a fix - hopefully this works. Or else maybe you can send me a small sample of your data to figure out what is going on. Let me know!
Have this issue got fixed? I encountered this error no matter which types of input data and DE methods I use. The error hints me there might be something wrong with the final dplyr::arrange() part of run_de().
Please provide a reproducible example and/or a subset of your data that is causing the issue.
I have sent you a e-mail through your gmail address. Many thanks for your help!
Libra does binary comparisons. You have 3 labels so that is why you have an error. You just need to loop over your comparisons. For example:
` library(Libra) library(Seurat)
sc = readRDS("~/Downloads/test.rds")
DefaultAssay(sc) = 'RNA' groups = unique(sc$label) comparisons = tidyr::crossing( group1 = groups, group2 = groups ) %>% filter(group1 > group2)
results = c() for (i in 1:nrow(comparisons)) { Idents(sc) = sc$label group1 = comparisons[i,]$group1 group2 = comparisons[i,]$group2 sc0 = subset(sc, idents = c(group1, group2)) de = run_de(sc0) %>% mutate(group1 = group1, group2 = group2) results %<>% bind_rows(de) } `
Libra does binary comparisons. You have 3 labels so that is why you have an error. You just need to loop over your comparisons. For example:
` library(Libra) library(Seurat)
sc = readRDS("~/Downloads/test.rds")
DefaultAssay(sc) = 'RNA' groups = unique(sc$label) comparisons = tidyr::crossing( group1 = groups, group2 = groups ) %>% filter(group1 > group2)
results = c() for (i in 1:nrow(comparisons)) { Idents(sc) = sc$label group1 = comparisons[i,]$group1 group2 = comparisons[i,]$group2 sc0 = subset(sc, idents = c(group1, group2)) de = run_de(sc0) %>% mutate(group1 = group1, group2 = group2) results %<>% bind_rows(de) } `
Does it mean that I have to compare C1, C2, C3 labels by C1--(C2+C3), C2--(C1+C3), and C3--(C1+C2)?
You can do it however you see fit. Either pairwise or as you proposed. This does not seem like a Libra problem anymore so much as an experimental design question.
Thank you so much for developing a very comprehensive tool. I was able to run edgeR with LRT and Limma. However when I try to run DEseq2 I get this error. Error: Must group by variables found in
.data
.cell_type
is not found. The code I am running is DE_seq = run_de(expr, meta = pfc_meta_deseq,de_family='pseudobulk',de_method="DEseq2",de_type="LRT",n_threads = 8)the colnames in pfc_meta_deseq are "replicate" "label" "cell_type" and the colnames in expr are the cell barcodes