Commit f365755d authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added utr features

parent 68b01fdc
......@@ -47,6 +47,18 @@ case class BedRecord(chr: String,
}))
} else None
lazy val utr5 = (strand, thickStart, thickEnd) match {
case (Some("+"), Some(tStart), Some(tEnd)) => Some(BedRecord(chr, start, tStart - 1, name.map(_ + "_utr5")))
case (Some("-"), Some(tStart), Some(tEnd)) => Some(BedRecord(chr, tEnd + 1, end, name.map(_ + "_utr5")))
case _ => None
}
lazy val utr3 = (strand, thickStart, thickEnd) match {
case (Some("-"), Some(tStart), Some(tEnd)) => Some(BedRecord(chr, start, tStart - 1, name.map(_ + "_utr3")))
case (Some("+"), Some(tStart), Some(tEnd)) => Some(BedRecord(chr, tEnd + 1, end, name.map(_ + "_utr3")))
case _ => None
}
override def toString = {
def arrayToOption[T](array: Array[T]): Option[Array[T]] = {
if (array.isEmpty) None
......
Markdown is supported
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