This is a test version of Biostars. For the public version, visit https://www.biostars.org.
MAST for scRNA-seq

Hi all, is there an easier (read: dumbed-down) tutorial for someone wanting to use MAST to do scRNA-seq DEG analysis? I feel comfortable extracting the counts matrix from a Seurat object and converting the 'cell x gene' table into a 'sample x gene' table for pseudobulk approaches (e.g., DESeq2, edgeR, etc.).

However, I'm struggling with the Bioconductor tutorial for MAST as it doesn't start off with a subsetted cluster from a Seurat object (https://www.bioconductor.org/packages/release/bioc/vignettes/MAST/inst/doc/MAITAnalysis.html).

I'm still a beginner, but hoping to benchmark this strategy against the other ones I feel more comfortable with. I've searched through several journals (e.g., Nature) since they generally require authors to submit their code as well, but pretty much all the articles I've come across use MAST within Seurat itself (using FindMarkers) which is not what I want to do. Any advice/tips would be much appreciated!

seurat mast scrnaseq

I try to convert a Seurat object into a SingleCellExperiment object, followed by "SceToSingleCellAssay":

sce <- as.SingleCellExperiment(DietSeurat(seurat_obj))
sca <- MAST::SceToSingleCellAssay(sce, class = "SingleCellAssay")

But I get the following error:

Error in sanity_check_sca(obj) : Assay in position 2, with name logcounts is unlogged. Set `check_sanity = FALSE` to override and then proceed with caution.

I'm not sure what to do there. Any help would be appreciated. Thanks!

1 answer

DefaultAssay(seurat_obj) <- 'RNA'
Idents(seurat_obj)  <- "SampleID"   # set the Idents to the column you want to group by
counts <- AverageExpression(seurat_obj, slot = 'counts')

You can now use counts with FindMarkers and set test.use = "MAST", or extract the raw counts matrix with counts$RNA and run MAST like you would do with any counts matrix.

Note that your pseudobulk is the result of averaging, and not summing the counts.

--- Update

Looking at the code in github, it seems that PseudobulkExpression, which is called by AverageExpression, also supports aggregation (pb.method = "aggregate").

Log in to answer this question.