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
c6980164
Commit
c6980164
authored
Sep 28, 2015
by
Peter van 't Hof
Browse files
Moved code
parent
beef0cec
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunction.scala
View file @
c6980164
...
...
@@ -71,11 +71,18 @@ trait BiopetCommandLineFunction extends CommandLineFunction with Configurable {
/** Can override this method. This is executed after the script is done en queue starts to generate the graph */
def
beforeGraph
()
{}
/** Set default output file, threads and vmem for current job */
override
def
freezeFieldValues
()
{
preProcessExecutable
()
beforeGraph
()
if
(
jobOutputFile
==
null
)
jobOutputFile
=
new
File
(
firstOutput
.
getAbsoluteFile
.
getParent
,
"."
+
firstOutput
.
getName
+
"."
+
configName
+
".out"
)
internalBeforeGraph
()
super
.
freezeFieldValues
()
}
/** Set default output file, threads and vmem for current job */
private
[
core
]
def
internalBeforeGraph
()
:
Unit
=
{
if
(
jobOutputFile
==
null
&&
firstOutput
!=
null
)
jobOutputFile
=
new
File
(
firstOutput
.
getAbsoluteFile
.
getParent
,
"."
+
firstOutput
.
getName
+
"."
+
configName
+
".out"
)
if
(
threads
==
0
)
threads
=
getThreads
(
defaultThreads
)
if
(
threads
>
1
)
nCoresRequest
=
Option
(
threads
)
...
...
@@ -91,8 +98,6 @@ trait BiopetCommandLineFunction extends CommandLineFunction with Configurable {
if
(!
config
.
contains
(
"vmem"
))
vmem
=
Some
((
_coreMemory
*
(
vmemFactor
+
(
0.5
*
retry
)))
+
"G"
)
if
(
vmem
.
isDefined
)
jobResourceRequests
:+=
"h_vmem="
+
vmem
.
get
jobName
=
configName
+
":"
+
(
if
(
firstOutput
!=
null
)
firstOutput
.
getName
else
jobOutputFile
)
super
.
freezeFieldValues
()
}
var
retry
=
0
...
...
public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetPipe.scala
View file @
c6980164
...
...
@@ -29,6 +29,7 @@ class BiopetPipe(val commands: List[BiopetCommandLineFunction]) extends BiopetCo
override
def
beforeGraph
()
{
super
.
beforeGraph
()
commands
.
foreach
(
_
.
beforeGraph
())
commands
.
foreach
(
_
.
internalBeforeGraph
())
stdoutFile
=
stdoutFile
.
map
(
_
.
getAbsoluteFile
)
stdinFile
=
stdinFile
.
map
(
_
.
getAbsoluteFile
)
...
...
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