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
1aeba6d1
Commit
1aeba6d1
authored
Apr 27, 2016
by
Peter van 't Hof
Browse files
Convert analysis_type to abstract value
parent
59399b66
Changes
17
Hide whitespace changes
Inline
Side-by-side
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/AnalyzeCovariates.scala
View file @
1aeba6d1
...
...
@@ -13,8 +13,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Gather
,
Output
,
_
}
class
AnalyzeCovariates
(
val
root
:
Configurable
)
extends
CommandLineGATK
with
ScatterGatherableFunction
{
analysisName
=
"AnalyzeCovariates"
analysis_type
=
"AnalyzeCovariates"
def
analysis_type
=
"AnalyzeCovariates"
scatterClass
=
classOf
[
LocusScatterFunction
]
setupScatterFunction
=
{
case
scatter
:
GATKScatterFunction
=>
scatter
.
includeUnmapped
=
false
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/ApplyRecalibration.scala
View file @
1aeba6d1
...
...
@@ -57,8 +57,7 @@ import org.broadinstitute.gatk.utils.commandline.Input
import
org.broadinstitute.gatk.utils.commandline.Output
class
ApplyRecalibration
(
val
root
:
Configurable
)
extends
CommandLineGATK
with
ScatterGatherableFunction
{
analysisName
=
"ApplyRecalibration"
analysis_type
=
"ApplyRecalibration"
def
analysis_type
=
"ApplyRecalibration"
scatterClass
=
classOf
[
LocusScatterFunction
]
setupScatterFunction
=
{
case
scatter
:
GATKScatterFunction
=>
scatter
.
includeUnmapped
=
false
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/BaseRecalibrator.scala
View file @
1aeba6d1
...
...
@@ -25,8 +25,7 @@ import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ }
//TODO: check gathering
class
BaseRecalibrator
(
val
root
:
Configurable
)
extends
CommandLineGATK
/* with ScatterGatherableFunction */
{
analysisName
=
"BaseRecalibrator"
analysis_type
=
"BaseRecalibrator"
def
analysis_type
=
"BaseRecalibrator"
//TODO: check gathering
//scatterClass = classOf[ReadScatterFunction]
//setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false }
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineGVCFs.scala
View file @
1aeba6d1
...
...
@@ -13,8 +13,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import
org.broadinstitute.gatk.utils.commandline.
{
Gather
,
Input
,
Output
,
_
}
class
CombineGVCFs
(
val
root
:
Configurable
)
extends
CommandLineGATK
with
ScatterGatherableFunction
{
analysisName
=
"CombineGVCFs"
analysis_type
=
"CombineGVCFs"
def
analysis_type
=
"CombineGVCFs"
scatterClass
=
classOf
[
LocusScatterFunction
]
setupScatterFunction
=
{
case
scatter
:
GATKScatterFunction
=>
scatter
.
includeUnmapped
=
false
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CombineVariants.scala
View file @
1aeba6d1
...
...
@@ -13,8 +13,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Gather
,
Output
,
_
}
class
CombineVariants
(
val
root
:
Configurable
)
extends
CommandLineGATK
with
ScatterGatherableFunction
{
analysisName
=
"CombineVariants"
analysis_type
=
"CombineVariants"
def
analysis_type
=
"CombineVariants"
scatterClass
=
classOf
[
LocusScatterFunction
]
setupScatterFunction
=
{
case
scatter
:
GATKScatterFunction
=>
scatter
.
includeUnmapped
=
false
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/CommandLineGATK.scala
View file @
1aeba6d1
...
...
@@ -7,13 +7,12 @@ import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Gather
,
Input
,
Output
}
trait
CommandLineGATK
extends
BiopetJavaCommandLineFunction
with
Reference
with
Version
{
analysisName
=
"CommandLineGATK"
analysisName
=
analysis_type
javaMainClass
=
"org.broadinstitute.gatk.engine.CommandLineGATK"
jarFile
=
config
(
"gatk_jar"
)
/** Name of the tool to run */
@Argument
(
fullName
=
"analysis_type"
,
shortName
=
"T"
,
doc
=
"Name of the tool to run"
,
required
=
true
,
exclusiveOf
=
""
,
validation
=
""
)
var
analysis_type
:
String
=
_
def
analysis_type
:
String
/** Input file containing sequence data (BAM or CRAM) */
@Input
(
fullName
=
"input_file"
,
shortName
=
"I"
,
doc
=
"Input file containing sequence data (BAM or CRAM)"
,
required
=
false
,
exclusiveOf
=
""
,
validation
=
""
)
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GenotypeGVCFs.scala
View file @
1aeba6d1
...
...
@@ -43,8 +43,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Gather
,
Output
,
_
}
class
GenotypeGVCFs
(
val
root
:
Configurable
)
extends
CommandLineGATK
with
ScatterGatherableFunction
{
analysisName
=
"GenotypeGVCFs"
analysis_type
=
"GenotypeGVCFs"
def
analysis_type
=
"GenotypeGVCFs"
scatterClass
=
classOf
[
LocusScatterFunction
]
setupScatterFunction
=
{
case
scatter
:
GATKScatterFunction
=>
scatter
.
includeUnmapped
=
false
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/HaplotypeCaller.scala
View file @
1aeba6d1
...
...
@@ -5,29 +5,17 @@
*/
package
nl.lumc.sasc.biopet.extensions.gatk.broad
// if (config("inputtype", default = "dna").asString == "rna") {
// dontUseSoftClippedBases = config("dontusesoftclippedbases", default = true)
// stand_call_conf = config("stand_call_conf", default = 5)
// stand_emit_conf = config("stand_emit_conf", default = 0)
// } else {
// dontUseSoftClippedBases = config("dontusesoftclippedbases", default = false)
// stand_call_conf = config("stand_call_conf", default = 5)
// stand_emit_conf = config("stand_emit_conf", default = 0)
// }
//
import
java.io.File
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.queue.extensions.gatk._
import
nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import
nl.lumc.sasc.biopet.utils.VcfUtils
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Gather
,
Input
,
_
}
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Gather
,
Input
,
_
}
import
org.broadinstitute.gatk.utils.variant.GATKVCFIndexType
class
HaplotypeCaller
(
val
root
:
Configurable
)
extends
CommandLineGATK
with
ScatterGatherableFunction
{
analysisName
=
"HaplotypeCaller"
analysis_type
=
"HaplotypeCaller"
def
analysis_type
=
"HaplotypeCaller"
scatterClass
=
classOf
[
LocusScatterFunction
]
setupScatterFunction
=
{
case
scatter
:
GATKScatterFunction
=>
scatter
.
includeUnmapped
=
false
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/IndelRealigner.scala
View file @
1aeba6d1
...
...
@@ -13,8 +13,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Gather
,
Output
,
_
}
class
IndelRealigner
(
val
root
:
Configurable
)
extends
CommandLineGATK
with
ScatterGatherableFunction
{
analysisName
=
"IndelRealigner"
analysis_type
=
"IndelRealigner"
def
analysis_type
=
"IndelRealigner"
scatterClass
=
classOf
[
ReadScatterFunction
]
setupScatterFunction
=
{
case
scatter
:
GATKScatterFunction
=>
scatter
.
includeUnmapped
=
true
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/PrintReads.scala
View file @
1aeba6d1
...
...
@@ -13,8 +13,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import
org.broadinstitute.gatk.utils.commandline._
class
PrintReads
(
val
root
:
Configurable
)
extends
CommandLineGATK
with
ScatterGatherableFunction
{
analysisName
=
"PrintReads"
analysis_type
=
"PrintReads"
def
analysis_type
=
"PrintReads"
scatterClass
=
classOf
[
ReadScatterFunction
]
setupScatterFunction
=
{
case
scatter
:
GATKScatterFunction
=>
scatter
.
includeUnmapped
=
true
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/RealignerTargetCreator.scala
View file @
1aeba6d1
...
...
@@ -13,8 +13,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Gather
,
Input
,
_
}
class
RealignerTargetCreator
(
val
root
:
Configurable
)
extends
CommandLineGATK
with
ScatterGatherableFunction
{
analysisName
=
"RealignerTargetCreator"
analysis_type
=
"RealignerTargetCreator"
def
analysis_type
=
"RealignerTargetCreator"
scatterClass
=
classOf
[
LocusScatterFunction
]
setupScatterFunction
=
{
case
scatter
:
GATKScatterFunction
=>
scatter
.
includeUnmapped
=
false
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/SelectVariants.scala
View file @
1aeba6d1
...
...
@@ -30,8 +30,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Gather
,
Output
,
_
}
class
SelectVariants
(
val
root
:
Configurable
)
extends
CommandLineGATK
with
ScatterGatherableFunction
{
analysisName
=
"SelectVariants"
analysis_type
=
"SelectVariants"
def
analysis_type
=
"SelectVariants"
scatterClass
=
classOf
[
LocusScatterFunction
]
setupScatterFunction
=
{
case
scatter
:
GATKScatterFunction
=>
scatter
.
includeUnmapped
=
false
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/UnifiedGenotyper.scala
View file @
1aeba6d1
...
...
@@ -53,8 +53,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import
org.broadinstitute.gatk.utils.commandline.
{
Gather
,
Input
,
Output
,
_
}
class
UnifiedGenotyper
(
val
root
:
Configurable
)
extends
CommandLineGATK
with
ScatterGatherableFunction
{
analysisName
=
"UnifiedGenotyper"
analysis_type
=
"UnifiedGenotyper"
def
analysis_type
=
"UnifiedGenotyper"
scatterClass
=
classOf
[
LocusScatterFunction
]
setupScatterFunction
=
{
case
scatter
:
GATKScatterFunction
=>
scatter
.
includeUnmapped
=
false
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantAnnotator.scala
View file @
1aeba6d1
...
...
@@ -32,8 +32,7 @@ import org.broadinstitute.gatk.queue.extensions.gatk.{ CatVariantsGatherer, GATK
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Gather
,
Output
,
_
}
class
VariantAnnotator
(
val
root
:
Configurable
)
extends
CommandLineGATK
with
ScatterGatherableFunction
{
analysisName
=
"VariantAnnotator"
analysis_type
=
"VariantAnnotator"
def
analysis_type
=
"VariantAnnotator"
scatterClass
=
classOf
[
LocusScatterFunction
]
setupScatterFunction
=
{
case
scatter
:
GATKScatterFunction
=>
scatter
.
includeUnmapped
=
false
}
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantEval.scala
View file @
1aeba6d1
...
...
@@ -46,8 +46,7 @@ import org.broadinstitute.gatk.utils.commandline.Input
import
org.broadinstitute.gatk.utils.commandline.Output
class
VariantEval
(
val
root
:
Configurable
)
extends
CommandLineGATK
{
analysisName
=
"VariantEval"
analysis_type
=
"VariantEval"
def
analysis_type
=
"VariantEval"
/** An output file created by the walker. Will overwrite contents if file exists */
@Output
(
fullName
=
"out"
,
shortName
=
"o"
,
doc
=
"An output file created by the walker. Will overwrite contents if file exists"
,
required
=
false
,
exclusiveOf
=
""
,
validation
=
""
)
...
...
protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/VariantRecalibrator.scala
View file @
1aeba6d1
...
...
@@ -52,8 +52,7 @@ import org.broadinstitute.gatk.queue.extensions.gatk.{ CatVariantsGatherer, Tagg
import
org.broadinstitute.gatk.utils.commandline.
{
Gather
,
Input
,
Output
,
_
}
class
VariantRecalibrator
(
val
root
:
Configurable
)
extends
CommandLineGATK
{
analysisName
=
"VariantRecalibrator"
analysis_type
=
"VariantRecalibrator"
def
analysis_type
=
"VariantRecalibrator"
/** Recalibration mode to employ */
@Argument
(
fullName
=
"mode"
,
shortName
=
"mode"
,
doc
=
"Recalibration mode to employ"
,
required
=
true
,
exclusiveOf
=
""
,
validation
=
""
)
...
...
public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala
View file @
1aeba6d1
...
...
@@ -15,17 +15,17 @@
*/
package
nl.lumc.sasc.biopet.core
import
java.io.
{
File
,
FileInputStream
,
PrintWriter
}
import
java.io.
{
File
,
FileInputStream
,
PrintWriter
}
import
java.security.MessageDigest
import
nl.lumc.sasc.biopet.utils.Logging
import
org.broadinstitute.gatk.utils.commandline.
{
Gather
,
Input
,
Output
}
import
org.broadinstitute.gatk.utils.commandline.
{
Gather
,
Input
,
Output
}
import
org.broadinstitute.gatk.utils.runtime.ProcessSettings
import
org.ggf.drmaa.JobTemplate
import
scala.collection.mutable
import
scala.io.Source
import
scala.sys.process.
{
Process
,
ProcessLogger
}
import
scala.sys.process.
{
Process
,
ProcessLogger
}
import
scala.collection.JavaConversions._
/** Biopet command line trait to auto check executable and cluster values */
...
...
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