Commit d207b97f authored by bow's avatar bow
Browse files

Update None pattern match to use catch-all clause

parent c1ccaa97
......@@ -48,7 +48,7 @@ class Cutadapt(root: Configurable, fastqc: Fastqc, readName: String) extends nl.
case Some(n) => n -> Map("sequence" -> seq, "count" -> count)
// adapter sequence is clipped but not found by FastQC ~ should not happen since all clipped adapter
// sequences come from FastQC
case None =>
case _ =>
throw new IllegalStateException(s"Adapter '$seq' is clipped but not found by FastQC in 'clipping_$readName'.")
}
}.toMap
......@@ -58,7 +58,7 @@ class Cutadapt(root: Configurable, fastqc: Fastqc, readName: String) extends nl.
Map.empty[String, Map[String, Any]]
}
// "adapters" key not found ~ something went wrong in our part
case None => throw new RuntimeException(s"Required key 'adapters' not found in stats entry 'clipping_$readName'.")
case _ => throw new RuntimeException(s"Required key 'adapters' not found in stats entry 'clipping_$readName'.")
}
initStats.updated("adapters", adapterCounts)
}
......
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