From 9748f8e8d16184cf27b9ff9a94226df70b572caa 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:55:17 +0200 Subject: [PATCH] Adding originals to combined --- .../nl/lumc/sasc/biopet/utils/intervals/BedRecordList.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordList.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordList.scala index d2969ec0c..abd469a34 100644 --- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordList.scala +++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/intervals/BedRecordList.scala @@ -62,7 +62,9 @@ object BedRecordList { val overlapRecords = records.takeWhile(_.start <= records.head.end) val end = overlapRecords.map(_.end).max - newRecords += BedRecord(chr, start, end) + val newRecord = BedRecord(chr, start, end) + newRecord._originals = overlapRecords + newRecords += newRecord combineOverlap(records.drop(overlapRecords.length), newRecords) } else newRecords.toList } -- GitLab