goatools icon indicating copy to clipboard operation
goatools copied to clipboard

`log = None` cannot complete suppress stdout in GOEnrichmentStudyNS

Open illumination-k opened this issue 2 years ago • 2 comments

Thanks for the great project!

I want to stop logging completely, but __init__ function in GOEnrichmentStudy has print regardless of log kwd, so I cannot.

https://github.com/tanghaibao/goatools/blob/d3a63f9738efcdb9f2f49e40cf1fadeb58de9bac/goatools/go_enrichment.py#L256

I think if log is None, nothing should be output to stdout. This is not a so big problem, but not useful when redirecting or something.

illumination-k avatar Apr 03 '22 05:04 illumination-k

@illumination-k

Thank you for the issue report. I added the fix that considered the log keyword.

tanghaibao avatar Apr 03 '22 23:04 tanghaibao

@dvklopfenstein

Longer-term, we could move to using logging instead of using prt and log parameter throughout the code, as suggested in #159.

tanghaibao avatar Apr 03 '22 23:04 tanghaibao