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
a1d89efc
Commit
a1d89efc
authored
Nov 08, 2015
by
Peter van 't Hof
Browse files
Catch nullpointers
parent
869fb362
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
View file @
a1d89efc
...
...
@@ -26,8 +26,6 @@ import org.broadinstitute.gatk.queue.function.scattergather.ScatterGatherableFun
import
org.broadinstitute.gatk.queue.util.
{
Logging
=>
GatkLogging
}
import
org.broadinstitute.gatk.utils.commandline.Argument
import
scala.collection.mutable.ListBuffer
/** Base for biopet pipeline */
trait
BiopetQScript
extends
Configurable
with
GatkLogging
{
...
...
@@ -100,13 +98,15 @@ trait BiopetQScript extends Configurable with GatkLogging {
inputFiles
.
foreach
{
i
=>
if
(!
i
.
file
.
exists
())
Logging
.
addError
(
s
"Input file does not exist: ${i.file}"
)
else
if
(!
i
.
file
.
canRead
()
)
Logging
.
addError
(
s
"Input file can not be read: ${i.file}"
)
else
if
(!
i
.
file
.
canRead
)
Logging
.
addError
(
s
"Input file can not be read: ${i.file}"
)
}
functions
.
filter
(
_
.
jobOutputFile
==
null
).
foreach
(
f
=>
{
if
(
f
.
jobOutputFile
==
null
&&
f
.
firstOutput
!=
null
)
try
{
f
.
jobOutputFile
=
new
File
(
f
.
firstOutput
.
getAbsoluteFile
.
getParent
,
"."
+
f
.
firstOutput
.
getName
+
"."
+
configName
+
".out"
)
else
throw
new
IllegalStateException
(
s
"Can't generate a jobOutputFile for $f"
)
}
catch
{
case
e
:
NullPointerException
=>
logger
.
warn
(
s
"Can't generate a jobOutputFile for $f"
)
}
})
if
(
logger
.
isDebugEnabled
)
WriteDependencies
.
writeDependencies
(
functions
,
new
File
(
outputDir
,
s
".log/${qSettings.runName}.deps.json"
))
...
...
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