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

[BUG] DeseqDataSet.deseq2() still prints when quiet=True is set #287

Open
yihming opened this issue Jun 9, 2024 · 4 comments
Open

[BUG] DeseqDataSet.deseq2() still prints when quiet=True is set #287

yihming opened this issue Jun 9, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@yihming
Copy link
Contributor

yihming commented Jun 9, 2024

Describe the bug

My following code

from pydeseq2.dds import DeseqDataSet
from pydeseq2.default_inference import DefaultInference

inference = DefaultInference(n_cpus=1)

dds = DeseqDataSet(counts=..., metadata=..., design_factors=..., inference=inference, quiet=True)
dds.deseq2()

still prints the following 3 sentences when quiet=True, while from the source code they should be controlled by quiet parameter:

Fitting dispersions...
... done in 0.20 seconds.

Fitting MAP dispersions...
... done in 0.22 seconds.

Fitting LFCs...
... done in 0.17 seconds.

To Reproduce

This case happens for some data, not all. However, my case uses internal data, so I may have to do some anonymization work before sharing it with you.

Expected behavior

These sentences should not be printed if quiet=True is set.

Screenshots

Already shown above.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04.4 LTS
  • Version: pydeseq2 v0.4.9

Additional context
Add any other context about the problem here.

@yihming yihming added the bug Something isn't working label Jun 9, 2024
@umarteauowkin
Copy link
Collaborator

Hi ! Thanks for reporting. I haven't been able to reproduce yet. Could you assess if the self.quiet attribute has been changed during the pipeline ? (typically by debugging before printing one of these three sentences). It would be a great help. Thanks !

@yihming
Copy link
Contributor Author

yihming commented Jun 13, 2024

Hi @umarteauowkin ,

In the attachment is a test file which triggers the issue at my side. The counts is count_df.csv, and metadata is metadata.csv. The design factor is condition, and contrast is ["condition", "A", "B"].

count_df.csv
metadata.csv

@yihming
Copy link
Contributor Author

yihming commented Jun 13, 2024

And just let you know that all the 3 places show that self.quiet is False. However, I cannot find any other places where self.quiet is changed in dds.py file.

However, if I print self.quiet before and after each step in deseq2 function, it's all True...

@umarteauowkin
Copy link
Collaborator

I m quite puzzled here. I will take a look (but maybe more in July as this is not too blocking). Thanks for the minimal example !

@umarteauowkin umarteauowkin self-assigned this Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants