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
e5e03434
Commit
e5e03434
authored
Feb 12, 2015
by
Peter van 't Hof
Browse files
Rename afterGraph to beforeGraph
parent
21fba762
Changes
25
Hide whitespace changes
Inline
Side-by-side
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/ApplyRecalibration.scala
View file @
e5e03434
...
...
@@ -11,8 +11,8 @@ import nl.lumc.sasc.biopet.core.config.Configurable
class
ApplyRecalibration
(
val
root
:
Configurable
)
extends
org
.
broadinstitute
.
gatk
.
queue
.
extensions
.
gatk
.
ApplyRecalibration
with
GatkGeneral
{
scatterCount
=
config
(
"scattercount"
,
default
=
0
)
override
def
after
Graph
{
super
.
after
Graph
override
def
before
Graph
{
super
.
before
Graph
nt
=
Option
(
getThreads
(
3
))
memoryLimit
=
Option
(
nt
.
getOrElse
(
1
)
*
2
)
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/BaseRecalibrator.scala
View file @
e5e03434
...
...
@@ -22,7 +22,7 @@ object BaseRecalibrator {
val
br
=
new
BaseRecalibrator
(
root
)
br
.
input_file
:+=
input
br
.
out
=
output
br
.
after
Graph
br
.
before
Graph
return
br
}
}
\ No newline at end of file
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/HaplotypeCaller.scala
View file @
e5e03434
...
...
@@ -35,8 +35,8 @@ class HaplotypeCaller(val root: Configurable) extends org.broadinstitute.gatk.qu
stand_emit_conf
=
config
(
"stand_emit_conf"
,
default
=
0
)
}
override
def
after
Graph
{
super
.
after
Graph
override
def
before
Graph
{
super
.
before
Graph
if
(
bamOutput
!=
null
&&
nct
.
getOrElse
(
1
)
>
1
)
{
threads
=
1
logger
.
warn
(
"BamOutput is on, nct/threads is forced to set on 1, this option is only for debug"
)
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/UnifiedGenotyper.scala
View file @
e5e03434
...
...
@@ -8,8 +8,8 @@ package nl.lumc.sasc.biopet.extensions.gatk
import
nl.lumc.sasc.biopet.core.config.Configurable
class
UnifiedGenotyper
(
val
root
:
Configurable
)
extends
org
.
broadinstitute
.
gatk
.
queue
.
extensions
.
gatk
.
UnifiedGenotyper
with
GatkGeneral
{
override
def
after
Graph
{
super
.
after
Graph
override
def
before
Graph
{
super
.
before
Graph
genotype_likelihoods_model
=
org
.
broadinstitute
.
gatk
.
tools
.
walkers
.
genotyper
.
GenotypeLikelihoodsCalculationModel
.
Model
.
BOTH
if
(
config
.
contains
(
"scattercount"
))
scatterCount
=
config
(
"scattercount"
)
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/VariantEval.scala
View file @
e5e03434
...
...
@@ -9,8 +9,8 @@ import java.io.File
import
nl.lumc.sasc.biopet.core.config.Configurable
class
VariantEval
(
val
root
:
Configurable
)
extends
org
.
broadinstitute
.
gatk
.
queue
.
extensions
.
gatk
.
VariantEval
with
GatkGeneral
{
override
def
after
Graph
{
super
.
after
Graph
override
def
before
Graph
{
super
.
before
Graph
}
}
...
...
@@ -21,7 +21,7 @@ object VariantEval {
vareval
.
eval
=
Seq
(
sample
)
vareval
.
comp
=
Seq
(
compareWith
)
vareval
.
out
=
output
vareval
.
after
Graph
vareval
.
before
Graph
return
vareval
}
...
...
@@ -35,7 +35,7 @@ object VariantEval {
vareval
.
ST
=
ST
vareval
.
noEV
=
true
vareval
.
EV
=
EV
vareval
.
after
Graph
vareval
.
before
Graph
return
vareval
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunctionTrait.scala
View file @
e5e03434
...
...
@@ -51,15 +51,14 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
* Can overr
* ide this method. This is executed after the script is done en queue starts to generate the graph
*/
protected
[
core
]
def
afterGraph
{}
//TODO: function need rename to beforeGraph
protected
[
core
]
def
beforeGraph
{}
/**
* Set default output file, threads and vmem for current job
*/
override
def
freezeFieldValues
()
{
checkExecutable
after
Graph
before
Graph
if
(
jobOutputFile
==
null
)
jobOutputFile
=
new
File
(
firstOutput
.
getParent
+
"/."
+
firstOutput
.
getName
+
"."
+
configName
+
".out"
)
if
(
threads
==
0
)
threads
=
getThreads
(
defaultThreads
)
...
...
@@ -126,7 +125,7 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
addJobReportBinding
(
"cores"
,
nCoresRequest
match
{
case
Some
(
n
)
if
n
>
0
=>
n
case
_
=>
1
case
_
=>
1
})
addJobReportBinding
(
"version"
,
getVersion
)
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetJavaCommandLineFunction.scala
View file @
e5e03434
...
...
@@ -37,8 +37,8 @@ trait BiopetJavaCommandLineFunction extends JavaCommandLineFunction with BiopetC
/**
* Sets memory limit
*/
override
def
after
Graph
{
super
.
after
Graph
override
def
before
Graph
{
super
.
before
Graph
memoryLimit
=
config
(
"memory_limit"
)
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
View file @
e5e03434
...
...
@@ -72,7 +72,7 @@ trait BiopetQScript extends Configurable with GatkLogging {
for
(
function
<-
functions
)
function
match
{
case
f
:
BiopetCommandLineFunctionTrait
=>
{
f
.
checkExecutable
f
.
after
Graph
f
.
before
Graph
f
.
commandLine
}
case
_
=>
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Fastqc.scala
View file @
e5e03434
...
...
@@ -48,7 +48,7 @@ class Fastqc(val root: Configurable) extends BiopetCommandLineFunction {
override
def
versionCommand
=
executable
+
" --version"
override
val
defaultThreads
=
4
override
def
after
Graph
{
override
def
before
Graph
{
this
.
checkExecutable
val
fastqcDir
=
new
File
(
executable
).
getParent
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala
View file @
e5e03434
...
...
@@ -64,10 +64,10 @@ class Raxml(val root: Configurable) extends BiopetCommandLineFunction {
var
executableNonThreads
:
String
=
config
(
"exe"
,
default
=
"raxmlHPC"
)
var
executableThreads
:
Option
[
String
]
=
config
(
"exe_pthreads"
)
override
def
after
Graph
{
override
def
before
Graph
{
if
(
threads
==
0
)
threads
=
getThreads
(
defaultThreads
)
executable
=
if
(
threads
>
1
&&
executableThreads
.
isDefined
)
executableThreads
.
get
else
executableNonThreads
super
.
after
Graph
super
.
before
Graph
out
+:=
getInfoFile
f
match
{
case
"d"
if
b
.
isEmpty
=>
{
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala
View file @
e5e03434
...
...
@@ -47,8 +47,8 @@ class RunGubbins(val root: Configurable) extends BiopetCommandLineFunction {
var
verbose
:
Boolean
=
config
(
"verbose"
,
default
=
false
)
var
noCleanup
:
Boolean
=
config
(
"no_cleanup"
,
default
=
false
)
override
def
after
Graph
:
Unit
=
{
super
.
after
Graph
override
def
before
Graph
:
Unit
=
{
super
.
before
Graph
jobLocalDir
=
new
File
(
outputDirectory
)
if
(
prefix
.
isEmpty
)
prefix
=
Some
(
fastafile
.
getName
)
val
out
:
List
[
String
]
=
List
(
".recombination_predictions.embl"
,
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Sickle.scala
View file @
e5e03434
...
...
@@ -53,7 +53,7 @@ class Sickle(val root: Configurable) extends BiopetCommandLineFunction {
override
val
versionRegex
=
"""sickle version (.*)"""
.
r
override
def
versionCommand
=
executable
+
" --version"
override
def
after
Graph
{
override
def
before
Graph
{
if
(
qualityType
.
isEmpty
)
qualityType
=
Some
(
defaultQualityType
)
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Star.scala
View file @
e5e03434
...
...
@@ -62,7 +62,7 @@ class Star(val root: Configurable) extends BiopetCommandLineFunction {
override
val
defaultVmem
=
"6G"
override
val
defaultThreads
=
8
override
def
after
Graph
()
{
override
def
before
Graph
()
{
if
(
outFileNamePrefix
!=
null
&&
!
outFileNamePrefix
.
endsWith
(
"."
))
outFileNamePrefix
+=
"."
val
prefix
=
if
(
outFileNamePrefix
!=
null
)
outputDir
+
outFileNamePrefix
else
outputDir
if
(
runmode
==
null
)
{
...
...
@@ -103,7 +103,7 @@ object Star {
star
.
outputDir
=
outputDir
star
.
isIntermediate
=
isIntermediate
star
.
deps
=
deps
star
.
after
Graph
star
.
before
Graph
return
star
}
...
...
@@ -111,20 +111,20 @@ object Star {
val
starCommand_pass1
=
Star
(
configurable
,
R1
,
if
(
R2
!=
null
)
R2
else
null
,
new
File
(
outputDir
,
"aln-pass1"
))
starCommand_pass1
.
isIntermediate
=
isIntermediate
starCommand_pass1
.
deps
=
deps
starCommand_pass1
.
after
Graph
starCommand_pass1
.
before
Graph
val
starCommand_reindex
=
new
Star
(
configurable
)
starCommand_reindex
.
sjdbFileChrStartEnd
=
starCommand_pass1
.
outputTab
starCommand_reindex
.
outputDir
=
new
File
(
outputDir
,
"re-index"
)
starCommand_reindex
.
runmode
=
"genomeGenerate"
starCommand_reindex
.
isIntermediate
=
isIntermediate
starCommand_reindex
.
after
Graph
starCommand_reindex
.
before
Graph
val
starCommand_pass2
=
Star
(
configurable
,
R1
,
if
(
R2
!=
null
)
R2
else
null
,
new
File
(
outputDir
,
"aln-pass2"
))
starCommand_pass2
.
genomeDir
=
starCommand_reindex
.
outputDir
starCommand_pass2
.
isIntermediate
=
isIntermediate
starCommand_pass2
.
deps
=
deps
starCommand_pass2
.
after
Graph
starCommand_pass2
.
before
Graph
return
(
starCommand_pass2
.
outputSam
,
List
(
starCommand_pass1
,
starCommand_reindex
,
starCommand_pass2
))
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/TopHat.scala
View file @
e5e03434
...
...
@@ -64,7 +64,7 @@ class TopHat(val root: Configurable) extends BiopetCommandLineFunction {
override
def
versionCommand
=
executable
+
" --version"
override
def
after
Graph
()
{
override
def
before
Graph
()
{
if
(!
outputDir
.
endsWith
(
"/"
))
outputDir
+=
"/"
output
=
new
File
(
outputDir
+
"accepted_hits.bam"
)
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/conifer/ConiferExport.scala
View file @
e5e03434
...
...
@@ -28,7 +28,7 @@ class ConiferExport(val root: Configurable) extends Conifer {
@Output
(
doc
=
"Output <sample>.svdzrpkm.bed"
,
shortName
=
"out"
,
required
=
true
)
var
output
:
File
=
_
override
def
after
Graph
{
override
def
before
Graph
{
this
.
checkExecutable
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala
View file @
e5e03434
...
...
@@ -44,8 +44,8 @@ class IGVToolsCount(val root: Configurable) extends IGVTools {
var
pairs
:
Boolean
=
config
(
"pairs"
,
default
=
false
)
override
def
after
Graph
{
super
.
after
Graph
override
def
before
Graph
{
super
.
before
Graph
if
(!
input
.
exists
())
throw
new
FileNotFoundException
(
"Input bam is required for IGVToolsCount"
)
if
(!
wig
.
isEmpty
&&
!
wig
.
get
.
getAbsolutePath
.
endsWith
(
".wig"
))
throw
new
IllegalArgumentException
(
"Wiggle file should have a .wig file-extension"
)
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/macs2/Macs2CallPeak.scala
View file @
e5e03434
...
...
@@ -55,7 +55,7 @@ class Macs2CallPeak(val root: Configurable) extends Macs2 {
var
broadcutoff
:
Option
[
Int
]
=
config
(
"broadcutoff"
)
var
callsummits
:
Boolean
=
config
(
"callsummits"
,
default
=
false
)
override
def
after
Graph
:
Unit
=
{
override
def
before
Graph
:
Unit
=
{
if
(
name
.
isEmpty
)
throw
new
IllegalArgumentException
(
"Name is not defined"
)
if
(
outputdir
==
null
)
throw
new
IllegalArgumentException
(
"Outputdir is not defined"
)
output_narrow
=
new
File
(
outputdir
+
name
.
get
+
".narrowPeak"
)
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectGcBiasMetrics.scala
View file @
e5e03434
...
...
@@ -49,7 +49,7 @@ class CollectGcBiasMetrics(val root: Configurable) extends Picard {
@Argument
(
doc
=
"IS_BISULFITE_SEQUENCED"
,
required
=
false
)
var
isBisulfiteSequinced
:
Option
[
Boolean
]
=
config
(
"isbisulfitesequinced"
)
override
def
after
Graph
{
override
def
before
Graph
{
if
(
outputChart
==
null
)
outputChart
=
new
File
(
output
+
".pdf"
)
//require(reference.exists)
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectInsertSizeMetrics.scala
View file @
e5e03434
...
...
@@ -54,7 +54,7 @@ class CollectInsertSizeMetrics(val root: Configurable) extends Picard {
@Argument
(
doc
=
"HISTOGRAM_WIDTH"
,
required
=
false
)
var
histogramWidth
:
Option
[
Int
]
=
config
(
"histogramWidth"
)
override
def
after
Graph
{
override
def
before
Graph
{
if
(
outputHistogram
==
null
)
outputHistogram
=
new
File
(
output
+
".pdf"
)
//require(reference.exists)
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/MarkDuplicates.scala
View file @
e5e03434
...
...
@@ -70,8 +70,8 @@ class MarkDuplicates(val root: Configurable) extends Picard {
@Output
(
doc
=
"Bam Index"
,
required
=
true
)
private
var
outputIndex
:
File
=
_
override
def
after
Graph
{
super
.
after
Graph
override
def
before
Graph
{
super
.
before
Graph
if
(
createIndex
)
outputIndex
=
new
File
(
output
.
getAbsolutePath
.
stripSuffix
(
".bam"
)
+
".bai"
)
}
...
...
Prev
1
2
Next
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