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
ce1562d1
Commit
ce1562d1
authored
Jan 20, 2017
by
Peter van 't Hof
Browse files
Refactor code to safe retry
parent
173d24e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
View file @
ce1562d1
...
@@ -19,7 +19,6 @@ import java.io.File
...
@@ -19,7 +19,6 @@ import java.io.File
import
nl.lumc.sasc.biopet.core.summary.
{
SummaryQScript
,
WriteSummary
}
import
nl.lumc.sasc.biopet.core.summary.
{
SummaryQScript
,
WriteSummary
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.core.report.ReportBuilderExtension
import
nl.lumc.sasc.biopet.core.report.ReportBuilderExtension
import
nl.lumc.sasc.biopet.core.workaround.BiopetQCommandLine
import
nl.lumc.sasc.biopet.utils.Logging
import
nl.lumc.sasc.biopet.utils.Logging
import
org.broadinstitute.gatk.queue.
{
QScript
,
QSettings
}
import
org.broadinstitute.gatk.queue.
{
QScript
,
QSettings
}
import
org.broadinstitute.gatk.queue.function.QFunction
import
org.broadinstitute.gatk.queue.function.QFunction
...
@@ -118,11 +117,10 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
...
@@ -118,11 +117,10 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
}
}
functions
.
filter
(
_
.
jobOutputFile
==
null
).
foreach
(
f
=>
{
functions
.
filter
(
_
.
jobOutputFile
==
null
).
foreach
(
f
=>
{
try
{
val
className
=
if
(
f
.
getClass
.
isAnonymousClass
)
f
.
getClass
.
getSuperclass
.
getSimpleName
else
f
.
getClass
.
getSimpleName
val
className
=
if
(
f
.
getClass
.
isAnonymousClass
)
f
.
getClass
.
getSuperclass
.
getSimpleName
else
f
.
getClass
.
getSimpleName
BiopetQScript
.
safeOutputs
(
f
)
match
{
f
.
jobOutputFile
=
new
File
(
f
.
firstOutput
.
getAbsoluteFile
.
getParent
,
"."
+
f
.
firstOutput
.
getName
+
"."
+
className
+
".out"
)
case
Some
(
o
)
=>
f
.
jobOutputFile
=
new
File
(
o
.
head
.
getAbsoluteFile
.
getParent
,
"."
+
f
.
firstOutput
.
getName
+
"."
+
className
+
".out"
)
}
catch
{
case
_
=>
f
.
jobOutputFile
=
new
File
(
"./stdout"
)
// Line is here for test backup
case
e
:
NullPointerException
=>
logger
.
warn
(
s
"Can't generate a jobOutputFile for $f"
)
}
}
})
})
...
@@ -159,7 +157,7 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
...
@@ -159,7 +157,7 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
case
that
:
BiopetQScript
=>
case
that
:
BiopetQScript
=>
that
.
init
()
that
.
init
()
that
.
biopetScript
()
that
.
biopetScript
()
case
_
=>
subPipeline
.
script
case
_
=>
subPipeline
.
script
()
}
}
addAll
(
subPipeline
.
functions
)
addAll
(
subPipeline
.
functions
)
}
}
...
...
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