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
ee97d7f2
Commit
ee97d7f2
authored
Nov 22, 2014
by
Peter van 't Hof
Browse files
moved preLoad config to PipelineCommand
parent
fe0a89b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetExecutable.scala
View file @
ee97d7f2
...
...
@@ -92,14 +92,6 @@ object BiopetExecutable extends Logging {
println
(
"version: "
+
getVersion
)
}
case
Array
(
module
,
name
,
passArgs
@
_
*)
=>
{
// Reading config files
val
argsSize
=
passArgs
.
size
for
(
t
<-
0
until
argsSize
)
{
if
(
passArgs
(
t
)
==
"-config"
||
args
(
t
)
==
"--config_file"
)
{
if
(
t
>=
argsSize
)
throw
new
IllegalStateException
(
"-config needs a value"
)
Config
.
global
.
loadConfigFile
(
new
File
(
passArgs
(
t
+
1
)))
}
}
getCommand
(
module
,
name
).
main
(
passArgs
.
toArray
)
}
case
Array
(
module
)
=>
{
...
...
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/PipelineCommand.scala
View file @
ee97d7f2
package
nl.lumc.sasc.biopet.core
import
org.broadinstitute.gatk.queue.util.
{
Logging
=>
GatkLogging
}
import
java.io.File
import
nl.lumc.sasc.biopet.core.config.Config
import
nl.lumc.sasc.biopet.core.workaround.BiopetQCommandLine
trait
PipelineCommand
extends
MainCommand
with
GatkLogging
{
...
...
@@ -8,6 +10,14 @@ trait PipelineCommand extends MainCommand with GatkLogging {
def
pipeline
=
"/"
+
getClass
.
getName
.
stripSuffix
(
"$"
).
replaceAll
(
"\\."
,
"/"
)
+
".class"
def
main
(
args
:
Array
[
String
])
:
Unit
=
{
val
argsSize
=
args
.
size
for
(
t
<-
0
until
argsSize
)
{
if
(
args
(
t
)
==
"-config"
||
args
(
t
)
==
"--config_file"
)
{
if
(
t
>=
argsSize
)
throw
new
IllegalStateException
(
"-config needs a value"
)
Config
.
global
.
loadConfigFile
(
new
File
(
args
(
t
+
1
)))
}
}
var
argv
:
Array
[
String
]
=
Array
()
argv
++=
Array
(
"-S"
,
pipeline
)
argv
++=
args
...
...
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