Skip to content
GitLab
Menu
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
a8e368c6
Commit
a8e368c6
authored
Apr 04, 2017
by
akaljuvee
Browse files
-
parent
042a5e0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCalling.scala
View file @
a8e368c6
...
...
@@ -102,12 +102,8 @@ class ShivaSvCalling(val parent: Configurable) extends QScript with SummaryQScri
addSummarizable
(
new
Summarizable
{
def
summaryFiles
=
Map
(
"output_vcf"
->
mergedResultFile
)
def
summaryStats
=
counts
},
"
v
ar
iantsBySizeAndType
"
,
Some
(
sample
))
},
"
p
ar
se_sv_vcf
"
,
Some
(
sample
))
}
addSummarizable
(
new
Summarizable
{
def
summaryFiles
=
Map
.
empty
def
summaryStats
=
ShivaSvCallingReport
.
histogramBinBoundaries
},
"histBreaksForCounts"
)
addSummaryJobs
()
}
...
...
@@ -116,7 +112,7 @@ class ShivaSvCalling(val parent: Configurable) extends QScript with SummaryQScri
protected
def
callersList
:
List
[
SvCaller
]
=
List
(
new
Breakdancer
(
this
),
new
Clever
(
this
),
new
Delly
(
this
),
new
Pindel
(
this
))
/** Settings for the summary */
def
summarySettings
=
Map
(
"sv_callers"
->
configCallers
.
toList
)
def
summarySettings
=
Map
(
"sv_callers"
->
configCallers
.
toList
,
"hist_bin_boundaries"
->
ShivaSvCallingReport
.
histogramBinBoundaries
)
/** Files for the summary */
def
summaryFiles
:
Map
[
String
,
File
]
=
if
(
inputBams
.
size
>
1
)
Map
(
"final_mergedvcf"
->
outputMergedVCF
)
else
Map
.
empty
...
...
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCallingReport.scala
View file @
a8e368c6
...
...
@@ -19,7 +19,7 @@ object ShivaSvCallingReport {
var
delCounts
,
insCounts
,
dupCounts
,
invCounts
:
Map
[
String
,
Array
[
Long
]]
=
Map
()
for
(
sampleName
<-
sampleNames
)
{
val
sampleCounts
:
Map
[
String
,
Any
]
=
Await
.
result
(
summary
.
getStat
(
runId
,
PipelineName
(
"shivasvcalling"
),
ModuleName
(
"
v
ar
iantsBySizeAndType
"
),
SampleName
(
sampleName
)),
Duration
.
Inf
).
get
val
sampleCounts
:
Map
[
String
,
Any
]
=
Await
.
result
(
summary
.
getStat
(
runId
,
PipelineName
(
"shivasvcalling"
),
ModuleName
(
"
p
ar
se_sv_vcf
"
),
SampleName
(
sampleName
)),
Duration
.
Inf
).
get
for
((
svType
,
counts
)
<-
sampleCounts
.
collect
({
case
(
k
,
v
:
List
[
_
])
=>
(
k
,
v
.
toArray
[
Any
])
}))
{
val
elem
:
Tuple2
[
String
,
Array
[
Long
]]
=
(
sampleName
,
counts
.
collect
({
case
x
:
Long
=>
x
}))
svType
match
{
...
...
@@ -42,7 +42,7 @@ object ShivaSvCallingReport {
def
parseSummaryForTranslocations
(
summary
:
SummaryDb
,
runId
:
Int
,
sampleNames
:
Seq
[
String
])
:
Map
[
String
,
Long
]
=
{
var
traCounts
:
Map
[
String
,
Long
]
=
Map
()
for
(
sampleName
<-
sampleNames
)
{
val
counts
:
Map
[
String
,
Any
]
=
Await
.
result
(
summary
.
getStat
(
runId
,
PipelineName
(
"shivasvcalling"
),
ModuleName
(
"
v
ar
iantsBySizeAndType
"
),
SampleName
(
sampleName
)),
Duration
.
Inf
).
get
val
counts
:
Map
[
String
,
Any
]
=
Await
.
result
(
summary
.
getStat
(
runId
,
PipelineName
(
"shivasvcalling"
),
ModuleName
(
"
p
ar
se_sv_vcf
"
),
SampleName
(
sampleName
)),
Duration
.
Inf
).
get
traCounts
+=
(
sampleName
->
counts
.
get
(
"TRA"
).
get
.
asInstanceOf
[
Long
])
}
if
(
traCounts
.
exists
(
elem
=>
elem
.
_2
>
0
))
traCounts
else
Map
.
empty
...
...
Write
Preview
Supports
Markdown
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