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
dda05ebe
Commit
dda05ebe
authored
Oct 26, 2016
by
Sander Bollen
Browse files
make use of utils for version
parent
6b607d8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cnmops.scala
View file @
dda05ebe
...
...
@@ -21,6 +21,8 @@ import nl.lumc.sasc.biopet.core.extensions.RscriptCommandLineFunction
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline._
import
nl.lumc.sasc.biopet.utils.getSemanticVersion
/**
* Wrapper for the Cnmops command line tool.
* Written based on Cnmops version v2.2.1.
...
...
@@ -52,20 +54,10 @@ class Cnmops(val root: Configurable) extends RscriptCommandLineFunction with Ver
* @return
*/
def
versionCheck
:
Boolean
=
{
getVersion
match
{
case
Some
(
version
)
=>
{
val
contents
=
version
.
split
(
'.'
)
if
(
contents
.
length
<
3
)
{
false
}
else
{
val
major
=
stringToInt
(
contents
(
0
))
val
minor
=
stringToInt
(
contents
(
1
))
(
major
.
getOrElse
(
0
)
==
1
&&
minor
.
getOrElse
(
0
)
>=
18
)
||
major
.
getOrElse
(
0
)
>=
2
}
}
getVersion
.
flatMap
(
getSemanticVersion
(
_
))
match
{
case
Some
(
version
)
=>
(
version
.
major
==
1
&&
version
.
minor
>=
18
)
||
version
.
major
>=
2
case
_
=>
false
}
}
@Input
(
doc
=
"Input file BAM"
,
required
=
true
)
...
...
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