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 6058a5fc42e390329b79dfde38767814c138b906..bf3955b5e6a6c606dc51b066cf543aa94bdcd471 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
@@ -53,7 +53,8 @@ object SamplesTsvToJson extends ToolCommand {
         val values = tsvLine.split("\t")
         val sample = values(sampleColumn)
         val library = if (libraryColumn != -1) values(libraryColumn) else null
-        val valuesMap = (for (t <- 0 until values.size if t != sampleColumn if t != libraryColumn) yield (header(t) -> values(t))).toMap
+        val valuesMap = (for (t <- 0 until values.size;
+                              if !values(t).isEmpty && t != sampleColumn && t != libraryColumn) yield (header(t) -> values(t))).toMap
         val map: Map[String, Any] = if (library != null) {
           Map("samples" -> Map(sample -> Map("libraries" -> Map(library -> valuesMap))))
         } else {