RGLab / MAST

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

Error: invalid name for slot of class “BayesGLMlike”: logfc.tLReshold #174

Closed avpatel18 closed 1 year ago

avpatel18 commented 1 year ago

Hello everyone, I am using MAST package with Seurat to FindAllMarkers and it keep giving me above error. My full scRNAseq analysis pipeline is as follow. Please help! Thanks!

STDY7388998 <- Read10X_h5(filename = "Lymphocyte_count_h5_files/4820STDY7388998_filtered_feature_bc_matrix.h5", use.names = TRUE, unique.features = TRUE)
STDY7388998 <- perform.scrublet(counts = `STDY7388998`)
STDY7388998 <- CreateSeuratObject(counts = STDY7388998, project = 'Lymphocyte', min.cells = 3, min.features = 200)
STDY7388998$mitopercentage <- PercentageFeatureSet(STDY7388998, pattern = "^MT-")
STDY7388998 <- subset(STDY7388998, subset = nFeature_RNA > 200 & nFeature_RNA < sum(sd(STDY7388998$nFeature_RNA)*3)+median(STDY7388998$nFeature_RNA) & mitopercentage < 10)
STDY7388998 <- SCTransform(STDY7388998, vars.to.regress = "mitopercentage", method = "glmGamPoi", verbose = TRUE)
STDY7388998 <- RunPCA(object = STDY7388998, assay = "SCT", features = VariableFeatures(object = STDY7388998), npcs = 50)
STDY7388998 <- RunHarmony(object = STDY7388998, assay.use = 'SCT', reduction = "pca", group.by.vars = "orig.ident", plot_convergence = TRUE)
STDY7388998 <- FindNeighbors(object = STDY7388998, reduction = "harmony", dims = 1:20)
STDY7388998 <- FindClusters(object = STDY7388998, resolution = c(0.6, 1.0))
Idents(object = STDY7388998) <- "SCT_snn_res.1"
STDY7388998 <- RunUMAP(object = STDY7388998, reduction = 'harmony', dims = 1:20)
STDY7388998 <- PrepSCTFindMarkers(STDY7388998, assay = "SCT", verbose = TRUE)
STDY7388998_markers <- FindAllMarkers(STDY7388998, only.pos = TRUE, min.pct = 0.25, logfc.tLReshold = 0.25, verbose = T, test.use = "MAST")

#output
Warning: No DE genes identified
Warning: The following tests were not performed: 
Warning: When testing 0 versus all:
    invalid name for slot of class “BayesGLMlike”: logfc.tLReshold
amcdavid commented 1 year ago

Hi, You have a typo in the ‘logfc.tLReshold’ argument, and Seurat is passing unmatched arguments up to MAST, which is why the error is triggered there.

On Sat, Sep 24, 2022 at 10:56 AM Avaptel18 @.***> wrote:

Hello everyone, I am using MAST package with Seurat to FindAllMarkers and it keep giving me above error. My full scRNAseq analysis pipeline is as follow. Please help! Thanks!

STDY7388998 <- Read10X_h5(filename = "Lymphocyte_count_h5_files/4820STDY7388998_filtered_feature_bc_matrix.h5", use.names = TRUE, unique.features = TRUE) STDY7388998 <- perform.scrublet(counts = STDY7388998) STDY7388998 <- CreateSeuratObject(counts = STDY7388998, project = 'Lymphocyte', min.cells = 3, min.features = 200) STDY7388998$mitopercentage <- PercentageFeatureSet(STDY7388998, pattern = "^MT-") STDY7388998 <- subset(STDY7388998, subset = nFeature_RNA > 200 & nFeature_RNA < sum(sd(STDY7388998$nFeature_RNA)*3)+median(STDY7388998$nFeature_RNA) & mitopercentage < 10) STDY7388998 <- SCTransform(STDY7388998, vars.to.regress = "mitopercentage", method = "glmGamPoi", verbose = TRUE) STDY7388998 <- RunPCA(object = STDY7388998, assay = "SCT", features = VariableFeatures(object = STDY7388998), npcs = 50) STDY7388998 <- RunHarmony(object = STDY7388998, assay.use = 'SCT', reduction = "pca", group.by.vars = "orig.ident", plot_convergence = TRUE) STDY7388998 <- FindNeighbors(object = STDY7388998, reduction = "harmony", dims = 1:20) STDY7388998 <- FindClusters(object = STDY7388998, resolution = c(0.6, 1.0)) Idents(object = STDY7388998) <- "SCT_snn_res.1" STDY7388998 <- RunUMAP(object = STDY7388998, reduction = 'harmony', dims = 1:20) STDY7388998 <- PrepSCTFindMarkers(STDY7388998, assay = "SCT", verbose = TRUE) STDY7388998_markers <- FindAllMarkers(STDY7388998, only.pos = TRUE, min.pct = 0.25, logfc.tLReshold = 0.25, verbose = T, test.use = "MAST")

output

Warning: No DE genes identified Warning: The following tests were not performed: Warning: When testing 0 versus all: invalid name for slot of class “BayesGLMlike”: logfc.tLReshold

insert reprex here

— Reply to this email directly, view it on GitHub https://github.com/RGLab/MAST/issues/174, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALLAHVSQVQ4SJGHJWKO52DV746F3ANCNFSM6AAAAAAQUXQ7BI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

avpatel18 commented 1 year ago

Thanks! All working fine now😊