mckennalab / FlashFry

FlashFry: The rapid CRISPR target site characterization tool
Other
64 stars 10 forks source link

"discover" output file field <otCount> format issue #3

Closed moritzschaefer closed 7 years ago

moritzschaefer commented 7 years ago

The format of the field is a character instead of an int. Example: Analyzing the BRD4 gene, I get for the first target 90 off-targets. Though in the otCount, a 'Z' is written (which has the value 90 in ASCII). For this reason the scoring step fails (as it can't interpret the character).

The issue is here: https://github.com/aaronmck/FlashFry/blob/db4d2f441c52cb561f87855c54ee15aee45da5db/src/main/scala/targetio/TabDelimitedHandler.scala#L110

https://docs.oracle.com/javase/7/docs/api/java/io/PrintWriter.html says void | write(int c): Writes a single character.

So a int-to-string conversion is necessary there.

How comes you didn't stumble upon this issue?

aaronmck commented 7 years ago

This bug was just introduced in commit 5b2d3890ab929bc87bcd5d0b06e71bff8ed4c704 where I switched from a write(int + string), which writes a string, to a write(int). I didn't put unit testing in for the output, something I should do.