Skip to content
GitLab
Menu
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
a979530a
Commit
a979530a
authored
Nov 05, 2015
by
Sander Bollen
Browse files
fix nullpointer exception
parent
35813ff9
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/manwe/Manwe.scala
View file @
a979530a
...
...
@@ -16,7 +16,7 @@ abstract class Manwe extends BiopetCommandLineFunction {
override
def
defaultCoreMemory
=
2.0
override
def
defaultThreads
=
1
var
manweConfig
:
File
=
createManweConfig
var
manweConfig
:
File
=
createManweConfig
(
None
)
@Output
(
doc
=
"the output file"
)
var
output
:
File
=
_
...
...
@@ -26,12 +26,14 @@ abstract class Manwe extends BiopetCommandLineFunction {
def
subCommand
:
String
final
def
cmdLine
=
{
manweConfig
=
createManweConfig
(
Option
(
output
).
map
(
_
.
getParentFile
))
required
(
executable
)
+
subCommand
+
required
(
"-c"
,
manweConfig
)
+
conditional
(
manweHelp
,
"-h"
)
+
" > "
+
required
(
output
)
}
/**
...
...
@@ -48,7 +50,7 @@ abstract class Manwe extends BiopetCommandLineFunction {
* Create Manwe config from biopet config
* @return Manwe config file
*/
def
createManweConfig
:
File
=
{
def
createManweConfig
(
directory
:
Option
[
File
])
:
File
=
{
val
url
:
String
=
config
(
"varda_root"
)
val
token
:
String
=
config
(
"varda_token"
)
val
sslSettings
:
Option
[
String
]
=
config
(
"varda_verify_certificate"
)
...
...
@@ -68,7 +70,10 @@ abstract class Manwe extends BiopetCommandLineFunction {
val
collectionString
=
s
"COLLECTION_CACHE_SIZE = ${collectionCacheSize.getOrElse(20)}"
val
dataString
=
s
"DATA_BUFFER_SIZE = ${dataBufferSize.getOrElse(1048576)}"
val
taskString
=
s
"TASK_POLL_WAIT = ${taskPollWait.getOrElse(2)}"
val
file
=
File
.
createTempFile
(
"manwe_config"
,
".py"
,
output
.
getParentFile
)
val
file
=
directory
match
{
case
Some
(
dir
)
=>
File
.
createTempFile
(
"manwe_config"
,
".py"
,
dir
)
case
None
=>
File
.
createTempFile
(
"manwe_config"
,
".py"
)
}
file
.
deleteOnExit
()
val
writer
=
new
PrintWriter
(
file
)
writer
.
println
(
urlString
)
...
...
public/biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/ManweTest.scala
View file @
a979530a
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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