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 f30a45c017e6273f41ebde9b1b9aae322e482101..15b84f0865e209f1fec4324f3a8fa510f77b551f 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)))