Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
f6796a24
Commit
f6796a24
authored
9 years ago
by
Wai Yi Leung
Browse files
Options
Downloads
Patches
Plain Diff
Fix Cutadapt statistics to store Long values. Tests hit the Int.max
parent
a548cfde
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala
+11
-11
11 additions, 11 deletions
.../main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala
with
11 additions
and
11 deletions
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala
+
11
−
11
View file @
f6796a24
...
...
@@ -182,7 +182,7 @@ class Cutadapt(val root: Configurable) extends BiopetCommandLineFunction with Su
val
basePairsProcessed
=
"""Total basepairs processed: *([,\d]+) bp"""
.
r
val
basePairsWritten
=
"""Total written \(filtered\): *([,\d]+) bp .*"""
.
r
val
stats
:
mutable.Map
[
String
,
Int
]
=
mutable
.
Map
(
val
stats
:
mutable.Map
[
String
,
Long
]
=
mutable
.
Map
(
"processed"
->
0
,
"withadapters"
->
0
,
"passingfilters"
->
0
,
...
...
@@ -192,21 +192,21 @@ class Cutadapt(val root: Configurable) extends BiopetCommandLineFunction with Su
"bpoutput"
->
0
,
"toomanyn"
->
0
)
val
adapter_stats
:
mutable.Map
[
String
,
Int
]
=
mutable
.
Map
()
val
adapter_stats
:
mutable.Map
[
String
,
Long
]
=
mutable
.
Map
()
if
(
statsOutput
.
exists
)
{
val
statsFile
=
Source
.
fromFile
(
statsOutput
)
for
(
line
<-
statsFile
.
getLines
())
{
line
match
{
case
processedReads
(
m
)
=>
stats
(
"processed"
)
=
m
.
replaceAll
(
","
,
""
).
to
Int
case
withAdapters
(
m
)
=>
stats
(
"withadapters"
)
=
m
.
replaceAll
(
","
,
""
).
to
Int
case
readsPassingFilters
(
m
)
=>
stats
(
"passingfilters"
)
=
m
.
replaceAll
(
","
,
""
).
to
Int
case
tooShortR
(
m
)
=>
stats
(
"tooshort"
)
=
m
.
replaceAll
(
","
,
""
).
to
Int
case
tooLongR
(
m
)
=>
stats
(
"toolong"
)
=
m
.
replaceAll
(
","
,
""
).
to
Int
case
tooManyN
(
m
)
=>
stats
(
"toomanyn"
)
=
m
.
replaceAll
(
","
,
""
).
to
Int
case
basePairsProcessed
(
m
)
=>
stats
(
"bpinput"
)
=
m
.
replaceAll
(
","
,
""
).
to
Int
case
basePairsWritten
(
m
)
=>
stats
(
"bpoutput"
)
=
m
.
replaceAll
(
","
,
""
).
to
Int
case
adapterR
(
adapter
,
count
)
=>
adapter_stats
+=
(
adapter
->
count
.
to
Int
)
case
processedReads
(
m
)
=>
stats
(
"processed"
)
=
m
.
replaceAll
(
","
,
""
).
to
Long
case
withAdapters
(
m
)
=>
stats
(
"withadapters"
)
=
m
.
replaceAll
(
","
,
""
).
to
Long
case
readsPassingFilters
(
m
)
=>
stats
(
"passingfilters"
)
=
m
.
replaceAll
(
","
,
""
).
to
Long
case
tooShortR
(
m
)
=>
stats
(
"tooshort"
)
=
m
.
replaceAll
(
","
,
""
).
to
Long
case
tooLongR
(
m
)
=>
stats
(
"toolong"
)
=
m
.
replaceAll
(
","
,
""
).
to
Long
case
tooManyN
(
m
)
=>
stats
(
"toomanyn"
)
=
m
.
replaceAll
(
","
,
""
).
to
Long
case
basePairsProcessed
(
m
)
=>
stats
(
"bpinput"
)
=
m
.
replaceAll
(
","
,
""
).
to
Long
case
basePairsWritten
(
m
)
=>
stats
(
"bpoutput"
)
=
m
.
replaceAll
(
","
,
""
).
to
Long
case
adapterR
(
adapter
,
count
)
=>
adapter_stats
+=
(
adapter
->
count
.
to
Long
)
case
_
=>
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment