abra icon indicating copy to clipboard operation
abra copied to clipboard

[Request] Replace System.out.print* statements with System.err.print* for stream compatibility

Open dnbaker opened this issue 9 years ago • 3 comments

The output of ABRA is, unfortunately, not necessarily coordinate-sorted, such that I would prefer to replace any usage with one that piped to samtools #sort. In addition, it would be useful for performance reasons to be able to pipe the output.

By setting --out /dev/stdout, I've been able to have it write the bam to stdout. However, all of the logging statements currently go to stdout rather than stderr, making it impossible to stream. Emitting the parsed-in bed file coordinates also makes it so that filtering by keywords is no longer an option.

I would have fixed it myself, but I ended up messing up some of your tab vs spaces formatting, and I didn't want to assume that I could replace all of your spaces with tabs or vice versa.

dnbaker avatar Jun 22 '16 18:06 dnbaker

I also would like to see this feature included in ABRA. The ability to pipe the output to sort or deduplication will have a huge increase on performance.

jasper1918 avatar Jul 06 '16 14:07 jasper1918

I've made these changes here: https://github.com/mozack/abra/pull/30.

dnbaker avatar Jul 06 '16 17:07 dnbaker

Release v0.97b now logs to stderr instead of stdout. Please note that while these changes are small, that release has only been lightly tested. The release is here if you'd like to try it out:

https://github.com/mozack/abra/releases/tag/v0.97b

Let me know if you run into trouble.

mozack avatar Jul 18 '16 19:07 mozack