-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: grouping factors must have > 1 sampled level #146
Comments
Look at the crosstabulation of what you're actually modeling. |
Ah that makes so much sense! Thank you for your quick response. In that case, do you think filtering the data for each cluster in the following way could help fix this issue: A gene should be expressed in at least 10% (just as an example) of the wild type or mutant cells of a given cluster. I believe the FindMarkers function in Seurat, which provides an option to use MAST for DE analysis, implements a thresholding rule like this. Is there a similar way I could filter my data in MAST prior to zlm or in the same function as zlm? Thank you again! Esra |
Basically yes. When I do per cluster analysis I'll do the filtering in a loop. There's no specific API for this in MAST. |
I see. Thank you again! Given the need for cluster-specific filtering prior to zlm with random effect, I assume that cellular detection rate should be re-calculated for each cluster after filtering. Could you please confirm if that is accurate? Esra |
Dear MAST Team,
I am trying to use MAST for genotype-based differential expression analysis in a number of cell-type specific clusters that I identified in my single cell RNA-Seq data. I have two genotypes (wild type and a mutant strain with a hemizygous deletion of 21 genes). I have 4 replicates per genotype, so 8 mice in total (metadata on replicate ids is referred to as orig.ident below). Due to concerns related to pseudo-replication, I would like to add a random effect for replicate to my model. However, when I try to run the code pasted below, I get an error that states:
The pipeline does not crash in response to this error, but I would like to understand what is causing the error message. Any feedback would be appreciated.
Note: I performed my data preprocessing and clustering using Seurat. Hence, I first had to transform my Seurat object into an SCA object. I believe I followed the vignette correctly, but in case the error is caused by a mistake in one of the steps prior to running zlm, I included all relevant code:
Thank you for any help you can give me!
Esra
The text was updated successfully, but these errors were encountered: