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
0e5a2fad
Commit
0e5a2fad
authored
Apr 04, 2015
by
bow
Browse files
Add meta information in root of summary
parent
1f77b7e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala
View file @
0e5a2fad
...
...
@@ -22,11 +22,11 @@ import scala.io.Source
import
org.broadinstitute.gatk.queue.function.
{
QFunction
,
InProcessFunction
}
import
org.broadinstitute.gatk.utils.commandline.
{
Output
,
Input
}
import
nl.lumc.sasc.biopet.
{
LastCommitHash
,
Version
}
import
nl.lumc.sasc.biopet.core.
{
BiopetJavaCommandLineFunction
,
BiopetCommandLineFunction
,
BiopetCommandLineFunctionTrait
,
SampleLibraryTag
}
import
nl.lumc.sasc.biopet.core.config.Configurable
import
nl.lumc.sasc.biopet.utils.ConfigUtils
/**
* Created by pjvan_thof on 2/14/15.
*/
...
...
@@ -106,9 +106,13 @@ class WriteSummary(val root: Configurable) extends InProcessFunction with Config
(
v1
:
Any
,
v2
:
Any
,
key
:
String
)
=>
summarizable
.
resolveSummaryConflict
(
v1
,
v2
,
key
))
}).
foldRight
(
pipelineMap
)((
a
,
b
)
=>
ConfigUtils
.
mergeMaps
(
a
.
_1
,
b
,
a
.
_2
))
val
combinedMap
=
(
for
(
qscript
<-
qscript
.
summaryQScripts
)
yield
{
ConfigUtils
.
fileToConfigMap
(
qscript
.
summaryFile
)
}).
foldRight
(
jobsMap
)((
a
,
b
)
=>
ConfigUtils
.
mergeMaps
(
a
,
b
))
val
combinedMap
=
Map
(
"meta"
->
Map
(
"last_commit_hash"
->
LastCommitHash
,
"pipeline_version"
->
Version
))
++
(
for
(
qscript
<-
qscript
.
summaryQScripts
)
yield
{
ConfigUtils
.
fileToConfigMap
(
qscript
.
summaryFile
)
}).
foldRight
(
jobsMap
)((
a
,
b
)
=>
ConfigUtils
.
mergeMaps
(
a
,
b
))
val
writer
=
new
PrintWriter
(
out
)
writer
.
println
(
ConfigUtils
.
mapToJson
(
combinedMap
).
spaces4
)
...
...
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