Skip to content
GitLab
Menu
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
285e2e4d
Commit
285e2e4d
authored
Feb 26, 2015
by
Peter van 't Hof
Browse files
Added implicit List[File]
parent
dbccba19
Changes
2
Hide whitespace changes
Inline
Side-by-side
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkGeneral.scala
View file @
285e2e4d
...
...
@@ -21,5 +21,5 @@ trait GatkGeneral extends CommandLineGATK with BiopetJavaCommandLineFunction {
if
(
config
.
contains
(
"exclude_intervals"
))
excludeIntervals
=
config
(
"exclude_intervals"
).
asFileList
reference_sequence
=
config
(
"reference"
)
if
(
config
.
contains
(
"gatk_key"
))
gatk_key
=
config
(
"gatk_key"
)
if
(
config
.
contains
(
"pedigree"
))
pedigree
=
config
(
"pedigree"
)
.
asFileList
if
(
config
.
contains
(
"pedigree"
))
pedigree
=
config
(
"pedigree"
)
}
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala
View file @
285e2e4d
...
...
@@ -313,6 +313,16 @@ object ConfigUtils extends Logging {
any2list
(
any
).
map
(
_
.
toString
)
}
/**
* Convert Any to List[File]
* @param any Input Any value
* @return
*/
def
any2fileList
(
any
:
Any
)
:
List
[
File
]
=
{
if
(
any
==
null
)
return
null
any2list
(
any
).
map
(
x
=>
new
File
(
x
.
toString
))
}
/**
* Convert Any to Map[String, Any]
* @param any Input Any value
...
...
@@ -505,6 +515,16 @@ object ConfigUtils extends Logging {
else
Nil
}
/**
* Convert ConfigValue to List[File]
* @param value Input ConfigValue
* @return
*/
implicit
def
configValue2fileList
(
value
:
ConfigValue
)
:
List
[
File
]
=
{
if
(
requiredValue
(
value
))
any2fileList
(
value
.
value
)
else
Nil
}
/**
* Convert ConfigValue to Set[String]
* @param value Input ConfigValue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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