RGLab / MAST

Tools and methods for analysis of single cell assay data in R
224 stars 57 forks source link

invalid name for slot of class "BayesGLMLike" #121

Closed cstill1992 closed 3 years ago

cstill1992 commented 4 years ago

Hi guys,

Not sure if this forum or Seurat forum is better to ask this but I'm running into an issue specifically when I try to use Mast within the Seurat package (all other DGE tests still work). The error reads:

Assuming data assay in position 1, with name et is log-transformed. Error in .nextMethod(.Object = .Object, ... = ..., design = design) : invalid name for slot of class “BayesGLMlike”: print.bar

I can't seem to find much on this error, have tried reinstalling the Mast package but didn't really seem to fix the issue.

amcdavid commented 4 years ago

Thanks for the report. This is probably our problem as we refactored aspects of MAST recently. Can you provide a reproducible example https://reprex.tidyverse.org/articles/reprex-dos-and-donts.html https://reprex.tidyverse.org/articles/reprex-dos-and-donts.html, or at least the output from sessionInfo()?

On Oct 17, 2019, at 3:34 PM, cstill1992 notifications@github.com wrote:

Hi guys,

Not sure if this forum or Seurat forum is better to ask this but I'm running into an issue specifically when I try to use Mast within the Seurat package (all other DGE tests still work). The error reads:

Assuming data assay in position 1, with name et is log-transformed. Error in .nextMethod(.Object = .Object, ... = ..., design = design) : invalid name for slot of class “BayesGLMlike”: print.bar

I can't seem to find much on this error, have tried reinstalling the Mast package but didn't really seem to fix the issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/RGLab/MAST/issues/121?email_source=notifications&email_token=AALLAHWU5EXYHCAU64X3JADQPC43PA5CNFSM4JB6OPPKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HSR2E4A, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALLAHVU3FH3CX66M56H6S3QPC43PANCNFSM4JB6OPPA.

cstill1992 commented 4 years ago

Hey David, so when trying to provide you an example from the updated Seurat tutorials (https://satijalab.org/seurat/v3.1/pbmc3k_tutorial.html), I actually fixed the issue. So I found that this error only pops up when I use the option 'print.bar=FALSE' within the Findmarkers command with MAST selected as my test. I've only kept that option in the command as it was in an older version of their vignettes but is now outdated. In case your interested in testing why this occurs I'm including a text file with my R script. Relevant testing data can be found at the above linked vignette. pbmc_Guided_clustering_tutorial.txt

Thanks!

behrouzsh commented 1 year ago

I have a similar problem, I receive this error when FindMarkers(visium_seurat_object, ident.1 = c("9"), test.use = "MAST") Error in .nextMethod(.Object = .Object, ... = ..., design = design) : invalid name for slot of class "BayesGLMlike": norm.method

amcdavid commented 1 year ago

Duplicate of #175.

MeravBirk commented 1 year ago

Duplicate of #175.

same problem..

lopes36363 commented 1 year ago

If you delete SCT.model list from the seurat object, it suddenly works. I could remove it by:

sne[["LOL"]] <- CreateAssayObject(counts = GetAssayData(sne, assay="SCT", slot="data")) #Copy "SCT data" to "LOL counts" and "LOL data" sne <- SetAssayData(sne, assay = "LOL", slot = "scale.data", new.data = GetAssayData(sne, assay="SCT", slot="scale.data")); gc() #"Copy "SCT scale.data" to "LOL scale.data" DefaultAssay(sne) <- "LOL" sne <- DietSeurat(sne, assays = "LOL", counts=T, data=T, scale.data=T) sne <- RenameAssays(sne, LOL = 'SCT')

AmelZulji commented 1 year ago

@lopes36363 you can just specify assay = "RNA" within FindMarkers() and it should work.

Regards

lopes36363 commented 1 year ago

@AmelZulji

Thank you. But here the objective was to use SCT normalized data with MAST. And as far as I understood my trick worked.

Though I believe this bug was fixed with the most recent push of MAST (download mast directly from GitHub, not from bioconductor).

AmelZulji commented 1 year ago

@lopes36363 sorry, it wasn't clear to me that the aim was to use it with SCT.

development version works smooth, thanks!