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
bff12a5f
Commit
bff12a5f
authored
Dec 06, 2016
by
Peter van 't Hof
Browse files
Move config report
parent
9dc9ee63
Changes
2
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
View file @
bff12a5f
...
...
@@ -104,8 +104,10 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
case
_
=>
}
val
logDir
=
new
File
(
outputDir
,
".log"
+
File
.
separator
+
BiopetQCommandLine
.
timestamp
)
if
(
outputDir
.
getParentFile
.
canWrite
||
(
outputDir
.
exists
&&
outputDir
.
canWrite
))
globalConfig
.
writeReport
(
qSettings
.
runName
,
new
File
(
outputDir
,
".log/"
+
qSettings
.
runName
))
globalConfig
.
writeReport
(
new
File
(
logDir
,
"config"
))
else
Logging
.
addError
(
"Parent of output dir: '"
+
outputDir
.
getParent
+
"' is not writeable, output directory cannot be created"
)
logger
.
info
(
"Checking input files"
)
...
...
@@ -126,7 +128,7 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
if
(!
skipWriteDependencies
)
WriteDependencies
.
writeDependencies
(
functions
,
new
File
(
outputDir
,
".log"
+
File
.
separator
+
BiopetQCommandLine
.
timestamp
+
File
.
separator
+
"graph"
))
new
File
(
logDir
,
"graph"
))
Logging
.
checkErrors
()
logger
.
info
(
"Script complete without errors"
)
...
...
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/config/Config.scala
View file @
bff12a5f
...
...
@@ -189,7 +189,7 @@ class Config(protected var _map: Map[String, Any],
}
else
ConfigValue
(
requestedIndex
,
null
,
null
,
freeVar
)
}
def
writeReport
(
id
:
String
,
directory
:
File
)
:
Unit
=
{
def
writeReport
(
directory
:
File
)
:
Unit
=
{
directory
.
mkdirs
()
def
convertIndexValuesToMap
(
input
:
List
[(
ConfigValueIndex
,
Any
)],
forceFreeVar
:
Option
[
Boolean
]
=
None
)
:
Map
[
String
,
Any
]
=
{
...
...
@@ -205,7 +205,7 @@ class Config(protected var _map: Map[String, Any],
}
def
writeMapToJsonFile
(
map
:
Map
[
String
,
Any
],
name
:
String
)
:
Unit
=
{
val
file
=
new
File
(
directory
,
id
+
"."
+
name
+
".json"
)
val
file
=
new
File
(
directory
,
name
+
".json"
)
val
writer
=
new
PrintWriter
(
file
)
writer
.
write
(
ConfigUtils
.
mapToJson
(
map
).
spaces2
)
writer
.
close
()
...
...
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