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
2127bf05
Commit
2127bf05
authored
Dec 01, 2014
by
Peter van 't Hof
Browse files
Added extension for gubbins script
parent
801b72ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala
0 → 100644
View file @
2127bf05
package
nl.lumc.sasc.biopet.extensions
import
java.io.File
import
nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import
nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Input
,
Output
}
class
RunGubbins
(
val
root
:
Configurable
)
extends
BiopetCommandLineFunction
{
@Input
(
doc
=
"Contaminants"
,
required
=
false
)
var
startingTree
:
File
=
config
(
"starting_tree"
)
@Input
(
doc
=
"Fasta file"
,
shortName
=
"FQ"
)
var
fastafile
:
File
=
_
@Output
(
doc
=
"Output"
,
shortName
=
"out"
)
var
outputFiles
:
List
[
File
]
=
Nil
@Argument
(
required
=
true
)
var
outputDirectory
:
String
=
_
executable
=
config
(
"exe"
,
default
=
"run_gubbins.py"
)
var
outgroup
:
String
=
config
(
"outgroup"
)
var
filterPercentage
:
String
=
config
(
"filter_percentage"
)
var
treeBuilder
:
String
=
config
(
"tree_builder"
)
var
iterations
:
Option
[
Int
]
=
config
(
"iterations"
)
var
minSnps
:
Option
[
Int
]
=
config
(
"min_snps"
)
var
convergeMethod
:
String
=
config
(
"converge_method"
)
var
useTimeStamp
:
Boolean
=
config
(
"use_time_stamp"
)
var
prefix
:
String
=
config
(
"prefix"
)
var
verbose
:
Boolean
=
config
(
"verbose"
)
var
noCleanup
:
Boolean
=
config
(
"no_cleanup"
)
override
def
afterGraph
:
Unit
=
{
super
.
afterGraph
if
(
prefix
==
null
)
prefix
=
fastafile
.
getName
val
out
:
List
[
String
]
=
List
(
".recombination_predictions.embl"
,
".recombination_predictions.gff"
,
".branch_base_reconstruction.embl"
,
".summary_of_snp_distribution.vcf"
,
".per_branch_statistics.csv"
,
".filtered_polymorphic_sites.fasta"
,
".filtered_polymorphic_sites.phylip"
,
".final_tree.tre"
)
for
(
t
<-
out
)
outputFiles
::=
new
File
(
outputDirectory
+
File
.
separator
+
prefix
+
t
)
}
def
cmdLine
=
required
(
executable
)
+
optional
(
"--outgroup"
,
outgroup
)
+
optional
(
"--starting_tree"
,
startingTree
)
+
optional
(
"--filter_percentage"
,
filterPercentage
)
+
optional
(
"--tree_builder"
,
treeBuilder
)
+
optional
(
"--iterations"
,
iterations
)
+
optional
(
"--min_snps"
,
minSnps
)
+
optional
(
"--converge_method"
,
convergeMethod
)
+
conditional
(
useTimeStamp
,
"--use_time_stamp"
)
+
optional
(
"--prefix"
,
prefix
)
+
conditional
(
verbose
,
"--verbose"
)
+
conditional
(
noCleanup
,
"--no_cleanup"
)
+
required
(
fastafile
)
}
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