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
ee5ed3c8
Commit
ee5ed3c8
authored
Jun 30, 2015
by
Peter van 't Hof
Browse files
Adding more information for each executable to summary
parent
9a37f7d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunctionTrait.scala
View file @
ee5ed3c8
...
...
@@ -156,7 +156,13 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
protected
val
versionExitcode
=
List
(
0
)
/** Executes the version command */
private
def
getVersionInternal
:
Option
[
String
]
=
{
private
[
core
]
def
getVersionInternal
()
:
Option
[
String
]
=
{
if
(
versionCommand
==
null
||
versionRegex
==
null
)
None
else
getVersionInternal
(
versionCommand
,
versionRegex
)
}
/** Executes the version command */
private
[
core
]
def
getVersionInternal
(
versionCommand
:
String
,
versionRegex
:
Regex
)
:
Option
[
String
]
=
{
if
(
versionCommand
==
null
||
versionRegex
==
null
)
return
None
val
exe
=
new
File
(
versionCommand
.
trim
.
split
(
" "
)(
0
))
if
(!
exe
.
exists
())
return
None
...
...
@@ -221,7 +227,7 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
/** stores global caches */
object
BiopetCommandLineFunctionTrait
{
import
scala.collection.mutable.Map
private
val
versionCache
:
Map
[
String
,
String
]
=
Map
()
private
[
core
]
val
versionCache
:
Map
[
String
,
String
]
=
Map
()
private
[
core
]
val
executableMd5Cache
:
Map
[
String
,
String
]
=
Map
()
private
val
executableCache
:
Map
[
String
,
String
]
=
Map
()
private
[
core
]
val
executableCache
:
Map
[
String
,
String
]
=
Map
()
}
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetJavaCommandLineFunction.scala
View file @
ee5ed3c8
...
...
@@ -37,6 +37,19 @@ trait BiopetJavaCommandLineFunction extends JavaCommandLineFunction with BiopetC
return
cmd
}
def
javaVersionCommand
:
String
=
executable
+
" -version"
def
getJavaVersion
:
Option
[
String
]
=
{
if
(!
BiopetCommandLineFunctionTrait
.
executableCache
.
contains
(
executable
))
preProcesExecutable
if
(!
BiopetCommandLineFunctionTrait
.
versionCache
.
contains
(
javaVersionCommand
))
getVersionInternal
(
javaVersionCommand
,
"""java version "(.*)""""
.
r
)
match
{
case
Some
(
version
)
=>
BiopetCommandLineFunctionTrait
.
versionCache
+=
javaVersionCommand
->
version
case
_
=>
}
BiopetCommandLineFunctionTrait
.
versionCache
.
get
(
javaVersionCommand
)
}
override
def
setupRetry
()
:
Unit
=
{
super
.
setupRetry
()
javaMemoryLimit
=
memoryLimit
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala
View file @
ee5ed3c8
...
...
@@ -74,11 +74,13 @@ class WriteSummary(val root: Configurable) extends InProcessFunction with Config
case
f
:
BiopetJavaCommandLineFunction
=>
{
f
.
configName
->
Map
(
"version"
->
f
.
getVersion
.
getOrElse
(
None
),
"java_md5"
->
BiopetCommandLineFunctionTrait
.
executableMd5Cache
.
getOrElse
(
f
.
executable
,
None
),
"jar_md5"
->
SummaryQScript
.
md5sumCache
.
getOrElse
(
f
.
jarFile
,
None
))
"java_version"
->
f
.
getJavaVersion
,
"jar_path"
->
f
.
jarFile
)
}
case
f
:
BiopetCommandLineFunction
=>
{
f
.
configName
->
Map
(
"version"
->
f
.
getVersion
.
getOrElse
(
None
),
"md5"
->
BiopetCommandLineFunctionTrait
.
executableMd5Cache
.
getOrElse
(
f
.
executable
,
None
))
"md5"
->
BiopetCommandLineFunctionTrait
.
executableMd5Cache
.
getOrElse
(
f
.
executable
,
None
),
"path"
->
f
.
executable
)
}
case
_
=>
throw
new
IllegalStateException
(
"This should not be possible"
)
}
...
...
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