-
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 in validObject(.Object): invalid class “corMatrix” object: 'sd' slot has nonfinite elements #180
Comments
What does traceback() say? This looks like it might be originating from
glmer.
…On Mon, Sep 18, 2023 at 10:59 AM Derrik Gratz ***@***.***> wrote:
*Otherwise*
I am trying to run MAST with a full single-cell dataset of multiple
identified CD8 cell subtypes, one condition with two factors, and two
timepoints. I am trying to run everything in one model since all the CD8s
are being processed together, but perhaps it would be better to split by
celltype, although I ran a similar model successfully for combined CD4
subtypes. See the chunk below for my model formula
zlmCond <- zlm(~ cdr +
cluster_labels +
condition +
timepoint +
condition:timepoint +
cluster_labels:condition +
cluster_labels:timepoint +
cluster_labels:condition:timepoint +
(1|hash.ID),
obj.sce,
method = 'glmer',
ebayes = FALSE,
exprs_values = 'logcounts',
fitArgsD = list(nAGQ=0),
parallel = TRUE,
silent = FALSE)
The model starts running but fails ~8% of the way through with this error:
Error in validObject(.Object) :
invalid class “corMatrix” object: 'sd' slot has nonfinite elements
Again I was able to run this model formula successfully on a CD4 subset
from the same dataset. Any idea what might be causing this?
—
Reply to this email directly, view it on GitHub
<#180>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALLAHX3KXHJFMULQF3DX5TX3CDY7ANCNFSM6AAAAAA45DDB4I>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I subsetted the data by celltype to allow for a simpler design. The issue still occurs with the following model on one portion of my data with 1061 cells
|
Thanks. This actually looks like a bug in lmer/glmer in that it managed to fit the model but somehow was left in an undefined state. Unless/until lme4 fixes this, I can add another test to try to trap this... |
I tried subsetting to the problem cells and running it without |
I pinned down a possible cause: I wasn't properly filtering out genes with low expression threshold. The problem gene in this case had 3(!) cells expressing it. When I remove that gene the model runs fine. |
Even running the more complex model (not subset for celltypes) worked when removing genes expressed in less than 100 cells. So this issue may only arise if you don't follow the preprocessing steps correctly. I'm fine for this to be closed, unless you want to leave it open to prompt a patch on your end |
Otherwise
I am trying to run MAST with a full single-cell dataset of multiple identified CD8 cell subtypes, one condition with two factors, and two timepoints. I am trying to run everything in one model since all the CD8s are being processed together, but perhaps it would be better to split by celltype, although I ran a similar model successfully for combined CD4 subtypes. See the chunk below for my model formula
The model starts running but fails ~8% of the way through with this error:
Again I was able to run this model formula successfully on a CD4 subset from the same dataset. Any idea what might be causing this?
The text was updated successfully, but these errors were encountered: