From b895d10ea2b0e10566d734028f52316c49ca0963 Mon Sep 17 00:00:00 2001
From: Peter van 't Hof <p.j.van_t_hof@lumc.nl>
Date: Sat, 22 Aug 2015 13:15:57 +0200
Subject: [PATCH] Switch strand to Option[Boolean]

---
 .../lumc/sasc/biopet/utils/intervals/BedRecord.scala   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecord.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecord.scala
index d581f248d..320a98a1e 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecord.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecord.scala
@@ -8,7 +8,7 @@ case class BedRecord(chr: String,
                      end: Int,
                      name: Option[String] = None,
                      score: Option[Double] = None,
-                     strand: Boolean = true,
+                     strand: Option[Boolean] = None,
                      thickStart: Option[Int] = None,
                      thickEnd: Option[Int] = None,
                      rgbColor: Option[(Int, Int, Int)] = None,
@@ -32,11 +32,11 @@ object BedRecord {
       values(2).toInt,
       values.lift(3),
       values.lift(4).map(_.toInt),
-      values.lift(5) match {
-        case Some("-") => false
-        case Some("+") => true
+      values.lift(5).map(_ match {
+        case "-" => false
+        case "+" => true
         case _ => throw new IllegalStateException("Strand (column 6) must be '+' or '-'")
-      },
+      }),
       values.lift(6).map(_.toInt),
       values.lift(7)map(_.toInt),
       values.lift(8).map(_.split(",", 3).map(_.toInt)).map(x => (x.lift(0).getOrElse(0),x.lift(1).getOrElse(0),x.lift(2).getOrElse(0))),
-- 
GitLab