Skip to content
Snippets Groups Projects
Commit 3fb6b5f8 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fixed error message in bamutils

parent defe2788
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,8 @@ object BamUtils {
val inputSam = SamReaderFactory.makeDefault.open(file)
val samples = inputSam.getFileHeader.getReadGroups.map(_.getSample).distinct
if (samples.size == 1) samples.head -> file
else throw new IllegalArgumentException("Bam contains multiple sample IDs: " + file)
else if (samples.size > 1) throw new IllegalArgumentException("Bam contains multiple sample IDs: " + file)
else throw new IllegalArgumentException("Bam does not contain sample ID or have no readgroups defined: " + file)
}
if (temp.map(_._1).distinct.size != temp.size) throw new IllegalArgumentException("Samples has been found twice")
temp.toMap
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment