Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
3fb6b5f8
Commit
3fb6b5f8
authored
Jan 19, 2016
by
Peter van 't Hof
Browse files
Fixed error message in bamutils
parent
defe2788
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/BamUtils.scala
View file @
3fb6b5f8
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment