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
109d9888
Commit
109d9888
authored
Sep 26, 2014
by
Peter van 't Hof
Browse files
Fix bug on executable
parent
aac2adc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunctionTrait.scala
View file @
109d9888
...
...
@@ -26,7 +26,7 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
var
vmem
:
String
=
_
val
defaultVmem
:
String
=
""
@Argument
(
doc
=
"Executable"
)
@Argument
(
doc
=
"Executable"
,
required
=
false
)
var
executable
:
String
=
_
protected
[
core
]
def
beforeCmd
{
...
...
@@ -66,18 +66,18 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
logger
.
error
(
"executable: '"
+
executable
+
"' not found, please check config"
)
throw
new
QException
(
"executable: '"
+
executable
+
"' not found, please check config"
)
}
val
is
=
new
FileInputStream
(
executable
)
val
cnt
=
is
.
available
val
bytes
=
Array
.
ofDim
[
Byte
](
cnt
)
is
.
read
(
bytes
)
is
.
close
()
val
md5
:
String
=
MessageDigest
.
getInstance
(
"MD5"
).
digest
(
bytes
).
map
(
"%02X"
.
format
(
_
)).
mkString
.
toLowerCase
addJobReportBinding
(
"md5sum_exe"
,
md5
)
}
catch
{
case
ioe
:
java.io.IOException
=>
logger
.
warn
(
"Could not use 'which', check on executable skipped: "
+
ioe
)
}
val
is
=
new
FileInputStream
(
executable
)
val
cnt
=
is
.
available
val
bytes
=
Array
.
ofDim
[
Byte
](
cnt
)
is
.
read
(
bytes
)
is
.
close
()
val
md5
:
String
=
MessageDigest
.
getInstance
(
"MD5"
).
digest
(
bytes
).
map
(
"%02X"
.
format
(
_
)).
mkString
.
toLowerCase
addJobReportBinding
(
"md5sum_exe"
,
md5
)
}
final
protected
def
preCmdInternal
{
...
...
Write
Preview
Supports
Markdown
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