Commit b397262c authored by bow's avatar bow
Browse files

Use Seq instead of Array for immutability + easier comparison

parent 337a2abe
......@@ -70,7 +70,7 @@ object WipeReads {
=> parseOption(opts ++ Map("limitToRegion" -> true), tail)
// TODO: better way to parse multiple flag values?
case ("--readGroup" | "-RG") :: value :: tail if !opts.contains("readGroup")
=> parseOption(opts ++ Map("readGroup" -> value.split(",")), tail)
=> parseOption(opts ++ Map("readGroup" -> value.split(",").toSeq), tail)
case option :: tail
=> throw new IllegalArgumentException("Unexpected or duplicate option flag: " + option)
}
......
......@@ -109,13 +109,13 @@ class WipeReadsUnitTest extends Assertions {
@Test def testOptSingleReadGroup() = {
val argList = List("--readGroup", "g1") ::: minArgList
val opts = parseOption(Map(), argList)
assert(Array("g1").sameElements(opts("readGroup")))
assert(opts("readGroup") == Seq("g1"))
}
@Test def testOptMultipleReadGroup() = {
val argList = List("--readGroup", "g1,g2") ::: minArgList
val opts = parseOption(Map(), argList)
assert(Array("g1", "g2").sameElements(opts("readGroup")))
assert(opts("readGroup") == Seq("g1", "g2"))
}
}
......
Supports Markdown
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