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
6075c248
Commit
6075c248
authored
10 years ago
by
Peter van 't Hof
Browse files
Options
Downloads
Patches
Plain Diff
Added qscripts to final output file
parent
ebe2bb5f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala
+13
-10
13 additions, 10 deletions
...scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala
with
13 additions
and
10 deletions
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala
+
13
−
10
View file @
6075c248
package
nl.lumc.sasc.biopet.core.summary
import
java.io.
{
FileInputStream
,
PrintWriter
,
File
}
import
java.io.
{
FileInputStream
,
PrintWriter
,
File
}
import
java.security.MessageDigest
import
nl.lumc.sasc.biopet.core.config.Configurable
...
...
@@ -40,24 +40,27 @@ class WriteSummary(val root: Configurable) extends InProcessFunction with Config
}
def
run
()
:
Unit
=
{
val
writer
=
new
PrintWriter
(
out
)
val
bla
=
for
(((
name
,
sampleId
,
libraryId
),
summarizable
s
)
<-
summaryQScript
.
summarizables
;
summarizable
<-
summarizables
)
yield
{
val
map
=
(
for
(
((
name
,
sampleId
,
libraryId
),
summarizables
)
<-
summaryQScript
.
summarizables
;
summarizable
<-
summarizables
)
yield
{
val
map
=
Map
(
name
->
parseSummarizable
(
summarizable
))
(
sampleId
match
{
case
Some
(
sampleId
)
=>
Map
(
"samples"
->
Map
(
sampleId
->
(
libraryId
match
{
case
Some
(
libraryId
)
=>
Map
(
"libraries"
->
Map
(
libraryId
->
map
))
case
_
=>
map
case
_
=>
map
})))
case
_
=>
map
},
(
v1
:
Any
,
v2
:
Any
,
key
:
String
)
=>
summarizable
.
resolveSummaryConflict
(
v1
,
v2
,
key
))
}
bla
.
foldRight
(
Map
[
String
,
Any
]())((
a
,
b
)
=>
ConfigUtils
.
mergeMaps
(
a
.
_1
,
b
,
a
.
_2
))
},
(
v1
:
Any
,
v2
:
Any
,
key
:
String
)
=>
summarizable
.
resolveSummaryConflict
(
v1
,
v2
,
key
))
}).
foldRight
(
Map
[
String
,
Any
]())((
a
,
b
)
=>
ConfigUtils
.
mergeMaps
(
a
.
_1
,
b
,
a
.
_2
))
//TODO: QScript merging
val
combinedMap
=
(
for
(
qscript
<-
summaryQScript
.
summaryQScripts
)
yield
{
ConfigUtils
.
fileToConfigMap
(
qscript
.
summaryFile
)
}).
foldRight
(
map
)((
a
,
b
)
=>
ConfigUtils
.
mergeMaps
(
a
,
b
))
val
writer
=
new
PrintWriter
(
out
)
writer
.
println
(
ConfigUtils
.
mapToJson
(
combinedMap
).
spaces2
)
writer
.
close
()
}
...
...
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