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
78a3291b
Commit
78a3291b
authored
Dec 18, 2016
by
Peter van 't Hof
Browse files
Adding genral config for MultiSampleMapping
parent
78669bf0
Changes
4
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/TemplateTool.scala
View file @
78a3291b
...
...
@@ -37,7 +37,7 @@ trait TemplateTool extends ToolCommand {
def
pipelineMap
(
map
:
Map
[
String
,
Any
],
expert
:
Boolean
)
:
Map
[
String
,
Any
]
val
sampleConfigs
:
List
[
File
]
=
Nil
lazy
val
sampleConfigs
:
List
[
File
]
=
Nil
}
...
...
biopet-package/src/main/scala/nl/lumc/sasc/biopet/BiopetExecutableMain.scala
View file @
78a3291b
...
...
@@ -15,7 +15,7 @@
package
nl.lumc.sasc.biopet
import
nl.lumc.sasc.biopet.core.PipelineStatus
import
nl.lumc.sasc.biopet.utils.
{
BiopetExecutable
,
MainCommand
}
import
nl.lumc.sasc.biopet.utils.
{
BiopetExecutable
,
MainCommand
}
object
BiopetExecutableMain
extends
BiopetExecutable
{
def
pipelines
:
List
[
MainCommand
]
=
List
(
...
...
@@ -44,5 +44,8 @@ object BiopetExecutableMain extends BiopetExecutable {
def
tools
:
List
[
MainCommand
]
=
PipelineStatus
::
BiopetToolsExecutable
.
tools
def
templates
:
List
[
MainCommand
]
=
List
()
def
templates
:
List
[
MainCommand
]
=
List
(
nl
.
lumc
.
sasc
.
biopet
.
pipelines
.
mapping
.
template
.
MultiSampleMapping
,
nl
.
lumc
.
sasc
.
biopet
.
pipelines
.
shiva
.
template
.
Shiva
)
}
mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/template/MultiSampleMapping.scala
0 → 100644
View file @
78a3291b
package
nl.lumc.sasc.biopet.pipelines.mapping.template
import
java.io.File
import
nl.lumc.sasc.biopet.core.
{
Reference
,
TemplateTool
}
import
nl.lumc.sasc.biopet.utils.Question
/**
* Created by pjvanthof on 17/12/2016.
*/
object
MultiSampleMapping
extends
TemplateTool
{
override
lazy
val
sampleConfigs
:
List
[
File
]
=
TemplateTool
.
askSampleConfigs
()
def
possibleAligners
=
List
(
"bwa-mem"
,
"bwa-aln"
,
"bowtie"
,
"bowtie2"
,
"gsnap"
,
"hisat2"
,
"tophat"
,
"stampy"
,
"star"
,
"star-2pass"
)
def
pipelineMap
(
map
:
Map
[
String
,
Any
],
expert
:
Boolean
)
:
Map
[
String
,
Any
]
=
{
val
referenceConfig
=
map
++
Reference
.
askReference
val
aligner
=
if
(
map
.
contains
(
"aligner"
))
map
(
"aligner"
).
toString
else
Question
.
string
(
"Aligner"
,
posibleValues
=
possibleAligners
,
default
=
Some
(
"bwa-mem"
))
referenceConfig
++
Map
(
"aligner"
->
aligner
)
}
}
shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/template/Shiva.scala
View file @
78a3291b
...
...
@@ -2,7 +2,8 @@ package nl.lumc.sasc.biopet.pipelines.shiva.template
import
java.io.File
import
nl.lumc.sasc.biopet.core.
{
Reference
,
TemplateTool
}
import
nl.lumc.sasc.biopet.core.TemplateTool
import
nl.lumc.sasc.biopet.pipelines.mapping.template.MultiSampleMapping
import
nl.lumc.sasc.biopet.pipelines.shiva.ShivaVariantcalling
import
nl.lumc.sasc.biopet.utils.Question
...
...
@@ -11,19 +12,24 @@ import nl.lumc.sasc.biopet.utils.Question
*/
object
Shiva
extends
TemplateTool
{
override
val
sampleConfigs
:
List
[
File
]
=
TemplateTool
.
askSampleConfigs
()
override
lazy
val
sampleConfigs
:
List
[
File
]
=
TemplateTool
.
askSampleConfigs
()
def
possibleVariantcallers
:
List
[
String
]
=
{
ShivaVariantcalling
.
callersList
(
null
).
map
(
_
.
name
)
}
def
pipelineMap
(
map
:
Map
[
String
,
Any
],
expert
:
Boolean
)
:
Map
[
String
,
Any
]
=
{
map
++
Reference
.
askReference
++
Map
(
"variantcallers"
->
Question
.
list
(
"Variantcallers"
,
posibleValues
=
possibleVariantcallers
,
default
=
Some
(
List
(
"haplotypecaller_gvcf"
,
"haplotypecaller"
))),
"use_indel_realigner"
->
Question
.
boolean
(
"use_indel_realigner"
,
default
=
Some
(
true
)),
"use_base_recalibration"
->
Question
.
boolean
(
"use_base_recalibration"
,
default
=
Some
(
true
))
val
mappingConfig
=
MultiSampleMapping
.
pipelineMap
(
map
,
expert
)
val
variantCallers
=
Question
.
list
(
"Variantcallers"
,
posibleValues
=
possibleVariantcallers
,
default
=
Some
(
List
(
"haplotypecaller_gvcf"
,
"haplotypecaller"
)))
val
useIndelRealigner
=
Question
.
boolean
(
"Use indel realigner"
,
default
=
Some
(
true
))
val
useBaseRecalibration
=
Question
.
boolean
(
"Use base recalibration"
,
default
=
Some
(
true
))
mappingConfig
++
Map
(
"variantcallers"
->
variantCallers
,
"use_indel_realigner"
->
useIndelRealigner
,
"use_base_recalibration"
->
useBaseRecalibration
)
}
}
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