From 4b3972ae106c56a4653ee211bc5dc5d384e08c35 Mon Sep 17 00:00:00 2001 From: Peter van 't Hof <p.j.van_t_hof@lumc.nl> Date: Sun, 16 Aug 2015 15:26:23 +0200 Subject: [PATCH] Added an exeption when lines has not the same columns as the header --- .../main/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJson.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJson.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJson.scala index f30a45c01..15b84f086 100644 --- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJson.scala +++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJson.scala @@ -52,6 +52,7 @@ object SamplesTsvToJson extends ToolCommand { val librariesValues: List[Map[String, Any]] = for (tsvLine <- lines.tail) yield { val values = tsvLine.split("\t") + require(header.length == values.length, "Number columns is not the same as the header") val sample = values(sampleColumn) val library = if (libraryColumn != -1) Some(values(libraryColumn)) else None if (sampleLibCache.contains((sample, library))) -- GitLab