Skip to content
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

ValueError: The first guess on the deviance function returned a nan. This could be a boundary problem and should be reported. #366

Open
mohammedali452 opened this issue Feb 6, 2025 · 5 comments

Comments

@mohammedali452
Copy link

I get the issue from the title when running dds.deseq2() after initializing dds as a DeseqDataSet. Any suggestions on how to fix this error?

@BorisMuzellec
Copy link
Collaborator

Hi @mohammedali452, could you provide a MWE to reproduce this behaviour?

@mohammedali452
Copy link
Author

dds = DeseqDataSet(counts=test_gene_expression_df, metadata=test_metadata_df,design_factors="Cluster") dds.deseq2()
Let me know if you need to look at the counts and metadata dataframes.

@BorisMuzellec
Copy link
Collaborator

Let me know if you need to look at the counts and metadata dataframes.

Yes, if possible

@BorisMuzellec
Copy link
Collaborator

BorisMuzellec commented Feb 17, 2025

@mohammedali452 are you performing any gene / sample filtering step?

Your data is very sparse: it's 98% zeroes and more than half of your genes have full zero counts. I don't think DESeq2/ PyDESeq2 can handle this level of sparsity.

Is this single-cell data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants