Commit f0cccdd0 authored by Sander van der Zeeuw's avatar Sander van der Zeeuw

Build in check for passing correct interval to the tool.

parent 8eb7deef
......@@ -63,7 +63,7 @@ object ExtractAlignedFastq extends ToolCommand {
def intFromCoord(s: String): Int = s.replaceAll(",", "").replaceAll("\\.", "").toInt
inStrings.map {
case ptn1(chr, start, end) => new Interval(chr, intFromCoord(start), intFromCoord(end))
case ptn1(chr, start, end) if intFromCoord(end) > intFromCoord(start) => new Interval(chr, intFromCoord(start), intFromCoord(end))
case ptn2(chr, start) =>
val startCoord = intFromCoord(start)
new Interval(chr, startCoord, startCoord)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment