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
60fc26c3
Commit
60fc26c3
authored
Nov 24, 2015
by
Peter van 't Hof
Browse files
Convert breakdancer to sub pipeline of shiva
parent
f85e71c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/breakdancer/Breakdancer.scala
deleted
100644 → 0
View file @
f85e71c2
/**
* Biopet is built on top of GATK Queue for building bioinformatic
* pipelines. It is mainly intended to support LUMC SHARK cluster which is running
* SGE. But other types of HPC that are supported by GATK Queue (such as PBS)
* should also be able to execute Biopet tools and pipelines.
*
* Copyright 2014 Sequencing Analysis Support Core - Leiden University Medical Center
*
* Contact us at: sasc@lumc.nl
*
* A dual licensing mode is applied. The source code within this project that are
* not part of GATK Queue is freely available for non-commercial use under an AGPL
* license; For commercial users or users who do not want to follow the AGPL
* license, please contact us to obtain a separate license.
*/
package
nl.lumc.sasc.biopet.extensions.breakdancer
import
java.io.File
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.core.
{
Reference
,
BiopetQScript
,
PipelineCommand
}
import
org.broadinstitute.gatk.queue.QScript
/// Breakdancer is actually a mini pipeline executing binaries from the breakdancer package
class
Breakdancer
(
val
root
:
Configurable
)
extends
QScript
with
BiopetQScript
with
Reference
{
def
this
()
=
this
(
null
)
@Input
(
doc
=
"Input file (bam)"
)
var
input
:
File
=
_
@Argument
(
doc
=
"Work directory"
)
var
workDir
:
File
=
_
var
deps
:
List
[
File
]
=
Nil
@Output
(
doc
=
"Breakdancer config"
)
lazy
val
configfile
:
File
=
{
new
File
(
workDir
,
input
.
getName
.
substring
(
0
,
input
.
getName
.
lastIndexOf
(
".bam"
))
+
".breakdancer.cfg"
)
}
@Output
(
doc
=
"Breakdancer raw output"
)
lazy
val
outputraw
:
File
=
{
new
File
(
workDir
,
input
.
getName
.
substring
(
0
,
input
.
getName
.
lastIndexOf
(
".bam"
))
+
".breakdancer.tsv"
)
}
@Output
(
doc
=
"Breakdancer VCF output"
)
lazy
val
outputvcf
:
File
=
{
new
File
(
workDir
,
input
.
getName
.
substring
(
0
,
input
.
getName
.
lastIndexOf
(
".bam"
))
+
".breakdancer.vcf"
)
}
override
def
init
()
:
Unit
=
{
}
def
biopetScript
()
{
// read config and set all parameters for the pipeline
logger
.
info
(
"Starting Breakdancer configuration"
)
val
bdcfg
=
BreakdancerConfig
(
this
,
input
,
this
.
configfile
)
bdcfg
.
deps
=
this
.
deps
outputFiles
+=
(
"cfg"
->
bdcfg
.
output
)
add
(
bdcfg
)
val
breakdancer
=
BreakdancerCaller
(
this
,
bdcfg
.
output
,
this
.
outputraw
)
add
(
breakdancer
)
outputFiles
+=
(
"tsv"
->
breakdancer
.
output
)
val
bdvcf
=
BreakdancerVCF
(
this
,
breakdancer
.
output
,
this
.
outputvcf
)
add
(
bdvcf
)
outputFiles
+=
(
"vcf"
->
bdvcf
.
output
)
}
}
object
Breakdancer
extends
PipelineCommand
{
def
apply
(
root
:
Configurable
,
input
:
File
,
runDir
:
File
)
:
Breakdancer
=
{
val
breakdancer
=
new
Breakdancer
(
root
)
breakdancer
.
input
=
input
breakdancer
.
workDir
=
runDir
breakdancer
.
init
()
breakdancer
.
biopetScript
()
breakdancer
}
}
\ No newline at end of file
public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Breakdancer.scala
View file @
60fc26c3
package
nl.lumc.sasc.biopet.pipelines.shiva.svcallers
import
nl.lumc.sasc.biopet.extensions.breakdancer.Breakdancer
import
nl.lumc.sasc.biopet.extensions.breakdancer.
{
Breakdancer
VCF
,
BreakdancerCaller
,
BreakdancerConfig
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
/** Script for sv caler Breakdancer */
...
...
@@ -8,11 +8,16 @@ class Breakdancer(val root: Configurable) extends SvCaller {
def
name
=
"breakdancer"
def
biopetScript
()
{
//TODO: move minipipeline of breakdancer to here
for
((
sample
,
bamFile
)
<-
inputBams
)
{
val
breakdancerDir
=
new
File
(
outputDir
,
sample
)
val
breakdancer
=
Breakdancer
(
this
,
bamFile
,
breakdancerDir
)
addAll
(
breakdancer
.
functions
)
val
breakdancerSampleDir
=
new
File
(
outputDir
,
sample
)
// read config and set all parameters for the pipeline
logger
.
debug
(
"Starting Breakdancer configuration"
)
val
bdcfg
=
BreakdancerConfig
(
this
,
bamFile
,
new
File
(
breakdancerSampleDir
,
sample
+
".breakdancer.cfg"
))
val
breakdancer
=
BreakdancerCaller
(
this
,
bdcfg
.
output
,
new
File
(
breakdancerSampleDir
,
sample
+
".breakdancer.tsv"
))
val
bdvcf
=
BreakdancerVCF
(
this
,
breakdancer
.
output
,
new
File
(
breakdancerSampleDir
,
sample
+
".breakdancer.vcf"
))
add
(
bdcfg
,
breakdancer
,
bdvcf
)
}
}
}
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