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
8b4d55c2
Commit
8b4d55c2
authored
Jan 16, 2015
by
Peter van 't Hof
Browse files
Fix default sample and library
parent
14fe91d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala
View file @
8b4d55c2
...
...
@@ -16,6 +16,7 @@
package
nl.lumc.sasc.biopet.core
import
nl.lumc.sasc.biopet.core.config.
{
ConfigValue
,
Config
,
Configurable
}
import
nl.lumc.sasc.biopet.utils.ConfigUtils
import
nl.lumc.sasc.biopet.utils.ConfigUtils._
trait
MultiSampleQScript
extends
BiopetQScript
{
...
...
@@ -29,12 +30,12 @@ trait MultiSampleQScript extends BiopetQScript {
def
getLibrary
(
key
:
String
)
=
libraries
(
key
)
}
if
(!
c
onfig
.
contains
(
"samples"
))
logger
.
warn
(
"No Samples found in config"
)
if
(!
C
onfig
.
global
.
map
.
contains
(
"samples"
))
logger
.
warn
(
"No Samples found in config"
)
/**
* Returns a map with all sample configs
*/
val
getSamplesConfig
:
Map
[
String
,
Any
]
=
c
onfig
(
"samples"
,
default
=
Map
())
val
getSamplesConfig
:
Map
[
String
,
Any
]
=
C
onfig
Utils
.
any2map
(
Config
.
global
.
map
.
getOrElse
(
"samples"
,
Map
())
)
/**
* Returns a list of all sampleIDs
...
...
@@ -144,9 +145,7 @@ trait MultiSampleQScript extends BiopetQScript {
*/
def
getCurrentLibrary
=
currentLibrary
/**
* Reset current library manual, only use this when not using runLibraryJobs method
*/
/** Reset current library manual, only use this when not using runLibraryJobs method */
def
resetCurrentLibrary
()
{
logger
.
debug
(
"Manual library reset"
)
currentLibrary
=
null
...
...
@@ -158,23 +157,29 @@ trait MultiSampleQScript extends BiopetQScript {
super
.
configFullPath
}
protected
class
ConfigFunctions
extends
super
.
ConfigFunctions
{
override
val
config
=
new
ConfigFunctionsExt
protected
class
ConfigFunctionsExt
extends
super
.
ConfigFunctions
{
override
def
apply
(
key
:
String
,
default
:
Any
=
null
,
submodule
:
String
=
null
,
required
:
Boolean
=
false
,
freeVar
:
Boolean
=
true
,
sample
:
String
=
currentSample
,
library
:
String
=
currentLibrary
)
:
ConfigValue
=
{
super
.
apply
(
key
,
default
,
submodule
,
required
,
freeVar
,
sample
,
library
)
sample
:
String
=
null
,
library
:
String
=
null
)
:
ConfigValue
=
{
val
s
=
if
(
sample
==
null
)
currentSample
else
sample
val
l
=
if
(
library
==
null
)
currentLibrary
else
library
super
.
apply
(
key
,
default
,
submodule
,
required
,
freeVar
,
s
,
l
)
}
override
def
contains
(
key
:
String
,
submodule
:
String
=
null
,
freeVar
:
Boolean
=
true
,
sample
:
String
=
currentSample
,
library
:
String
=
currentLibrary
)
=
{
super
.
contains
(
key
,
submodule
,
freeVar
,
sample
,
library
)
sample
:
String
=
null
,
library
:
String
=
null
)
=
{
val
s
=
if
(
sample
==
null
)
currentSample
else
sample
val
l
=
if
(
library
==
null
)
currentLibrary
else
library
super
.
contains
(
key
,
submodule
,
freeVar
,
s
,
l
)
}
}
}
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