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
bdd9ce38
Commit
bdd9ce38
authored
Sep 28, 2015
by
Peter van 't Hof
Browse files
Catch NullPointer from queue and convert is to null instead of an failure
parent
c6980164
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala
View file @
bdd9ce38
...
...
@@ -81,6 +81,12 @@ trait BiopetCommandLineFunction extends CommandLineFunction with Configurable {
/** Set default output file, threads and vmem for current job */
private
[
core
]
def
internalBeforeGraph
()
:
Unit
=
{
val
firstOutput
=
try
{
this
.
firstOutput
}
catch
{
case
e
:
NullPointerException
=>
null
}
if
(
jobOutputFile
==
null
&&
firstOutput
!=
null
)
jobOutputFile
=
new
File
(
firstOutput
.
getAbsoluteFile
.
getParent
,
"."
+
firstOutput
.
getName
+
"."
+
configName
+
".out"
)
...
...
@@ -254,6 +260,10 @@ trait BiopetCommandLineFunction extends CommandLineFunction with Configurable {
def
|
(
that
:
BiopetCommandLineFunction
)
:
BiopetCommandLineFunction
=
{
this
.
_outputAsStdout
=
true
that
.
_inputAsStdin
=
true
this
.
beforeGraph
()
this
.
internalBeforeGraph
()
that
.
beforeGraph
()
that
.
internalBeforeGraph
()
this
match
{
case
p
:
BiopetPipe
=>
{
p
.
commands
.
last
.
_outputAsStdout
=
true
...
...
@@ -309,6 +319,11 @@ trait BiopetCommandLineFunction extends CommandLineFunction with Configurable {
}
case
Right
(
cmd
)
=>
{
cmd
.
_outputAsStdout
=
true
cmd
.
beforeGraph
()
cmd
.
internalBeforeGraph
()
this
.
beforeGraph
()
this
.
internalBeforeGraph
()
this
.
threads
+=
cmd
.
threads
try
{
if
(
cmd
.
outputs
!=
null
)
outputFiles
++=
cmd
.
outputs
if
(
cmd
.
inputs
!=
null
)
deps
++=
cmd
.
inputs
...
...
@@ -328,6 +343,11 @@ trait BiopetCommandLineFunction extends CommandLineFunction with Configurable {
}
case
Right
(
cmd
)
=>
{
cmd
.
_inputAsStdin
=
true
cmd
.
beforeGraph
()
cmd
.
internalBeforeGraph
()
this
.
beforeGraph
()
this
.
internalBeforeGraph
()
this
.
threads
+=
cmd
.
threads
try
{
if
(
cmd
.
outputs
!=
null
)
outputFiles
++=
cmd
.
outputs
if
(
cmd
.
inputs
!=
null
)
deps
++=
cmd
.
inputs
...
...
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