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
f8f5f0ad
Commit
f8f5f0ad
authored
Feb 10, 2015
by
Peter van 't Hof
Browse files
Added error cache to qscript
parent
f4f73c6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
View file @
f8f5f0ad
...
...
@@ -24,6 +24,8 @@ import org.broadinstitute.gatk.queue.function.QFunction
import
org.broadinstitute.gatk.queue.function.scattergather.ScatterGatherableFunction
import
org.broadinstitute.gatk.queue.util.
{
Logging
=>
GatkLogging
}
import
scala.collection.mutable.ListBuffer
trait
BiopetQScript
extends
Configurable
with
GatkLogging
{
@Argument
(
doc
=
"JSON config file(s)"
,
fullName
=
"config_file"
,
shortName
=
"config"
,
required
=
false
)
...
...
@@ -66,6 +68,8 @@ trait BiopetQScript extends Configurable with GatkLogging {
}
Config
.
global
.
writeReport
(
qSettings
.
runName
,
outputDir
+
".log/"
+
qSettings
.
runName
)
BiopetQScript
.
checkErrors
}
def
add
(
functions
:
QFunction*
)
// Gets implemeted at org.broadinstitute.sting.queue.QScript
...
...
@@ -73,5 +77,23 @@ trait BiopetQScript extends Configurable with GatkLogging {
function
.
isIntermediate
=
isIntermediate
add
(
function
)
}
}
object
BiopetQScript
extends
Logging
{
private
val
errors
:
ListBuffer
[
Exception
]
=
ListBuffer
()
def
addError
(
msg
:
String
)
:
Unit
=
{
errors
.
append
(
new
Exception
(
msg
))
}
protected
def
checkErrors
:
Unit
=
{
if
(!
errors
.
isEmpty
)
{
for
(
e
<-
errors
)
{
logger
.
error
(
e
.
getMessage
)
logger
.
debug
(
e
.
getStackTrace
.
mkString
(
"Stack trace:\n"
,
"\n"
,
"\n"
))
}
//errors.foreach(logger.error(_))
throw
new
IllegalStateException
(
"Biopet found errors"
)
}
}
}
\ No newline at end of file
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