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
9e6a44e1
Commit
9e6a44e1
authored
May 06, 2016
by
Peter van 't Hof
Browse files
No private mutable
parent
7d201c9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/WriteDependencies.scala
View file @
9e6a44e1
...
...
@@ -30,18 +30,16 @@ import scala.collection.mutable.ListBuffer
*/
object
WriteDependencies
extends
Logging
with
Configurable
{
val
root
:
Configurable
=
null
private
val
functionNames
:
mutable.Map
[
QFunction
,
String
]
=
mutable
.
Map
()
private
def
createFunctionNames
(
functions
:
Seq
[
QFunction
])
:
Unit
=
{
private
def
createFunctionNames
(
functions
:
Seq
[
QFunction
])
:
Map
[
QFunction
,
String
]
=
{
val
cache
:
mutable.Map
[
String
,
Int
]
=
mutable
.
Map
()
for
(
function
<-
functions
)
{
(
for
(
function
<-
functions
)
yield
{
val
baseName
=
function
match
{
case
f
:
Configurable
=>
f
.
configNamespace
case
f
=>
f
.
getClass
.
getSimpleName
}
cache
+=
baseName
->
(
cache
.
getOrElse
(
baseName
,
0
)
+
1
)
functionNames
+=
function
->
s
"$baseName-${cache(baseName)}"
}
function
->
s
"$baseName-${cache(baseName)}"
}
).
toMap
}
/**
...
...
@@ -55,7 +53,7 @@ object WriteDependencies extends Logging with Configurable {
val
errorOnMissingInput
:
Boolean
=
config
(
"error_on_missing_input"
,
false
)
createFunctionNames
(
functions
)
val
functionNames
=
createFunctionNames
(
functions
)
case
class
QueueFile
(
file
:
File
)
{
private
val
inputJobs
:
ListBuffer
[
QFunction
]
=
ListBuffer
()
...
...
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