chopper icon indicating copy to clipboard operation
chopper copied to clipboard

WIP: Added the option to output contaminant reads to file

Open SteampunkIslande opened this issue 1 year ago • 2 comments

That's a feature I needed, it would be nice to be able to output contaminant reads in a separate file.

This PR does exactly that, but there are a few points I'd like to discuss with the maintainers:

  • First, I made the tests pass even when mistakingly writing reads with missing line feeds. So I'd like to improve the tests to make sure I didn't break anything.
  • Second, if I understand correctly, the inverse flag of the CLI makes chopper output the 'failing' reads. Maybe we could replace this flag with dedicated file outputs.
  • And last but not least, I am a pretty bad Rust developer, so I didn't find another way of protecting concurrent writes other than that terrible Arc<Mutex<Box<dyn Write + Send>>>. There must be another simpler, more elegant technique ^^

Anyway, thanks for reading this through, have a good day :)

SteampunkIslande avatar Nov 20 '24 15:11 SteampunkIslande

Hi,

Thanks for contributing! I will look at the code you wrote. Did you perhaps benchmark the time your version takes compared to the latest release?

Best, Wouter

wdecoster avatar Nov 20 '24 21:11 wdecoster

Did you perhaps benchmark the time your version takes compared to the latest release?

I'm sorry, I didn't. There might indeed be a performance cost, but overall it seems to be working just fine

SteampunkIslande avatar Nov 20 '24 23:11 SteampunkIslande