kcleal / pywfa

Python wrapper for wavefront alignment using WFA2-lib
MIT License
35 stars 2 forks source link

Providing output path for `WavefrontAligner.cigar_print_pretty()` doesn't suppress stderr #10

Closed rlorigro closed 1 year ago

rlorigro commented 1 year ago

Hi,

Thanks for making this convenient python package. I've noticed that if I write the formatted alignment to a file using aligner.cigar_print_pretty("/path/to/file.txt") that it still dumps quite a lot of cigar string text to stderr. It would be great to suppress this so that time isn't wasted printing things, and so the output is still readable.

Thanks

kcleal commented 1 year ago

Hey @rlorigro, Ah yes, I see what you mean. I think this is a bug in WFA2-lib code rather than pywfa - the cigar_print_pretty function still uses stderr instead of the supplied file. I'll fix this for pywfa and put in an issue for WFA2lib

kcleal commented 1 year ago

Ive uploaded a patch to pypi - `pip install pywfa. This should now put everything in the target file rather than some of it to stderr.

rlorigro commented 1 year ago

Awesome thanks for the quick fix