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
fdf13694
Commit
fdf13694
authored
Apr 06, 2015
by
Peter van 't Hof
Browse files
Added manual path set to config
parent
92985895
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/config/Configurable.scala
View file @
fdf13694
...
...
@@ -52,7 +52,7 @@ trait Configurable extends ImplicitConversions {
* @param submodule
* @return
*/
def
p
ath
(
sample
:
String
=
null
,
library
:
String
=
null
,
submodule
:
String
=
null
)
=
{
def
getConfigP
ath
(
sample
:
String
=
null
,
library
:
String
=
null
,
submodule
:
String
=
null
)
=
{
(
if
(
sample
!=
null
)
"samples"
::
sample
::
Nil
else
Nil
)
:::
(
if
(
library
!=
null
)
"libraries"
::
library
::
Nil
else
Nil
)
:::
(
if
(
submodule
!=
null
)
configPath
:::
configName
::
Nil
else
configPath
)
...
...
@@ -91,11 +91,12 @@ trait Configurable extends ImplicitConversions {
submodule
:
String
=
null
,
freeVar
:
Boolean
=
true
,
sample
:
String
=
null
,
library
:
String
=
null
)
:
ConfigValue
=
{
library
:
String
=
null
,
path
:
List
[
String
]
=
null
)
:
ConfigValue
=
{
val
s
=
if
(
sample
!=
null
||
defaultSample
.
isEmpty
)
sample
else
defaultSample
.
get
val
l
=
if
(
library
!=
null
||
defaultLibrary
.
isEmpty
)
library
else
defaultLibrary
.
get
val
m
=
if
(
submodule
!=
null
)
submodule
else
configName
val
p
=
p
ath
(
s
,
l
,
submodule
)
val
p
=
if
(
path
==
null
)
getConfigP
ath
(
s
,
l
,
submodule
)
else
path
val
d
=
{
val
value
=
Config
.
getValueFromMap
(
defaults
.
toMap
,
ConfigValueIndex
(
m
,
p
,
key
,
freeVar
))
if
(
value
.
isDefined
)
value
.
get
.
value
else
default
...
...
@@ -117,11 +118,12 @@ trait Configurable extends ImplicitConversions {
submodule
:
String
=
null
,
freeVar
:
Boolean
=
true
,
sample
:
String
=
null
,
library
:
String
=
null
)
=
{
library
:
String
=
null
,
path
:
List
[
String
]
=
null
)
=
{
val
s
=
if
(
sample
!=
null
||
defaultSample
.
isEmpty
)
sample
else
defaultSample
.
get
val
l
=
if
(
library
!=
null
||
defaultLibrary
.
isEmpty
)
library
else
defaultLibrary
.
get
val
m
=
if
(
submodule
!=
null
)
submodule
else
configName
val
p
=
p
ath
(
s
,
l
,
submodule
)
val
p
=
if
(
path
==
null
)
getConfigP
ath
(
s
,
l
,
submodule
)
else
path
globalConfig
.
contains
(
m
,
p
,
key
,
freeVar
)
||
!(
Config
.
getValueFromMap
(
defaults
.
toMap
,
ConfigValueIndex
(
m
,
p
,
key
,
freeVar
))
==
None
)
}
...
...
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