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
6b607d8c
Commit
6b607d8c
authored
Oct 26, 2016
by
Sander Bollen
Browse files
remove checks for existence of directories; they might not exist yet at script time
parent
0c9d68b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/Cnmops.scala
View file @
6b607d8c
...
...
@@ -81,7 +81,7 @@ class Cnmops(val root: Configurable) extends RscriptCommandLineFunction with Ver
@Output
(
doc
=
"Output CNV file"
)
lazy
val
outputCnv
:
File
=
{
outputDir
match
{
case
Some
(
dir
)
if
dir
.
exists
=>
new
File
(
dir
,
"cnv.txt"
)
case
Some
(
dir
)
=>
new
File
(
dir
,
"cnv.txt"
)
case
_
=>
throw
new
IllegalArgumentException
(
"Unexpected error when trying to set cn.MOPS CNV output"
)
}
}
...
...
@@ -89,7 +89,7 @@ class Cnmops(val root: Configurable) extends RscriptCommandLineFunction with Ver
@Output
(
doc
=
"Output CNR file"
)
lazy
val
outputCnr
:
File
=
{
outputDir
match
{
case
Some
(
dir
)
if
dir
.
exists
=>
new
File
(
dir
,
"cnr.txt"
)
case
Some
(
dir
)
=>
new
File
(
dir
,
"cnr.txt"
)
case
_
=>
throw
new
IllegalArgumentException
(
"Unexpected error when trying to set cn.MOPS CNR output"
)
}
}
...
...
@@ -97,7 +97,7 @@ class Cnmops(val root: Configurable) extends RscriptCommandLineFunction with Ver
@Output
(
doc
=
"Raw output"
)
lazy
val
rawOutput
:
File
=
{
outputDir
match
{
case
Some
(
dir
)
if
dir
.
exists
=>
new
File
(
dir
,
"rawoutput.txt"
)
case
Some
(
dir
)
=>
new
File
(
dir
,
"rawoutput.txt"
)
case
_
=>
throw
new
IllegalArgumentException
(
"Unexpected error when trying to set cn.MOPS raw output"
)
}
}
...
...
@@ -121,5 +121,5 @@ class Cnmops(val root: Configurable) extends RscriptCommandLineFunction with Ver
required
(
"--rawoutput"
,
rawOutput
)
+
required
(
"--threads"
,
threads
)
+
optional
(
"--wl"
,
windowLength
)
+
re
quired
(
input
.
map
(
f
=>
f
.
getAbsolutePath
).
mkString
(
" "
)
)
re
peat
(
input
)
}
biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/CnmopsTest.scala
View file @
6b607d8c
...
...
@@ -13,7 +13,7 @@ class CnmopsTest extends TestNGSuite with Matchers {
def
testVersionCommand
()
=
{
val
cn
=
new
Cnmops
(
null
)
cn
.
versionCommand
.
endsWith
(
"--version"
)
shouldBe
true
cn
.
versionCommand
.
s
tart
sWith
(
"Rscript"
)
shouldBe
true
cn
.
versionCommand
.
s
plit
(
" "
).
head
.
end
sWith
(
"Rscript"
)
shouldBe
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