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
f1cf26d5
Commit
f1cf26d5
authored
Mar 13, 2017
by
Peter van 't Hof
Browse files
Format fix
parent
132ce5e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
shiva/src/main/resources/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp
View file @
f1cf26d5
...
...
@@ -9,6 +9,7 @@
#import(java.io.File)
<%@ var summary: SummaryDb %>
<%@ var sampleId: Option[Int] = None %>
<%@ var multisample: Boolean = true %>
<%@ var rootPath: String %>
<%@ var outputDir: File %>
<%@ var showPlot: Boolean = false %>
...
...
@@ -82,7 +83,8 @@
#{
fields.map(x => x -> List("total", "genotype", "general", sample.name, x)).toMap
val statsPaths = fields.map(x => x -> List("total", "genotype", "general", sample.name, x)).toMap
val results = summary.getStatKeys(runId, "shivavariantcalling", "vcfstatsKey", sample = sample.id, keyValues = statsPaths)
val sampleQuery: SampleQuery = if (multisample) NoSample else SampleId(sampleId.get)
val results = summary.getStatKeys(runId, "shivavariantcalling", vcfstatsKey, sampleQuery, keyValues = statsPaths)
}#
#for (field <- fields)
...
...
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala
View file @
f1cf26d5
...
...
@@ -148,7 +148,7 @@ trait ShivaReportTrait extends MultisampleMappingReportTrait {
val
samples
=
Await
.
result
(
summary
.
getSamples
(
runId
=
runId
,
sampleId
=
sampleId
),
Duration
.
Inf
)
val
statsPaths
=
{
(
for
(
sample
<-
Await
.
result
(
summary
.
getSamples
(
runId
=
runId
),
Duration
.
Inf
))
yield
{
field
.
map
(
f
=>
s
"${sample.name};
HomVar
"
->
List
(
"total"
,
"genotype"
,
"general"
,
sample
.
name
,
f
)).
toMap
field
.
map
(
f
=>
s
"${sample.name};
$f
"
->
List
(
"total"
,
"genotype"
,
"general"
,
sample
.
name
,
f
)).
toMap
}).
fold
(
Map
())(
_
++
_
)
}
...
...
@@ -160,7 +160,7 @@ trait ShivaReportTrait extends MultisampleMappingReportTrait {
val
results
=
summary
.
getStatKeys
(
runId
,
"shivavariantcalling"
,
moduleName
,
sampleId
.
map
(
SampleId
).
getOrElse
(
NoSample
),
keyValues
=
statsPaths
)
for
(
sample
<-
samples
if
sampleId
.
isEmpty
||
sample
.
id
==
sampleId
.
get
)
{
tsvWriter
.
println
(
sample
.
name
+
"\t"
+
field
.
map
(
f
=>
results
(
s
"${sample.name};$f"
).
getOrElse
(
""
)
).
mkString
(
"\t"
))
tsvWriter
.
println
(
sample
.
name
+
"\t"
+
field
.
map
(
f
=>
results
.
get
(
s
"${sample.name};$f"
).
getOrElse
(
Some
(
"0"
)).
get
).
mkString
(
"\t"
))
}
tsvWriter
.
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