Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biopet.biopet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Mirrors
biopet.biopet
Commits
a9ea63e5
Commit
a9ea63e5
authored
Jun 14, 2016
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding more logging
parent
5c4cadf5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
...c/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
+11
-4
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/Logging.scala
...ls/src/main/scala/nl/lumc/sasc/biopet/utils/Logging.scala
+1
-0
No files found.
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
View file @
a9ea63e5
...
...
@@ -69,10 +69,14 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
outputDir
=
outputDir
.
getAbsoluteFile
init
()
biopetScript
()
logger
.
info
(
"Biopet script done"
)
if
(
disableScatter
)
for
(
function
<-
functions
)
function
match
{
case
f
:
ScatterGatherableFunction
=>
f
.
scatterCount
=
1
case
_
=>
if
(
disableScatter
)
{
logger
.
info
(
"Disable scatters"
)
for
(
function
<-
functions
)
function
match
{
case
f
:
ScatterGatherableFunction
=>
f
.
scatterCount
=
1
case
_
=>
}
}
this
match
{
...
...
@@ -81,6 +85,7 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
case
_
=>
reportClass
.
foreach
(
add
(
_
))
}
logger
.
info
(
"Running pre commands"
)
for
(
function
<-
functions
)
function
match
{
case
f
:
BiopetCommandLineFunction
=>
f
.
preProcessExecutable
()
...
...
@@ -94,7 +99,8 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
globalConfig
.
writeReport
(
qSettings
.
runName
,
new
File
(
outputDir
,
".log/"
+
qSettings
.
runName
))
else
Logging
.
addError
(
"Parent of output dir: '"
+
outputDir
.
getParent
+
"' is not writeable, output directory cannot be created"
)
inputFiles
.
foreach
{
i
=>
logger
.
info
(
"Checking input files"
)
inputFiles
.
par
.
foreach
{
i
=>
if
(!
i
.
file
.
exists
())
Logging
.
addError
(
s
"Input file does not exist: ${i.file}"
)
if
(!
i
.
file
.
canRead
)
Logging
.
addError
(
s
"Input file can not be read: ${i.file}"
)
if
(!
i
.
file
.
isAbsolute
)
Logging
.
addError
(
s
"Input file should be an absolute path: ${i.file}"
)
...
...
@@ -111,6 +117,7 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
if
(
logger
.
isDebugEnabled
)
WriteDependencies
.
writeDependencies
(
functions
,
new
File
(
outputDir
,
s
".log/${qSettings.runName}.deps.json"
))
Logging
.
checkErrors
()
logger
.
info
(
"Script complete without errors"
)
}
/** Get implemented from org.broadinstitute.gatk.queue.QScript */
...
...
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/Logging.scala
View file @
a9ea63e5
...
...
@@ -39,6 +39,7 @@ object Logging {
def
addError
(
error
:
String
,
debug
:
String
=
null
)
:
Unit
=
{
val
msg
=
error
+
(
if
(
debug
!=
null
&&
logger
.
isDebugEnabled
)
"; "
+
debug
else
""
)
logger
.
error
(
msg
)
errors
.
append
(
new
Exception
(
msg
))
}
...
...
Write
Preview
Markdown
is supported
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