satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.29k stars 915 forks source link

FindMarkers Error with DESeq2 #6789

Closed GEmilioHO closed 1 year ago

GEmilioHO commented 1 year ago

Hi,

I am trying to identify differentially expressed genes between two cell identities using DESeq2:

markers.astro <- FindMarkers(ctrl.seurat, ident.2 = "Astrocytes_control", ident.1 = "Astrocytes_neurog2", test.use = "DESeq2")

However, I'm getting the following error:

Error in CheckDots(..., fxns = "DESeq2::results") : 
  None of the functions passed could be found

I have Seurat v4.3.0 and DESeq2 v1.38.1.

Thank you!

GEmilioHO commented 1 year ago

I think I've found the bug. It's on the line 1364 of differential_expression.R. Should be:

CheckDots(..., fxns = DESeq2::results)

and line 1378 has to be changed to:

  res <- DESeq2::results(
    object = dds1,
    contrast = c("group", "Group1", "Group2"),
    alpha = 0.05,
  )
saketkc commented 1 year ago

Thanks for the bug report @GEmilioHO! I am unable to reproduce this with the latest set of changes in the develop branch. If you are still facing issues, can you open a new issue?

Example from the vignette:

FindMarkers(ifnb.mrgd, ident.1 = "CTRL", ident.2 = "STIM", group.by = "stim", test.use = "DESeq2") %>% head()
converting counts to integer mode
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
         p_val avg_log2FC pct.1 pct.2 p_val_adj
ISG15        0 -4.9325077 0.286 0.994         0
SH3BGRL3     0  0.6488476 0.870 0.786         0