Commit 6132f59d authored by Peter van 't Hof's avatar Peter van 't Hof

Fix compile error

parent dc3a744f
...@@ -140,34 +140,24 @@ object BedRecordList { ...@@ -140,34 +140,24 @@ object BedRecordList {
def fromList(records: TraversableOnce[BedRecord]): BedRecordList = fromListWithHeader(records, Nil) def fromList(records: TraversableOnce[BedRecord]): BedRecordList = fromListWithHeader(records, Nil)
/** /**
* This creates a [[BedRecordList]] based on multiple files * This creates a [[BedRecordList]] based on multiple files. This method combines overlapping regions
* *
* @param bedFiles Input bed files * @param bedFiles Input bed files
* @return * @return
*/ */
def fromFiles(bedFiles: File*) = {
fromFiles(bedFiles, combine = false)
}
/**
* This creates a [[BedRecordList]] based on multiple files. This method combines overlapping regions
*
* @param bedFiles Input bed files
* @return
*/
def fromFilesCombine(bedFiles: File*) = { def fromFilesCombine(bedFiles: File*) = {
fromFiles(bedFiles, combine = true) fromFiles(bedFiles, combine = true)
} }
/** /**
* This creates a [[BedRecordList]] based on multiple files * This creates a [[BedRecordList]] based on multiple files
* *
* @param bedFiles Input bed files * @param bedFiles Input bed files
* @param combine When true overlaping regions are merged * @param combine When true overlaping regions are merged
* @return * @return
*/ */
def fromFiles(bedFiles: Seq[File], combine: Boolean = false) = { def fromFiles(bedFiles: Seq[File], combine: Boolean = false) = {
val list = bedFiles.foldLeft(empty)((a,b) => fromList(fromFile(b).allRecords ++ a.allRecords)) val list = bedFiles.foldLeft(empty)((a, b) => fromList(fromFile(b).allRecords ++ a.allRecords))
if (combine) list.combineOverlap if (combine) list.combineOverlap
else list else list
} }
......
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