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
42abd53f
Commit
42abd53f
authored
Sep 01, 2014
by
Peter van 't Hof
Browse files
Added nested class, configContains() now replaced by config.contains()
parent
45e799b7
Changes
9
Hide whitespace changes
Inline
Side-by-side
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/config/Configurable.scala
View file @
42abd53f
...
...
@@ -9,30 +9,31 @@ trait Configurable extends Logging {
val
configPath
:
List
[
String
]
=
if
(
root
!=
null
)
root
.
configFullPath
else
List
()
protected
val
configName
=
getClass
.
getSimpleName
.
toLowerCase
protected
val
configFullPath
=
configName
::
configPath
def
config
(
key
:
String
,
default
:
Any
=
null
,
submodule
:
String
=
null
,
required
:
Boolean
=
false
,
freeVar
:
Boolean
=
true
)
:
ConfigValue
=
{
val
m
=
if
(
submodule
!=
null
)
submodule
else
configName
val
p
=
if
(
submodule
!=
null
)
configName
::
configPath
else
configPath
if
(!
configContains
(
key
,
submodule
,
freeVar
)
&&
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
val
config
=
new
ConfigFuntions
protected
class
ConfigFuntions
{
def
apply
(
key
:
String
,
default
:
Any
=
null
,
submodule
:
String
=
null
,
required
:
Boolean
=
false
,
freeVar
:
Boolean
=
true
)
:
ConfigValue
=
{
val
m
=
if
(
submodule
!=
null
)
submodule
else
configName
val
p
=
if
(
submodule
!=
null
)
configName
::
configPath
else
configPath
if
(!
contains
(
key
,
submodule
,
freeVar
)
&&
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
,
freeVar
)
else
return
globalConfig
(
m
,
p
,
key
,
default
,
freeVar
)
}
if
(
default
==
null
)
return
globalConfig
(
m
,
p
,
key
,
freeVar
)
else
return
globalConfig
(
m
,
p
,
key
,
default
,
freeVar
)
}
//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
contains
(
key
:
String
,
submodule
:
String
=
null
,
freeVar
:
Boolean
=
true
)
=
{
val
m
=
if
(
submodule
!=
null
)
submodule
else
configName
val
p
=
if
(
submodule
!=
null
)
configName
::
configPath
else
configPath
//def configContains(key:String) = globalConfig.contains(configName, configPath, key)
def
configContains
(
key
:
String
,
submodule
:
String
=
null
,
freeVar
:
Boolean
=
true
)
=
{
val
m
=
if
(
submodule
!=
null
)
submodule
else
configName
val
p
=
if
(
submodule
!=
null
)
configName
::
configPath
else
configPath
globalConfig
.
contains
(
m
,
p
,
key
,
freeVar
)
globalConfig
.
contains
(
m
,
p
,
key
,
freeVar
)
}
}
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
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Cutadapt.scala
View file @
42abd53f
package
nl.lumc.sasc.biopet.extensions
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
java.io.File
import
nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import
nl.lumc.sasc.biopet.core.config.Configurable
...
...
@@ -23,11 +21,11 @@ class Cutadapt(val root: Configurable) extends BiopetCommandLineFunction {
var
default_clip_mode
:
String
=
config
(
"default_clip_mode"
,
default
=
"3"
)
var
opt_adapter
:
Set
[
String
]
=
Set
()
if
(
config
C
ontains
(
"adapter"
))
for
(
adapter
<-
config
(
"adapter"
).
getList
)
opt_adapter
+=
adapter
.
toString
if
(
config
.
c
ontains
(
"adapter"
))
for
(
adapter
<-
config
(
"adapter"
).
getList
)
opt_adapter
+=
adapter
.
toString
var
opt_anywhere
:
Set
[
String
]
=
Set
()
if
(
config
C
ontains
(
"anywhere"
))
for
(
adapter
<-
config
(
"anywhere"
).
getList
)
opt_anywhere
+=
adapter
.
toString
if
(
config
.
c
ontains
(
"anywhere"
))
for
(
adapter
<-
config
(
"anywhere"
).
getList
)
opt_anywhere
+=
adapter
.
toString
var
opt_front
:
Set
[
String
]
=
Set
()
if
(
config
C
ontains
(
"front"
))
for
(
adapter
<-
config
(
"front"
).
getList
)
opt_front
+=
adapter
.
toString
if
(
config
.
c
ontains
(
"front"
))
for
(
adapter
<-
config
(
"front"
).
getList
)
opt_front
+=
adapter
.
toString
var
opt_discard
:
Boolean
=
config
(
"discard"
)
var
opt_minimum_length
:
String
=
config
(
"minimum_length"
,
1
)
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala
View file @
42abd53f
...
...
@@ -29,12 +29,12 @@ class BamMetrics(val root: Configurable) extends QScript with BiopetQScript {
for
(
file
<-
configfiles
)
globalConfig
.
loadConfigFile
(
file
)
if
(
outputDir
==
null
)
throw
new
IllegalStateException
(
"Missing Output directory on BamMetrics module"
)
else
if
(!
outputDir
.
endsWith
(
"/"
))
outputDir
+=
"/"
if
(
config
C
ontains
(
"targetBed"
))
{
if
(
config
.
c
ontains
(
"targetBed"
))
{
for
(
file
<-
config
(
"targetBed"
).
getList
)
{
bedFiles
+:=
new
File
(
file
.
toString
)
}
}
if
(
baitBedFile
==
null
&&
config
C
ontains
(
"targetBait"
))
baitBedFile
=
config
(
"targetBait"
)
if
(
baitBedFile
==
null
&&
config
.
c
ontains
(
"targetBait"
))
baitBedFile
=
config
(
"targetBait"
)
}
def
biopetScript
()
{
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkBenchmarkGenotyping.scala
View file @
42abd53f
...
...
@@ -25,7 +25,7 @@ class GatkBenchmarkGenotyping(val root: Configurable) extends QScript with Biope
var
dbsnp
:
File
=
_
def
init
()
{
if
(
config
C
ontains
(
"gvcffiles"
))
for
(
file
<-
config
(
"gvcffiles"
).
getList
)
{
if
(
config
.
c
ontains
(
"gvcffiles"
))
for
(
file
<-
config
(
"gvcffiles"
).
getList
)
{
gvcfFiles
::=
file
.
toString
}
if
(
reference
==
null
)
reference
=
config
(
"reference"
)
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkGenotyping.scala
View file @
42abd53f
...
...
@@ -52,8 +52,8 @@ class GatkGenotyping(val root: Configurable) extends QScript with BiopetQScript
def
addGenotypeGVCFs
(
gvcfFiles
:
List
[
File
],
outputFile
:
File
)
:
File
=
{
val
genotypeGVCFs
=
new
GenotypeGVCFs
()
with
gatkArguments
{
this
.
variant
=
gvcfFiles
if
(
config
C
ontains
(
"dbsnp"
))
this
.
dbsnp
=
config
(
"dbsnp"
)
if
(
config
C
ontains
(
"scattercount"
,
submodule
=
"genotypegvcfs"
))
if
(
config
.
c
ontains
(
"dbsnp"
))
this
.
dbsnp
=
config
(
"dbsnp"
)
if
(
config
.
c
ontains
(
"scattercount"
,
submodule
=
"genotypegvcfs"
))
this
.
scatterCount
=
config
(
"scattercount"
,
submodule
=
"genotypegvcfs"
)
this
.
out
=
outputFile
if
(
config
(
"inputtype"
,
"dna"
).
getString
==
"rna"
)
{
...
...
@@ -73,7 +73,7 @@ class GatkGenotyping(val root: Configurable) extends QScript with BiopetQScript
this
.
variant
=
inputFile
for
(
sample
<-
samples
)
this
.
sample_name
:+=
sample
this
.
excludeNonVariants
=
true
if
(
config
C
ontains
(
"scattercount"
,
submodule
=
"selectvariants"
))
if
(
config
.
c
ontains
(
"scattercount"
,
submodule
=
"selectvariants"
))
this
.
scatterCount
=
config
(
"scattercount"
,
submodule
=
"selectvariants"
)
this
.
out
=
outputDir
+
name
+
".vcf"
}
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkPipeline.scala
View file @
42abd53f
...
...
@@ -31,7 +31,7 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
for
(
file
<-
configfiles
)
globalConfig
.
loadConfigFile
(
file
)
reference
=
config
(
"reference"
,
required
=
true
)
dbsnp
=
config
(
"dbsnp"
)
if
(
config
C
ontains
(
"gvcfFiles"
))
if
(
config
.
c
ontains
(
"gvcfFiles"
))
for
(
file
<-
config
(
"gvcfFiles"
).
getList
)
gvcfFiles
:+=
file
.
toString
if
(
outputDir
==
null
)
throw
new
IllegalStateException
(
"Missing Output directory on gatk module"
)
...
...
@@ -156,25 +156,25 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
val
variantRecalibrator
=
new
VariantRecalibrator
()
with
gatkArguments
{
if
(
mode_arg
==
"indel"
)
{
this
.
mode
=
org
.
broadinstitute
.
gatk
.
tools
.
walkers
.
variantrecalibration
.
VariantRecalibratorArgumentCollection
.
Mode
.
INDEL
if
(
config
C
ontains
(
"mills"
,
submodule
=
"variantrecalibrator"
))
if
(
config
.
c
ontains
(
"mills"
,
submodule
=
"variantrecalibrator"
))
this
.
resource
:+=
new
TaggedFile
(
config
(
"mills"
,
submodule
=
"variantrecalibrator"
).
getString
,
"known=false,training=true,truth=true,prior=12.0"
)
}
else
{
// SNP
this
.
mode
=
org
.
broadinstitute
.
gatk
.
tools
.
walkers
.
variantrecalibration
.
VariantRecalibratorArgumentCollection
.
Mode
.
SNP
if
(
config
C
ontains
(
"hapmap"
,
submodule
=
"variantrecalibrator"
))
if
(
config
.
c
ontains
(
"hapmap"
,
submodule
=
"variantrecalibrator"
))
this
.
resource
+:=
new
TaggedFile
(
config
(
"hapmap"
,
submodule
=
"variantrecalibrator"
).
getString
,
"known=false,training=true,truth=true,prior=15.0"
)
if
(
config
C
ontains
(
"omni"
,
submodule
=
"variantrecalibrator"
))
if
(
config
.
c
ontains
(
"omni"
,
submodule
=
"variantrecalibrator"
))
this
.
resource
+:=
new
TaggedFile
(
config
(
"omni"
,
submodule
=
"variantrecalibrator"
).
getString
,
"known=false,training=true,truth=true,prior=12.0"
)
if
(
config
C
ontains
(
"1000G"
,
submodule
=
"variantrecalibrator"
))
if
(
config
.
c
ontains
(
"1000G"
,
submodule
=
"variantrecalibrator"
))
this
.
resource
+:=
new
TaggedFile
(
config
(
"1000G"
,
submodule
=
"variantrecalibrator"
).
getString
,
"known=false,training=true,truth=false,prior=10.0"
)
}
if
(
config
C
ontains
(
"dbsnp"
,
submodule
=
"variantrecalibrator"
))
if
(
config
.
c
ontains
(
"dbsnp"
,
submodule
=
"variantrecalibrator"
))
this
.
resource
:+=
new
TaggedFile
(
config
(
"dbsnp"
,
submodule
=
"variantrecalibrator"
).
getString
,
"known=true,training=false,truth=false,prior=2.0"
)
this
.
nt
=
4
this
.
memoryLimit
=
nt
*
2
this
.
an
=
Seq
(
"QD"
,
"DP"
,
"FS"
,
"ReadPosRankSum"
,
"MQRankSum"
)
if
(
config
C
ontains
(
"minnumbadvariants"
,
submodule
=
"variantrecalibrator"
))
if
(
config
.
c
ontains
(
"minnumbadvariants"
,
submodule
=
"variantrecalibrator"
))
this
.
minNumBadVariants
=
config
(
"minnumbadvariants"
,
submodule
=
"variantrecalibrator"
)
if
(
config
C
ontains
(
"maxgaussians"
,
submodule
=
"variantrecalibrator"
))
if
(
config
.
c
ontains
(
"maxgaussians"
,
submodule
=
"variantrecalibrator"
))
this
.
maxGaussians
=
config
(
"maxgaussians"
,
submodule
=
"variantrecalibrator"
)
}
return
variantRecalibrator
...
...
@@ -191,7 +191,7 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
}
this
.
nt
=
3
this
.
memoryLimit
=
nt
*
2
if
(
config
C
ontains
(
"scattercount"
,
submodule
=
"applyrecalibration"
))
if
(
config
.
c
ontains
(
"scattercount"
,
submodule
=
"applyrecalibration"
))
this
.
scatterCount
=
config
(
"scattercount"
,
submodule
=
"applyrecalibration"
)
}
return
applyRecalibration
...
...
@@ -203,7 +203,7 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
this
.
input_file
=
bamfiles
this
.
dbsnp
=
config
(
"dbsnp"
,
submodule
=
"variantannotator"
)
this
.
out
=
swapExt
(
dir
,
inputvcf
,
".vcf"
,
".anotated.vcf"
)
if
(
config
C
ontains
(
"scattercount"
,
submodule
=
"variantannotator"
))
if
(
config
.
c
ontains
(
"scattercount"
,
submodule
=
"variantannotator"
))
this
.
scatterCount
=
config
(
"scattercount"
,
submodule
=
"variantannotator"
)
}
add
(
variantAnnotator
)
...
...
@@ -215,7 +215,7 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
val
combineGVCFs
=
new
CombineGVCFs
with
gatkArguments
{
this
.
variant
=
input
this
.
o
=
output
if
(
config
C
ontains
(
"scattercount"
,
submodule
=
"variantannotator"
))
if
(
config
.
c
ontains
(
"scattercount"
,
submodule
=
"variantannotator"
))
this
.
scatterCount
=
config
(
"scattercount"
,
submodule
=
"combinegvcfs"
)
}
add
(
combineGVCFs
)
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkVariantcalling.scala
View file @
42abd53f
...
...
@@ -63,7 +63,7 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
this
.
I
:+=
inputBam
this
.
o
=
swapExt
(
dir
,
inputBam
,
".bam"
,
".realign.intervals"
)
this
.
jobResourceRequests
:+=
"h_vmem=5G"
if
(
config
C
ontains
(
"scattercount"
,
"realignertargetcreator"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"realignertargetcreator"
)
if
(
config
.
c
ontains
(
"scattercount"
,
"realignertargetcreator"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"realignertargetcreator"
)
}
realignerTargetCreator
.
isIntermediate
=
true
add
(
realignerTargetCreator
)
...
...
@@ -72,7 +72,7 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
this
.
I
:+=
inputBam
this
.
targetIntervals
=
realignerTargetCreator
.
o
this
.
o
=
swapExt
(
dir
,
inputBam
,
".bam"
,
".realign.bam"
)
if
(
config
C
ontains
(
"scattercount"
,
"indelrealigner"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"indelrealigner"
)
if
(
config
.
c
ontains
(
"scattercount"
,
"indelrealigner"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"indelrealigner"
)
}
indelRealigner
.
isIntermediate
=
true
add
(
indelRealigner
)
...
...
@@ -85,7 +85,7 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
this
.
I
:+=
inputBam
this
.
o
=
swapExt
(
dir
,
inputBam
,
".bam"
,
".baserecal"
)
if
(
dbsnp
!=
null
)
this
.
knownSites
:+=
dbsnp
if
(
config
C
ontains
(
"scattercount"
,
"baserecalibrator"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"baserecalibrator"
)
if
(
config
.
c
ontains
(
"scattercount"
,
"baserecalibrator"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"baserecalibrator"
)
this
.
nct
=
config
(
"threads"
,
1
,
"baserecalibrator"
)
}
add
(
baseRecalibrator
)
...
...
@@ -95,7 +95,7 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
this
.
o
=
swapExt
(
dir
,
inputBam
,
".bam"
,
".baserecal.after"
)
this
.
BQSR
=
baseRecalibrator
.
o
if
(
dbsnp
!=
null
)
this
.
knownSites
:+=
dbsnp
if
(
config
C
ontains
(
"scattercount"
,
"baserecalibrator"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"baserecalibrator"
)
if
(
config
.
c
ontains
(
"scattercount"
,
"baserecalibrator"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"baserecalibrator"
)
this
.
nct
=
config
(
"threads"
,
1
,
"baserecalibrator"
)
}
add
(
baseRecalibratorAfter
)
...
...
@@ -111,7 +111,7 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
this
.
I
:+=
inputBam
this
.
o
=
swapExt
(
dir
,
inputBam
,
".bam"
,
".baserecal.bam"
)
this
.
BQSR
=
baseRecalibrator
.
o
if
(
config
C
ontains
(
"scattercount"
,
"printreads"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"printreads"
)
if
(
config
.
c
ontains
(
"scattercount"
,
"printreads"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"printreads"
)
}
printReads
.
isIntermediate
=
true
add
(
printReads
)
...
...
@@ -122,10 +122,10 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
def
addHaplotypeCaller
(
bamfiles
:
List
[
File
],
outputfile
:
File
)
:
File
=
{
val
haplotypeCaller
=
new
HaplotypeCaller
with
gatkArguments
{
this
.
min_mapping_quality_score
=
config
(
"minMappingQualityScore"
,
20
,
"haplotypecaller"
)
if
(
config
C
ontains
(
"scattercount"
,
"haplotypecaller"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"haplotypecaller"
)
if
(
config
.
c
ontains
(
"scattercount"
,
"haplotypecaller"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"haplotypecaller"
)
this
.
input_file
=
bamfiles
this
.
out
=
outputfile
if
(
config
C
ontains
(
"dbsnp"
))
this
.
dbsnp
=
config
(
"dbsnp"
)
if
(
config
.
c
ontains
(
"dbsnp"
))
this
.
dbsnp
=
config
(
"dbsnp"
)
this
.
nct
=
config
(
"threads"
,
default
=
3
,
submodule
=
"haplotypecaller"
)
if
(
config
(
"outputToBam"
,
default
=
false
,
submodule
=
"haplotypecaller"
).
getBoolean
)
{
this
.
bamOutput
=
outputfile
.
getAbsolutePath
+
".bam"
...
...
@@ -134,7 +134,7 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
}
this
.
memoryLimit
=
this
.
nct
*
2
if
(
config
C
ontains
(
"allSitePLs"
))
this
.
allSitePLs
=
config
(
"allSitePLs"
)
if
(
config
.
c
ontains
(
"allSitePLs"
))
this
.
allSitePLs
=
config
(
"allSitePLs"
)
// GVCF options
if
(
gvcfMode
)
{
...
...
@@ -165,8 +165,8 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
val
genotypeGVCFs
=
new
GenotypeGVCFs
()
with
gatkArguments
{
this
.
variant
=
gvcfFiles
this
.
annotation
++=
Seq
(
"FisherStrand"
,
"QualByDepth"
,
"ChromosomeCounts"
)
if
(
config
C
ontains
(
"dbsnp"
))
this
.
dbsnp
=
config
(
"dbsnp"
)
if
(
config
C
ontains
(
"scattercount"
,
"genotypegvcfs"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"genotypegvcfs"
)
if
(
config
.
c
ontains
(
"dbsnp"
))
this
.
dbsnp
=
config
(
"dbsnp"
)
if
(
config
.
c
ontains
(
"scattercount"
,
"genotypegvcfs"
))
this
.
scatterCount
=
config
(
"scattercount"
,
1
,
"genotypegvcfs"
)
this
.
out
=
outputDir
+
outputName
+
".vcf"
this
.
stand_call_conf
=
config
(
"stand_call_conf"
,
30
,
"genotypegvcfs"
)
this
.
stand_emit_conf
=
config
(
"stand_emit_conf"
,
30
,
"genotypegvcfs"
)
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkVcfSampleCompare.scala
View file @
42abd53f
...
...
@@ -33,7 +33,7 @@ class GatkVcfSampleCompare(val root: Configurable) extends QScript with BiopetQS
def
init
()
{
if
(
reference
==
null
)
reference
=
config
(
"reference"
)
if
(
config
C
ontains
(
"targetBed"
))
if
(
config
.
c
ontains
(
"targetBed"
))
for
(
bed
<-
config
(
"targetBed"
).
getList
)
targetBed
:+=
bed
.
toString
if
(
outputDir
==
null
)
throw
new
IllegalStateException
(
"Missing Output directory on gatk module"
)
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/Mapping.scala
View file @
42abd53f
...
...
@@ -89,18 +89,18 @@ class Mapping(val root: Configurable) extends QScript with BiopetQScript {
if
(
input_R1
==
null
)
throw
new
IllegalStateException
(
"Missing Fastq R1 on mapping module"
)
paired
=
(
input_R2
!=
null
)
if
(
RGLB
==
null
&&
config
C
ontains
(
"RGLB"
))
RGLB
=
config
(
"RGLB"
)
if
(
RGLB
==
null
&&
config
.
c
ontains
(
"RGLB"
))
RGLB
=
config
(
"RGLB"
)
else
if
(
RGLB
==
null
)
throw
new
IllegalStateException
(
"Missing Readgroup library on mapping module"
)
if
(
RGSM
==
null
&&
config
C
ontains
(
"RGSM"
))
RGSM
=
config
(
"RGSM"
)
if
(
RGSM
==
null
&&
config
.
c
ontains
(
"RGSM"
))
RGSM
=
config
(
"RGSM"
)
else
if
(
RGLB
==
null
)
throw
new
IllegalStateException
(
"Missing Readgroup sample on mapping module"
)
if
(
RGID
==
null
&&
config
C
ontains
(
"RGID"
))
RGID
=
config
(
"RGID"
)
if
(
RGID
==
null
&&
config
.
c
ontains
(
"RGID"
))
RGID
=
config
(
"RGID"
)
else
if
(
RGID
==
null
&&
RGSM
!=
null
&&
RGLB
!=
null
)
RGID
=
RGSM
+
"-"
+
RGLB
else
if
(
RGID
==
null
)
throw
new
IllegalStateException
(
"Missing Readgroup ID on mapping module"
)
if
(
RGPL
==
null
)
RGPL
=
config
(
"RGPL"
,
"illumina"
)
if
(
RGPU
==
null
)
RGPU
=
config
(
"RGPU"
,
"na"
)
if
(
RGCN
==
null
&&
config
C
ontains
(
"RGCN"
))
RGCN
=
config
(
"RGCN"
)
if
(
RGDS
==
null
&&
config
C
ontains
(
"RGDS"
))
RGDS
=
config
(
"RGDS"
)
if
(
RGCN
==
null
&&
config
.
c
ontains
(
"RGCN"
))
RGCN
=
config
(
"RGCN"
)
if
(
RGDS
==
null
&&
config
.
c
ontains
(
"RGDS"
))
RGDS
=
config
(
"RGDS"
)
if
(
outputName
==
null
)
outputName
=
RGID
...
...
@@ -108,7 +108,7 @@ class Mapping(val root: Configurable) extends QScript with BiopetQScript {
if
(!
chunking
)
chunking
=
config
(
"chunking"
,
false
)
if
(
chunking
)
{
if
(
numberChunks
.
isEmpty
)
{
if
(
config
C
ontains
(
"numberchunks"
))
numberChunks
=
config
(
"numberchunks"
,
default
=
None
)
if
(
config
.
c
ontains
(
"numberchunks"
))
numberChunks
=
config
(
"numberchunks"
,
default
=
None
)
else
{
val
chunkSize
:
Int
=
config
(
"chunksize"
,
(
1
<<
30
))
val
filesize
=
if
(
input_R1
.
getName
.
endsWith
(
".gz"
)
||
input_R1
.
getName
.
endsWith
(
".gzip"
))
input_R1
.
length
*
3
...
...
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