CBMR-Single-Cell-Omics-Platform / SCOPfunctions

An R package of functions for single cell -omics analysis.
GNU Affero General Public License v3.0
8 stars 7 forks source link

Error in running DE analysis #2

Open ruiye88 opened 2 years ago

ruiye88 commented 2 years ago

Hi, thank you for implementing the DE analysis using MAST with random effects. I tried the function but encountered following error: Error in [.data.frame(x, i, j) : object 'Pr(>Chisq)' not found. I'm wondering whether you have solutions to solve this error. Thank you!

kwells4 commented 2 years ago

This is a problem with how data.table is used in packages. Packages must be data.table aware to function properly. This is described in depth here

In this case, one line needs to be added to the DESCRIPTION

Depends:
    data.table

You would then need to redo the documentation with devtools. I've generated a fork that has the correct documentation for use with data.table which you can find here and install with

devtools::install_github("kwells4/SCOPfunctions")

Note, this will overwrite your existing SCOPfunctions package, but the only changes I made were to the DESCRIPTION and NAMESPACE.

lucygarner commented 1 year ago

Am I likely to run into this error if I use the DE_MAST_RE_seurat function?

kwells4 commented 1 year ago

Am I likely to run into this error if I use the DE_MAST_RE_seurat function?

DE_MAST_RE_seurat is the function that was throwing the error. Installing from my fork should fix the problem.

kcavagnero commented 11 months ago

Hi, I was excited to find this package with MAST-RE that plays well with Seurat. I am however also getting an error when running DE with the following code:

df_DE = SCOPfunctions::DE_MAST_RE_seurat(object=y, random_effect.vars='patient', test.use = "MAST", ident.1 = "disease", ident.2 = "control")

Error in .nextMethod(.Object = .Object, ... = ..., design = design): invalid name for slot of class “LMERlike”: test.use

Any idea how to fix?