mozack / abra

Assembly Based ReAligner
MIT License
71 stars 12 forks source link

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

Open dnbaker opened 8 years ago

dnbaker commented 8 years ago

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.

jasper1918 commented 8 years ago

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.

dnbaker commented 8 years ago

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

mozack commented 8 years ago

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.