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
b83f5736
Commit
b83f5736
authored
Dec 04, 2014
by
bow
Browse files
Pattern match refactor in ExtractAlignedFastq
parent
10518502
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastq.scala
View file @
b83f5736
...
...
@@ -55,14 +55,13 @@ object ExtractAlignedFastq extends ToolCommand {
// by the Interval constructor only accepting ints
def
intFromCoord
(
s
:
String
)
:
Int
=
s
.
replaceAll
(
","
,
""
).
replaceAll
(
"\\."
,
""
).
toInt
inStrings
.
map
(
x
=>
x
match
{
inStrings
.
map
{
case
ptn1
(
chr
,
start
,
end
)
=>
new
Interval
(
chr
,
intFromCoord
(
start
),
intFromCoord
(
end
))
case
ptn2
(
chr
,
start
)
=>
val
startCoord
=
intFromCoord
(
start
)
new
Interval
(
chr
,
startCoord
,
startCoord
)
case
_
=>
throw
new
IllegalArgumentException
(
"Invalid interval string: "
+
x
)
})
.
toIterator
}.
toIterator
}
/**
...
...
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