Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
ce1562d1
Commit
ce1562d1
authored
8 years ago
by
Peter van 't Hof
Browse files
Options
Downloads
Patches
Plain Diff
Refactor code to safe retry
parent
173d24e7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
+5
-7
5 additions, 7 deletions
...c/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
with
5 additions
and
7 deletions
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
+
5
−
7
View file @
ce1562d1
...
...
@@ -19,7 +19,6 @@ import java.io.File
import
nl.lumc.sasc.biopet.core.summary.
{
SummaryQScript
,
WriteSummary
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.core.report.ReportBuilderExtension
import
nl.lumc.sasc.biopet.core.workaround.BiopetQCommandLine
import
nl.lumc.sasc.biopet.utils.Logging
import
org.broadinstitute.gatk.queue.
{
QScript
,
QSettings
}
import
org.broadinstitute.gatk.queue.function.QFunction
...
...
@@ -118,11 +117,10 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
}
functions
.
filter
(
_
.
jobOutputFile
==
null
).
foreach
(
f
=>
{
try
{
val
className
=
if
(
f
.
getClass
.
isAnonymousClass
)
f
.
getClass
.
getSuperclass
.
getSimpleName
else
f
.
getClass
.
getSimpleName
f
.
jobOutputFile
=
new
File
(
f
.
firstOutput
.
getAbsoluteFile
.
getParent
,
"."
+
f
.
firstOutput
.
getName
+
"."
+
className
+
".out"
)
}
catch
{
case
e
:
NullPointerException
=>
logger
.
warn
(
s
"Can't generate a jobOutputFile for $f"
)
val
className
=
if
(
f
.
getClass
.
isAnonymousClass
)
f
.
getClass
.
getSuperclass
.
getSimpleName
else
f
.
getClass
.
getSimpleName
BiopetQScript
.
safeOutputs
(
f
)
match
{
case
Some
(
o
)
=>
f
.
jobOutputFile
=
new
File
(
o
.
head
.
getAbsoluteFile
.
getParent
,
"."
+
f
.
firstOutput
.
getName
+
"."
+
className
+
".out"
)
case
_
=>
f
.
jobOutputFile
=
new
File
(
"./stdout"
)
// Line is here for test backup
}
})
...
...
@@ -159,7 +157,7 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
case
that
:
BiopetQScript
=>
that
.
init
()
that
.
biopetScript
()
case
_
=>
subPipeline
.
script
case
_
=>
subPipeline
.
script
()
}
addAll
(
subPipeline
.
functions
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment