Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biopet.biopet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Mirrors
biopet.biopet
Commits
b2e7290d
Commit
b2e7290d
authored
Dec 06, 2016
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move log files
parent
2705817e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
...c/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
+2
-0
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/PipelineCommand.scala
...main/scala/nl/lumc/sasc/biopet/core/PipelineCommand.scala
+9
-10
No files found.
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
View file @
b2e7290d
...
...
@@ -171,4 +171,6 @@ object BiopetQScript {
require
(
outputDir
.
getAbsoluteFile
.
canRead
,
s
"No premision to read outputdir: $outputDir"
)
require
(
outputDir
.
getAbsoluteFile
.
canWrite
,
s
"No premision to write outputdir: $outputDir"
)
}
}
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/PipelineCommand.scala
View file @
b2e7290d
...
...
@@ -73,15 +73,14 @@ trait PipelineCommand extends MainCommand with GatkLogging with ImplicitConversi
}
}
val
logFile
=
{
val
pipelineName
=
this
.
getClass
.
getSimpleName
.
toLowerCase
.
split
(
"""\$"""
).
head
val
pipelineConfig
=
globalConfig
.
map
.
getOrElse
(
pipelineName
,
Map
()).
asInstanceOf
[
Map
[
String
,
Any
]]
val
pipelineOutputDir
=
new
File
(
globalConfig
.
map
.
getOrElse
(
"output_dir"
,
pipelineConfig
.
getOrElse
(
"output_dir"
,
"./"
)).
toString
)
BiopetQScript
.
checkOutputDir
(
pipelineOutputDir
)
val
logDir
:
File
=
new
File
(
pipelineOutputDir
,
".log"
)
logDir
.
mkdirs
()
new
File
(
logDir
,
"biopet."
+
BiopetQCommandLine
.
timestamp
+
".log"
)
}
val
pipelineName
=
this
.
getClass
.
getSimpleName
.
toLowerCase
.
split
(
"""\$"""
).
head
val
pipelineConfig
=
globalConfig
.
map
.
getOrElse
(
pipelineName
,
Map
()).
asInstanceOf
[
Map
[
String
,
Any
]]
val
pipelineOutputDir
=
new
File
(
globalConfig
.
map
.
getOrElse
(
"output_dir"
,
pipelineConfig
.
getOrElse
(
"output_dir"
,
"./"
)).
toString
)
BiopetQScript
.
checkOutputDir
(
pipelineOutputDir
)
val
logDir
:
File
=
new
File
(
pipelineOutputDir
,
".log"
+
File
.
separator
+
BiopetQCommandLine
.
timestamp
)
logDir
.
mkdirs
()
val
logFile
=
new
File
(
logDir
,
"biopet.log"
)
val
a
=
new
WriterAppender
(
new
PatternLayout
(
"%-5p [%d] [%C{1}] - %m%n"
),
new
PrintWriter
(
logFile
))
Logging
.
logger
.
addAppender
(
a
)
...
...
@@ -90,7 +89,7 @@ trait PipelineCommand extends MainCommand with GatkLogging with ImplicitConversi
argv
++=
Array
(
"-S"
,
pipeline
)
argv
++=
args
if
(!
args
.
contains
(
"--log_to_file"
)
&&
!
args
.
contains
(
"-log"
))
{
argv
++=
List
(
"--log_to_file"
,
new
File
(
log
File
.
getParentFile
,
"queue."
+
BiopetQCommandLine
.
timestamp
+
"
.log"
).
getAbsolutePath
)
argv
++=
List
(
"--log_to_file"
,
new
File
(
log
Dir
,
"queue
.log"
).
getAbsolutePath
)
}
if
(!
args
.
contains
(
"-retry"
)
&&
!
args
.
contains
(
"--retry_failed"
))
{
val
retry
:
Int
=
globalConfig
(
pipelineName
,
Nil
,
"retry"
,
default
=
5
)
...
...
Write
Preview
Markdown
is supported
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