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
4e7dee43
Commit
4e7dee43
authored
Aug 19, 2015
by
Peter van 't Hof
Browse files
Changed default max threads
parent
198fc86c
Changes
6
Hide whitespace changes
Inline
Side-by-side
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/ApplyRecalibration.scala
View file @
4e7dee43
...
...
@@ -12,10 +12,12 @@ 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
val
defaultThreads
=
3
override
def
beforeGraph
()
{
super
.
beforeGraph
()
nt
=
Option
(
getThreads
(
3
)
)
nt
=
Option
(
getThreads
)
memoryLimit
=
Option
(
nt
.
getOrElse
(
1
)
*
2
)
import
org.broadinstitute.gatk.tools.walkers.variantrecalibration.VariantRecalibratorArgumentCollection.Mode
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/HaplotypeCaller.scala
View file @
4e7dee43
...
...
@@ -9,6 +9,9 @@ import nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.utils.variant.GATKVCFIndexType
class
HaplotypeCaller
(
val
root
:
Configurable
)
extends
org
.
broadinstitute
.
gatk
.
queue
.
extensions
.
gatk
.
HaplotypeCaller
with
GatkGeneral
{
override
val
defaultThreads
=
1
min_mapping_quality_score
=
config
(
"minMappingQualityScore"
,
default
=
20
)
scatterCount
=
config
(
"scattercount"
,
default
=
1
)
if
(
config
.
contains
(
"dbsnp"
))
this
.
dbsnp
=
config
(
"dbsnp"
)
...
...
@@ -41,7 +44,7 @@ class HaplotypeCaller(val root: Configurable) extends org.broadinstitute.gatk.qu
threads
=
1
logger
.
warn
(
"BamOutput is on, nct/threads is forced to set on 1, this option is only for debug"
)
}
nct
=
Some
(
getThreads
(
1
)
)
nct
=
Some
(
getThreads
)
memoryLimit
=
Option
(
memoryLimit
.
getOrElse
(
2.0
)
*
nct
.
getOrElse
(
1
))
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/UnifiedGenotyper.scala
View file @
4e7dee43
...
...
@@ -26,11 +26,13 @@ class UnifiedGenotyper(val root: Configurable) extends org.broadinstitute.gatk.q
}
}
override
val
defaultThreads
=
1
override
def
beforeGraph
()
{
super
.
beforeGraph
()
genotype_likelihoods_model
=
org
.
broadinstitute
.
gatk
.
tools
.
walkers
.
genotyper
.
GenotypeLikelihoodsCalculationModel
.
Model
.
BOTH
nct
=
Some
(
getThreads
(
1
)
)
nct
=
Some
(
getThreads
)
memoryLimit
=
Option
(
nct
.
getOrElse
(
1
)
*
memoryLimit
.
getOrElse
(
2.0
))
}
}
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantRecalibrator.scala
View file @
4e7dee43
...
...
@@ -11,7 +11,9 @@ import nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile
class
VariantRecalibrator
(
val
root
:
Configurable
)
extends
org
.
broadinstitute
.
gatk
.
queue
.
extensions
.
gatk
.
VariantRecalibrator
with
GatkGeneral
{
nt
=
Option
(
getThreads
(
4
))
override
val
defaultThreads
=
4
nt
=
Option
(
getThreads
)
memoryLimit
=
Option
(
nt
.
getOrElse
(
1
)
*
2
)
if
(
config
.
contains
(
"dbsnp"
))
resource
:+=
new
TaggedFile
(
config
(
"dbsnp"
).
asString
,
"known=true,training=false,truth=false,prior=2.0"
)
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunctionTrait.scala
View file @
4e7dee43
...
...
@@ -199,13 +199,15 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
BiopetCommandLineFunctionTrait
.
versionCache
.
get
(
versionCommand
)
}
def
getThreads
=
getThreads
(
defaultThreads
)
/**
* Get threads from config
* @param default default when not found in config
* @return number of threads
*/
def
getThreads
(
default
:
Int
)
:
Int
=
{
val
maxThreads
:
Int
=
config
(
"maxthreads"
,
default
=
8
)
val
maxThreads
:
Int
=
config
(
"maxthreads"
,
default
=
24
)
val
threads
:
Int
=
config
(
"threads"
,
default
=
default
)
if
(
maxThreads
>
threads
)
threads
else
maxThreads
...
...
@@ -218,7 +220,7 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
* @return number of threads
*/
def
getThreads
(
default
:
Int
,
module
:
String
)
:
Int
=
{
val
maxThreads
:
Int
=
config
(
"maxthreads"
,
default
=
8
,
submodule
=
module
)
val
maxThreads
:
Int
=
config
(
"maxthreads"
,
default
=
24
,
submodule
=
module
)
val
threads
:
Int
=
config
(
"threads"
,
default
=
default
,
submodule
=
module
)
if
(
maxThreads
>
threads
)
threads
else
maxThreads
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala
View file @
4e7dee43
...
...
@@ -74,7 +74,7 @@ class Raxml(val root: Configurable) extends BiopetCommandLineFunction {
/** Sets correct output files to job */
override
def
beforeGraph
()
{
require
(
w
!=
null
)
if
(
threads
==
0
)
threads
=
getThreads
(
defaultThreads
)
if
(
threads
==
0
)
threads
=
getThreads
executable
=
if
(
threads
>
1
&&
executableThreads
.
isDefined
)
executableThreads
.
get
else
executableNonThreads
super
.
beforeGraph
()
out
:::=
List
(
Some
(
getInfoFile
),
getBestTreeFile
,
getBootstrapFile
,
getBipartitionsFile
).
flatten
...
...
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