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
273091b4
Commit
273091b4
authored
Apr 20, 2017
by
akaljuvee
Browse files
filling the samples table
parent
7d179c4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCalling.scala
View file @
273091b4
...
...
@@ -20,9 +20,14 @@ import nl.lumc.sasc.biopet.extensions.Pysvtools
import
nl.lumc.sasc.biopet.extensions.tools.VcfStatsForSv
import
nl.lumc.sasc.biopet.pipelines.shiva.svcallers._
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.utils.summary.db.SummaryDb
import
nl.lumc.sasc.biopet.utils.
{
BamUtils
,
Logging
}
import
org.broadinstitute.gatk.queue.QScript
import
scala.concurrent.Await
import
scala.concurrent.duration.Duration
import
scala.concurrent.ExecutionContext.Implicits.global
/**
* Common trait for ShivaVariantcalling
*
...
...
@@ -43,7 +48,16 @@ class ShivaSvCalling(val parent: Configurable) extends QScript with SummaryQScri
/** Executed before script */
def
init
()
:
Unit
=
{
if
(
inputBamsArg
.
nonEmpty
)
inputBams
=
BamUtils
.
sampleBamMap
(
inputBamsArg
)
if
(
inputBamsArg
.
nonEmpty
)
{
inputBams
=
BamUtils
.
sampleBamMap
(
inputBamsArg
)
val
db
=
SummaryDb
.
openSqliteSummary
(
summaryDbFile
)
for
(
sampleName
<-
inputBams
.
keys
)
{
if
(
Await
.
result
(
db
.
getSampleId
(
summaryRunId
,
sampleName
),
Duration
.
Inf
).
isEmpty
)
{
db
.
createSample
(
sampleName
,
summaryRunId
)
}
}
}
outputMergedVCF
=
new
File
(
outputDir
,
"allsamples.merged.vcf"
)
}
...
...
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