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
5b340f1e
Commit
5b340f1e
authored
Oct 05, 2014
by
bow
Browse files
Update WipeReads mate query to propagate exceptions
parent
149f43d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/apps/WipeReads.scala
View file @
5b340f1e
...
...
@@ -110,10 +110,14 @@ object WipeReads {
// TODO: can we accumulate errors / exceptions instead of ignoring them?
def
monadicMateQuery
(
inBAM
:
SAMFileReader
,
rec
:
SAMRecord
)
:
Option
[
SAMRecord
]
=
try
{
Some
(
inBAM
.
queryMate
(
rec
))
}
catch
{
case
e
:
Exception
=>
None
// catching unpaired read here since queryMate will raise an exception if not
if
(!
rec
.
getReadPairedFlag
)
{
None
}
else
{
inBAM
.
queryMate
(
rec
)
match
{
case
null
=>
None
case
qres
@
_
=>
Some
(
qres
)
}
}
// filter function for read IDs
...
...
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