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
6294de9f
Commit
6294de9f
authored
Jul 22, 2014
by
Peter van 't Hof
Browse files
Changes in config class
parent
385bfef9
Changes
43
Hide whitespace changes
Inline
Side-by-side
bam-metrics/examples/test.json
View file @
6294de9f
{
"reference"
:
"bla"
,
"bedtools"
:
{
"exe"
:
"test"
},
"samtools"
:
{
"exe"
:
"test"
}
}
bam-metrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala
View file @
6294de9f
...
...
@@ -50,12 +50,12 @@ class BamMetrics(val root:Configurable) extends QScript with BiopetQScript {
else
targetInterval
.
output
,
targetInterval
.
output
,
targetDir
))
val
strictOutputBam
=
new
File
(
targetDir
,
inputBam
.
getName
.
stripSuffix
(
".bam"
)
+
".overlap.strict.bam"
)
add
(
BedtoolsIntersect
(
this
,
inputBam
,
bedFile
,
strictOutputBam
,
minOverlap
=
config
(
"strictintersectoverlap"
,
1.0
)),
true
)
add
(
BedtoolsIntersect
(
this
,
inputBam
,
bedFile
,
strictOutputBam
,
minOverlap
=
config
(
"strictintersectoverlap"
,
default
=
1.0
)),
true
)
add
(
SamtoolsFlagstat
(
this
,
strictOutputBam
))
add
(
BiopetFlagstat
(
this
,
strictOutputBam
,
targetDir
))
val
looseOutputBam
=
new
File
(
targetDir
,
inputBam
.
getName
.
stripSuffix
(
".bam"
)
+
".overlap.loose.bam"
)
add
(
BedtoolsIntersect
(
this
,
inputBam
,
bedFile
,
looseOutputBam
,
minOverlap
=
config
(
"looseintersectoverlap"
,
0.01
)),
true
)
add
(
BedtoolsIntersect
(
this
,
inputBam
,
bedFile
,
looseOutputBam
,
minOverlap
=
config
(
"looseintersectoverlap"
,
default
=
0.01
)),
true
)
add
(
SamtoolsFlagstat
(
this
,
looseOutputBam
))
add
(
BiopetFlagstat
(
this
,
looseOutputBam
,
targetDir
))
...
...
bam-metrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/scripts/CoverageStats.scala
View file @
6294de9f
package
nl.lumc.sasc.biopet.pipelines.bammetrics.scripts
import
nl.lumc.sasc.biopet.core._
import
nl.lumc.sasc.biopet.core.config._
import
nl.lumc.sasc.biopet.core.config.Configurable
import
nl.lumc.sasc.biopet.function.PythonCommandLineFunction
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
,
Argument
}
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
java.io.File
class
CoverageStats
(
val
root
:
Configurable
)
extends
PythonCommandLineFunction
{
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala
View file @
6294de9f
package
nl.lumc.sasc.biopet.core
import
org.broadinstitute.gatk.utils.commandline._
import
scala.sys.process._
import
nl.lumc.sasc.biopet.core.config._
abstract
class
BiopetCommandLineFunction
extends
BiopetCommandLineFunctionTrait
{
protected
def
cmdLine
:
String
final
def
commandLine
:
String
=
{
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunctionTrait.scala
View file @
6294de9f
...
...
@@ -40,8 +40,8 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
if
(
threads
>
1
)
nCoresRequest
=
Option
(
threads
)
if
(
vmem
==
null
)
{
if
(
configContains
(
"vmem"
))
vmem
=
config
(
"vmem"
)
else
if
(
!
defaultVmem
.
isEmpty
)
vmem
=
defaultVmem
vmem
=
config
(
"vmem"
)
if
(
vmem
==
null
&&
!
defaultVmem
.
isEmpty
)
vmem
=
defaultVmem
}
if
(
vmem
!=
null
)
jobResourceRequests
:+=
"h_vmem="
+
vmem
jobName
=
this
.
analysisName
+
":"
+
firstOutput
.
getName
...
...
@@ -101,15 +101,15 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
}
def
getThreads
(
default
:
Int
)
:
Int
=
{
val
maxThreads
:
Int
=
config
(
"maxthreads"
,
8
)
val
threads
:
Int
=
config
(
"threads"
,
default
)
val
maxThreads
:
Int
=
config
(
"maxthreads"
,
default
=
8
)
val
threads
:
Int
=
config
(
"threads"
,
default
=
default
)
if
(
maxThreads
>
threads
)
return
threads
else
return
maxThreads
}
def
getThreads
(
default
:
Int
,
module
:
String
)
:
Int
=
{
val
maxThreads
:
Int
=
config
(
"maxthreads"
,
8
,
module
)
val
threads
:
Int
=
config
(
"threads"
,
default
,
module
)
val
maxThreads
:
Int
=
config
(
"maxthreads"
,
default
=
8
,
submodule
=
module
)
val
threads
:
Int
=
config
(
"threads"
,
default
=
default
,
submodule
=
module
)
if
(
maxThreads
>
threads
)
return
threads
else
return
maxThreads
}
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala
View file @
6294de9f
...
...
@@ -9,6 +9,7 @@ trait MultiSampleQScript extends BiopetQScript {
final
def
runSamplesJobs
:
Map
[
String
,
Map
[
String
,
File
]]
=
{
var
output
:
Map
[
String
,
Map
[
String
,
File
]]
=
Map
()
samples
=
config
(
"samples"
)
if
(
samples
==
null
)
samples
=
Map
()
if
(
globalConfig
.
contains
(
"samples"
))
for
((
key
,
value
)
<-
samples
)
{
var
sample
=
Configurable
.
any2map
(
value
)
if
(!
sample
.
contains
(
"ID"
))
sample
+=
(
"ID"
->
key
)
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/config/Config.scala
View file @
6294de9f
...
...
@@ -107,7 +107,7 @@ class Config(var map: Map[String,Any]) extends Logging {
val
requestedIndex
=
ConfigValueIndex
(
module
,
path
,
key
)
if
(
contains
(
requestedIndex
))
return
foundCache
(
requestedIndex
)
else
{
logger
.
error
(
"Value in config could not be found but it seems required, inde: "
+
requestedIndex
)
logger
.
error
(
"Value in config could not be found but it seems required, inde
x
: "
+
requestedIndex
)
throw
new
IllegalStateException
(
"Value in config could not be found but it seems required, index: "
+
requestedIndex
)
}
}
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/config/Configurable.scala
View file @
6294de9f
...
...
@@ -10,25 +10,43 @@ trait Configurable extends Logging {
protected
val
configName
=
getClass
.
getSimpleName
.
toLowerCase
protected
val
configFullPath
=
configName
::
configPath
def
config
(
key
:
String
)
=
globalConfig
(
configName
,
configPath
,
key
)
def
config
(
key
:
String
,
default
:
Any
)
=
globalConfig
(
configName
,
configPath
,
key
,
default
)
def
config
(
key
:
String
,
default
:
Any
,
module
:
String
)
=
globalConfig
(
module
,
configName
::
configPath
,
key
,
default
)
def
config
(
key
:
String
,
default
:
Any
=
null
,
submodule
:
String
=
null
,
required
:
Boolean
=
false
)
:
ConfigValue
=
{
val
m
=
if
(
submodule
!=
null
)
submodule
else
configName
val
p
=
if
(
submodule
!=
null
)
configName
::
configPath
else
configPath
if
(!
configContains
(
key
,
submodule
)
&&
default
==
null
)
{
if
(
required
)
{
logger
.
error
(
"Value in config could not be found but it is required, key: "
+
key
+
" module: "
+
m
+
" path: "
+
p
)
throw
new
IllegalStateException
(
"Value in config could not be found but it is required, key: "
+
key
+
" module: "
+
m
+
" path: "
+
p
)
}
else
return
null
}
if
(
default
==
null
)
return
globalConfig
(
m
,
p
,
key
)
else
return
globalConfig
(
m
,
p
,
key
,
default
)
}
//def config(key:String, default:Any) = globalConfig(configName, configPath, key, default)
//def config(key:String, default:Any, module:String) = globalConfig(module, configName :: configPath, key, default)
def
configContains
(
key
:
String
)
=
globalConfig
.
contains
(
configName
,
configPath
,
key
)
def
configContains
(
key
:
String
,
module
:
String
)
=
globalConfig
.
contains
(
module
,
configName
::
configPath
,
key
)
//def configContains(key:String) = globalConfig.contains(configName, configPath, key)
def
configContains
(
key
:
String
,
submodule
:
String
=
null
)
=
{
val
m
=
if
(
submodule
!=
null
)
submodule
else
configName
val
p
=
if
(
submodule
!=
null
)
configName
::
configPath
else
configPath
globalConfig
.
contains
(
m
,
p
,
key
)
}
implicit
def
configValue2file
(
value
:
ConfigValue
)
=
new
File
(
Configurable
.
any2string
(
value
.
value
))
implicit
def
configValue2string
(
value
:
ConfigValue
)
=
Configurable
.
any2string
(
value
.
value
)
implicit
def
configValue2long
(
value
:
ConfigValue
)
=
Configurable
.
any2long
(
value
.
value
)
implicit
def
configValue2int
(
value
:
ConfigValue
)
=
Configurable
.
any2int
(
value
.
value
)
implicit
def
configValue2optionInt
(
value
:
ConfigValue
)
=
Option
(
Configurable
.
any2int
(
value
.
value
))
implicit
def
configValue2double
(
value
:
ConfigValue
)
=
Configurable
.
any2double
(
value
.
value
)
implicit
def
configValue2optionDouble
(
value
:
ConfigValue
)
=
Option
(
Configurable
.
any2double
(
value
.
value
))
implicit
def
configValue2boolean
(
value
:
ConfigValue
)
=
Configurable
.
any2boolean
(
value
.
value
)
implicit
def
configValue2list
(
value
:
ConfigValue
)
=
Configurable
.
any2list
(
value
.
value
)
implicit
def
configValue2stringList
(
value
:
ConfigValue
)
=
Configurable
.
any2stringList
(
value
.
value
)
implicit
def
configValue2stringSet
(
value
:
ConfigValue
)
=
Configurable
.
any2stringList
(
value
.
value
).
toSet
implicit
def
configValue2map
(
value
:
ConfigValue
)
=
Configurable
.
any2map
(
value
.
value
)
implicit
def
configValue2file
(
value
:
ConfigValue
)
:
File
=
if
(
value
!=
null
)
new
File
(
Configurable
.
any2string
(
value
.
value
))
else
null
implicit
def
configValue2string
(
value
:
ConfigValue
)
:
String
=
if
(
value
!=
null
)
Configurable
.
any2string
(
value
.
value
)
else
null
implicit
def
configValue2long
(
value
:
ConfigValue
)
:
Long
=
if
(
value
!=
null
)
Configurable
.
any2long
(
value
.
value
)
else
0
implicit
def
configValue2optionLong
(
value
:
ConfigValue
)
:
Option
[
Long
]
=
if
(
value
!=
null
)
Option
(
Configurable
.
any2long
(
value
.
value
))
else
None
implicit
def
configValue2int
(
value
:
ConfigValue
)
:
Int
=
if
(
value
!=
null
)
Configurable
.
any2int
(
value
.
value
)
else
0
implicit
def
configValue2optionInt
(
value
:
ConfigValue
)
:
Option
[
Int
]
=
if
(
value
!=
null
)
Option
(
Configurable
.
any2int
(
value
.
value
))
else
None
implicit
def
configValue2double
(
value
:
ConfigValue
)
:
Double
=
if
(
value
!=
null
)
Configurable
.
any2double
(
value
.
value
)
else
0
implicit
def
configValue2optionDouble
(
value
:
ConfigValue
)
:
Option
[
Double
]
=
if
(
value
!=
null
)
Option
(
Configurable
.
any2double
(
value
.
value
))
else
None
implicit
def
configValue2boolean
(
value
:
ConfigValue
)
:
Boolean
=
if
(
value
!=
null
)
Configurable
.
any2boolean
(
value
.
value
)
else
false
implicit
def
configValue2optionBoolean
(
value
:
ConfigValue
)
:
Option
[
Boolean
]
=
if
(
value
!=
null
)
Option
(
Configurable
.
any2boolean
(
value
.
value
))
else
None
implicit
def
configValue2list
(
value
:
ConfigValue
)
:
List
[
Any
]
=
if
(
value
!=
null
)
Configurable
.
any2list
(
value
.
value
)
else
null
implicit
def
configValue2stringList
(
value
:
ConfigValue
)
:
List
[
String
]
=
if
(
value
!=
null
)
Configurable
.
any2stringList
(
value
.
value
)
else
null
implicit
def
configValue2stringSet
(
value
:
ConfigValue
)
:
Set
[
String
]
=
if
(
value
!=
null
)
Configurable
.
any2stringList
(
value
.
value
).
toSet
else
null
implicit
def
configValue2map
(
value
:
ConfigValue
)
:
Map
[
String
,
Any
]
=
if
(
value
!=
null
)
Configurable
.
any2map
(
value
.
value
)
else
null
}
object
Configurable
extends
Logging
{
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/function/Cat.scala
View file @
6294de9f
package
nl.lumc.sasc.biopet.function
import
nl.lumc.sasc.biopet.core.
_
import
nl.lumc.sasc.biopet.core.config.
_
import
nl.lumc.sasc.biopet.core.
BiopetCommandLineFunction
import
nl.lumc.sasc.biopet.core.config.
Configurable
import
org.broadinstitute.gatk.utils.commandline._
import
java.io.File
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/function/Ln.scala
View file @
6294de9f
package
nl.lumc.sasc.biopet.function
import
nl.lumc.sasc.biopet.core._
import
nl.lumc.sasc.biopet.core.config._
import
nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.queue.function.InProcessFunction
import
org.broadinstitute.gatk.utils.commandline.
_
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
java.io.File
import
scala.sys.process.
_
import
scala.sys.process.
Process
class
Ln
(
val
root
:
Configurable
)
extends
InProcessFunction
with
Configurable
{
this
.
analysisName
=
getClass
.
getSimpleName
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/function/Pbzip2.scala
View file @
6294de9f
package
nl.lumc.sasc.biopet.function
import
nl.lumc.sasc.biopet.core._
import
nl.lumc.sasc.biopet.core.config._
//import org.broadinstitute.sting.queue.function.CommandLineFunction
import
org.broadinstitute.gatk.utils.commandline._
import
nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import
nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
java.io.File
class
Pbzip2
(
val
root
:
Configurable
)
extends
BiopetCommandLineFunction
{
...
...
@@ -13,16 +12,16 @@ class Pbzip2(val root:Configurable) extends BiopetCommandLineFunction {
@Output
(
doc
=
"Unzipped file"
)
var
output
:
File
=
_
executable
=
config
(
"exe"
,
"pbzip2"
)
executable
=
config
(
"exe"
,
default
=
"pbzip2"
)
var
decomrpess
=
true
var
memory
:
Int
=
config
(
"memory"
,
1000
)
var
memory
:
Option
[
Int
]
=
config
(
"memory"
)
override
val
defaultVmem
=
(
memory
*
2
/
1000
)
+
"G"
override
val
defaultVmem
=
(
memory
.
getOrElse
(
1000
)
*
2
/
1000
)
+
"G"
override
val
defaultThreads
=
2
override
def
beforeCmd
{
memory
=
memory
*
threads
if
(!
memory
.
isEmpty
)
memory
=
Option
(
memory
.
get
*
threads
)
}
def
cmdLine
=
required
(
executable
)
+
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/function/PythonCommandLineFunction.scala
View file @
6294de9f
package
nl.lumc.sasc.biopet.function
import
java.io.FileOutputStream
import
nl.lumc.sasc.biopet.core._
import
org.broadinstitute.gatk.utils.commandline._
import
java.io.File
import
org.broadinstitute.gatk.utils.commandline.
{
Input
}
import
nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import
scala.collection.JavaConversions._
trait
PythonCommandLineFunction
extends
BiopetCommandLineFunction
{
@Input
(
doc
=
"Python script"
,
required
=
false
)
var
python_script
:
File
=
_
executable
=
config
(
"
python_exe"
,
"python"
)
executable
=
config
(
"
exe"
,
default
=
"python"
,
submodule
=
"python"
)
protected
var
python_script_name
:
String
=
_
def
setPythonScript
(
script
:
String
)
{
setPythonScript
(
script
,
""
)
}
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/function/Sha1sum.scala
View file @
6294de9f
package
nl.lumc.sasc.biopet.function
import
nl.lumc.sasc.biopet.core.
_
import
nl.lumc.sasc.biopet.core.config.
_
import
nl.lumc.sasc.biopet.core.
BiopetCommandLineFunction
import
nl.lumc.sasc.biopet.core.config.
Configurable
import
org.broadinstitute.gatk.utils.commandline._
import
java.io.File
...
...
@@ -12,7 +12,7 @@ class Sha1sum(val root:Configurable) extends BiopetCommandLineFunction {
@Output
(
doc
=
"Unzipped file"
)
var
output
:
File
=
_
executable
=
config
(
"exe"
,
"sha1sum"
)
executable
=
config
(
"exe"
,
default
=
"sha1sum"
)
def
cmdLine
=
required
(
executable
)
+
required
(
input
)
+
" > "
+
required
(
output
)
}
\ No newline at end of file
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/function/Zcat.scala
View file @
6294de9f
package
nl.lumc.sasc.biopet.function
import
nl.lumc.sasc.biopet.core.
_
import
nl.lumc.sasc.biopet.core.config.
_
import
org.broadinstitute.gatk.utils.commandline.
_
import
nl.lumc.sasc.biopet.core.
BiopetCommandLineFunction
import
nl.lumc.sasc.biopet.core.config.
Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
java.io.File
class
Zcat
(
val
root
:
Configurable
)
extends
BiopetCommandLineFunction
{
...
...
@@ -12,7 +12,7 @@ class Zcat(val root:Configurable) extends BiopetCommandLineFunction {
@Output
(
doc
=
"Unzipped file"
)
var
output
:
File
=
_
executable
=
config
(
"exe"
,
"zcat"
)
executable
=
config
(
"exe"
,
default
=
"zcat"
)
def
cmdLine
=
required
(
executable
)
+
required
(
input
)
+
" > "
+
required
(
output
)
}
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/function/bedtools/Bedtools.scala
View file @
6294de9f
...
...
@@ -3,7 +3,7 @@ package nl.lumc.sasc.biopet.function.bedtools
import
nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
abstract
class
Bedtools
extends
BiopetCommandLineFunction
{
executable
=
config
(
"exe"
,
"bedtools"
,
"bedtools"
)
executable
=
config
(
"exe"
,
default
=
"bedtools"
,
submodule
=
"bedtools"
)
override
def
versionCommand
=
executable
+
" --version"
override
val
versionRegex
=
"""bedtools (.*)"""
.
r
}
\ No newline at end of file
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/function/bedtools/BedtoolsIntersect.scala
View file @
6294de9f
...
...
@@ -15,7 +15,7 @@ class BedtoolsIntersect(val root:Configurable) extends Bedtools {
var
output
:
File
=
_
@Argument
(
doc
=
"Min overlap"
,
required
=
false
)
var
minOverlap
:
Double
=
config
(
"minoverlap"
,
1
E
-
9
)
var
minOverlap
:
Option
[
Double
]
=
config
(
"minoverlap"
)
@Argument
(
doc
=
"Only count"
,
required
=
false
)
var
count
:
Boolean
=
false
...
...
@@ -29,7 +29,7 @@ class BedtoolsIntersect(val root:Configurable) extends Bedtools {
def
cmdLine
=
required
(
executable
)
+
required
(
"intersect"
)
+
required
(
inputTag
,
input
)
+
required
(
"-b"
,
intersectFile
)
+
required
(
"-f"
,
minOverlap
)
+
optional
(
"-f"
,
minOverlap
)
+
conditional
(
count
,
"-c"
)
+
" > "
+
required
(
output
)
}
...
...
@@ -41,7 +41,7 @@ object BedtoolsIntersect {
bedtoolsIntersect
.
input
=
input
bedtoolsIntersect
.
intersectFile
=
intersect
bedtoolsIntersect
.
output
=
output
if
(
minOverlap
>
0
)
bedtoolsIntersect
.
minOverlap
=
minOverlap
if
(
minOverlap
>
0
)
bedtoolsIntersect
.
minOverlap
=
Option
(
minOverlap
)
bedtoolsIntersect
.
count
=
count
return
bedtoolsIntersect
}
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/function/picard/CalculateHsMetrics.scala
View file @
6294de9f
...
...
@@ -23,10 +23,10 @@ class CalculateHsMetrics(val root:Configurable) extends Picard {
var
perTargetCoverage
:
File
=
_
@Argument
(
doc
=
"Reference file"
,
required
=
false
)
var
reference
:
File
=
config
(
"reference"
,
""
)
var
reference
:
File
=
config
(
"reference"
)
@Argument
(
doc
=
"METRIC_ACCUMULATION_LEVEL"
,
required
=
false
)
var
metricAccumulationLevel
:
List
[
String
]
=
config
(
"metricaccumulationlevel"
,
List
()
)
var
metricAccumulationLevel
:
List
[
String
]
=
config
(
"metricaccumulationlevel"
)
@Argument
(
doc
=
"BAIT_SET_NAME"
,
required
=
false
)
var
baitSetName
:
String
=
_
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/function/picard/CollectAlignmentSummaryMetrics.scala
View file @
6294de9f
...
...
@@ -11,38 +11,39 @@ class CollectAlignmentSummaryMetrics(val root:Configurable) extends Picard {
var
input
:
File
=
_
@Argument
(
doc
=
"MAX_INSERT_SIZE"
,
required
=
false
)
var
maxInstertSize
:
Int
=
config
(
"maxInstertSize"
,
100000
)
var
maxInstertSize
:
Option
[
Int
]
=
config
(
"maxInstertSize"
)
@Argument
(
doc
=
"ADAPTER_SEQUENCE"
,
required
=
false
)
var
adapterSequence
:
List
[
String
]
=
config
(
"adapterSequence"
,
Nil
)
var
adapterSequence
:
List
[
String
]
=
config
(
"adapterSequence"
)
@Argument
(
doc
=
"IS_BISULFITE_SEQUENCED"
,
required
=
false
)
var
isBisulfiteSequenced
:
Boolean
=
config
(
"isBisulfiteSequenced"
,
false
)
var
isBisulfiteSequenced
:
Option
[
Boolean
]
=
config
(
"isBisulfiteSequenced"
)
@Output
(
doc
=
"The output file to write statistics to"
,
required
=
true
)
var
output
:
File
=
_
@Argument
(
doc
=
"Reference file"
,
required
=
false
)
var
reference
:
File
=
config
(
"reference"
,
""
)
var
reference
:
File
=
config
(
"reference"
)
@Argument
(
doc
=
"ASSUME_SORTED"
,
required
=
false
)
var
assumeSorted
:
Boolean
=
config
(
"assumeSorted"
,
fals
e
)
var
assumeSorted
:
Boolean
=
config
(
"assumeSorted"
,
default
=
tru
e
)
@Argument
(
doc
=
"METRIC_ACCUMULATION_LEVEL"
,
required
=
false
)
var
metricAccumulationLevel
:
List
[
String
]
=
config
(
"metricaccumulationlevel"
,
List
()
)
var
metricAccumulationLevel
:
List
[
String
]
=
config
(
"metricaccumulationlevel"
)
@Argument
(
doc
=
"STOP_AFTER"
,
required
=
false
)
var
stopAfter
:
Long
=
config
(
"stopAfter"
,
0
)
var
stopAfter
:
Option
[
Long
]
=
config
(
"stopAfter"
)
override
def
commandLine
=
super
.
commandLine
+
required
(
"INPUT="
,
input
,
spaceSeparated
=
false
)
+
required
(
"OUTPUT="
,
output
,
spaceSeparated
=
false
)
+
optional
(
"REFERENCE_SEQUENCE="
,
reference
,
spaceSeparated
=
false
)
+
repeat
(
"METRIC_ACCUMULATION_LEVEL="
,
metricAccumulationLevel
,
spaceSeparated
=
false
)
+
required
(
"MAX_INSERT_SIZE="
,
maxInstertSize
,
spaceSeparated
=
false
)
+
required
(
"IS_BISULFITE_SEQUENCED="
,
isBisulfiteSequenced
,
spaceSeparated
=
false
)
+
optional
(
"MAX_INSERT_SIZE="
,
maxInstertSize
,
spaceSeparated
=
false
)
+
optional
(
"IS_BISULFITE_SEQUENCED="
,
isBisulfiteSequenced
,
spaceSeparated
=
false
)
+
optional
(
"ASSUME_SORTED="
,
assumeSorted
,
spaceSeparated
=
false
)
+
optional
(
"STOP_AFTER="
,
stopAfter
,
spaceSeparated
=
false
)
optional
(
"STOP_AFTER="
,
stopAfter
,
spaceSeparated
=
false
)
+
repeat
(
"ADAPTER_SEQUENCE="
,
adapterSequence
,
spaceSeparated
=
false
)
}
object
CollectAlignmentSummaryMetrics
{
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/function/picard/CollectGcBiasMetrics.scala
View file @
6294de9f
...
...
@@ -20,19 +20,19 @@ class CollectGcBiasMetrics(val root:Configurable) extends Picard {
var
outputSummary
:
File
=
_
@Argument
(
doc
=
"Reference file"
,
required
=
false
)
var
reference
:
File
=
config
(
"reference"
,
""
)
var
reference
:
File
=
config
(
"reference"
,
required
=
true
)
@Argument
(
doc
=
"Window size"
,
required
=
false
)
var
windowSize
:
Int
=
config
(
"windowsize"
,
100
)
var
windowSize
:
Option
[
Int
]
=
config
(
"windowsize"
)
@Argument
(
doc
=
"MINIMUM_GENOME_FRACTION"
,
required
=
false
)
var
minGenomeFraction
:
Double
=
config
(
"mingenomefraction"
,
1.0E-5
)
var
minGenomeFraction
:
Option
[
Double
]
=
config
(
"mingenomefraction"
)
@Argument
(
doc
=
"ASSUME_SORTED"
,
required
=
false
)
var
assumeSorted
:
Boolean
=
config
(
"assumesorted"
,
fals
e
)
var
assumeSorted
:
Boolean
=
config
(
"assumesorted"
,
default
=
tru
e
)
@Argument
(
doc
=
"IS_BISULFITE_SEQUENCED"
,
required
=
false
)
var
isBisulfiteSequinced
:
Boolean
=
config
(
"isbisulfitesequinced"
,
false
)
var
isBisulfiteSequinced
:
Option
[
Boolean
]
=
config
(
"isbisulfitesequinced"
)
override
def
afterGraph
{
if
(
outputChart
==
null
)
outputChart
=
new
File
(
output
+
".pdf"
)
...
...
@@ -48,7 +48,7 @@ class CollectGcBiasMetrics(val root:Configurable) extends Picard {
optional
(
"WINDOW_SIZE="
,
windowSize
,
spaceSeparated
=
false
)
+
optional
(
"MINIMUM_GENOME_FRACTION="
,
minGenomeFraction
,
spaceSeparated
=
false
)
+
conditional
(
assumeSorted
,
"ASSUME_SORTED=TRUE"
)
+
conditional
(
isBisulfiteSequinced
,
"IS_BISULFITE_SEQUENCED=TRUE"
)
conditional
(
isBisulfiteSequinced
.
getOrElse
(
false
)
,
"IS_BISULFITE_SEQUENCED=TRUE"
)
}
object
CollectGcBiasMetrics
{
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/function/picard/CollectInsertSizeMetrics.scala
View file @
6294de9f
...
...
@@ -17,25 +17,25 @@ class CollectInsertSizeMetrics(val root:Configurable) extends Picard {
var
outputHistogram
:
File
=
_
@Argument
(
doc
=
"Reference file"
,
required
=
false
)
var
reference
:
File
=
config
(
"reference"
,
""
)
var
reference
:
File
=
config
(
"reference"
)
@Argument
(
doc
=
"DEVIATIONS"
,
required
=
false
)
var
deviations
:
Double
=
config
(
"deviations"
,
10.0
)
var
deviations
:
Option
[
Double
]
=
config
(
"deviations"
)
@Argument
(
doc
=
"MINIMUM_PCT"
,
required
=
false
)
var
minPct
:
Double
=
config
(
"minpct"
,
0.05
)
var
minPct
:
Option
[
Double
]
=
config
(
"minpct"
)
@Argument
(
doc
=
"ASSUME_SORTED"
,
required
=
false
)
var
assumeSorted
:
Boolean
=
config
(
"assumesorted"
,
fals
e
)
var
assumeSorted
:
Boolean
=
config
(
"assumesorted"
,
default
=
tru
e
)
@Argument
(
doc
=
"STOP_AFTER"
,
required
=
false
)
var
stopAfter
:
Long
=
config
(
"
metricaccumulationlevel"
,
0
)
var
stopAfter
:
Option
[
Long
]
=
config
(
"
stopAfter"
)
@Argument
(
doc
=
"METRIC_ACCUMULATION_LEVEL"
,
required
=
false
)
var
metricAccumulationLevel
:
List
[
String
]
=
config
(
"metricaccumulationlevel"
,
List
()
)
var
metricAccumulationLevel
:
List
[
String
]
=
config
(
"metricaccumulationlevel"
)
@Argument
(
doc
=
"HISTOGRAM_WIDTH"
,
required
=
false
)
var
histogramWidth
:
Int
=
config
(
"histogramWidth"
,
0
)
var
histogramWidth
:
Option
[
Int
]
=
config
(
"histogramWidth"
)
override
def
afterGraph
{
if
(
outputHistogram
==
null
)
outputHistogram
=
new
File
(
output
+
".pdf"
)
...
...
@@ -49,8 +49,8 @@ class CollectInsertSizeMetrics(val root:Configurable) extends Picard {
required
(
"REFERENCE_SEQUENCE="
,
reference
,
spaceSeparated
=
false
)
+
optional
(
"DEVIATIONS="
,
deviations
,
spaceSeparated
=
false
)
+
repeat
(
"METRIC_ACCUMULATION_LEVEL="
,
metricAccumulationLevel
,
spaceSeparated
=
false
)
+
(
if
(
stopAfter
>
0
)
optional
(
"STOP_AFTER="
,
stopAfter
,
spaceSeparated
=
false
)
else
""
)
+
(
if
(
histogramWidth
>
0
)
optional
(
"HISTOGRAM_WIDTH="
,
histogramWidth
,
spaceSeparated
=
false
)
else
""
)
+
optional
(
"STOP_AFTER="
,
stopAfter
,
spaceSeparated
=
false
)
+
optional
(
"HISTOGRAM_WIDTH="
,
histogramWidth
,
spaceSeparated
=
false
)
+
conditional
(
assumeSorted
,
"ASSUME_SORTED=TRUE"
)
}
...
...
Prev
1
2
3
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