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
9dc9ee63
Commit
9dc9ee63
authored
Dec 06, 2016
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move graph files
parent
b2e7290d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
...c/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
+7
-4
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/WriteDependencies.scala
...in/scala/nl/lumc/sasc/biopet/core/WriteDependencies.scala
+8
-9
No files found.
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
View file @
9dc9ee63
...
...
@@ -16,13 +16,14 @@ package nl.lumc.sasc.biopet.core
import
java.io.File
import
nl.lumc.sasc.biopet.core.summary.
{
SummaryQScript
,
WriteSummary
}
import
nl.lumc.sasc.biopet.core.summary.
{
SummaryQScript
,
WriteSummary
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.core.report.ReportBuilderExtension
import
nl.lumc.sasc.biopet.core.workaround.BiopetQCommandLine
import
nl.lumc.sasc.biopet.utils.Logging
import
org.broadinstitute.gatk.queue.
{
QScript
,
QSettings
}
import
org.broadinstitute.gatk.queue.
{
QScript
,
QSettings
}
import
org.broadinstitute.gatk.queue.function.QFunction
import
org.broadinstitute.gatk.queue.util.
{
Logging
=>
GatkLogging
}
import
org.broadinstitute.gatk.queue.util.
{
Logging
=>
GatkLogging
}
/** Base for biopet pipeline */
trait
BiopetQScript
extends
Configurable
with
GatkLogging
{
qscript
:
QScript
=>
...
...
@@ -123,7 +124,9 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
}
})
if
(!
skipWriteDependencies
)
WriteDependencies
.
writeDependencies
(
functions
,
new
File
(
outputDir
,
".log"
),
qSettings
.
runName
)
if
(!
skipWriteDependencies
)
WriteDependencies
.
writeDependencies
(
functions
,
new
File
(
outputDir
,
".log"
+
File
.
separator
+
BiopetQCommandLine
.
timestamp
+
File
.
separator
+
"graph"
))
Logging
.
checkErrors
()
logger
.
info
(
"Script complete without errors"
)
...
...
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/WriteDependencies.scala
View file @
9dc9ee63
...
...
@@ -48,9 +48,8 @@ object WriteDependencies extends Logging with Configurable {
*
* @param functions This should be all functions that are given to the graph of Queue
* @param outputDir
* @param prefix prefix
*/
def
writeDependencies
(
functions
:
Seq
[
QFunction
],
outputDir
:
File
,
prefix
:
String
)
:
Unit
=
{
def
writeDependencies
(
functions
:
Seq
[
QFunction
],
outputDir
:
File
)
:
Unit
=
{
logger
.
info
(
"Start calculating dependencies"
)
val
errorOnMissingInput
:
Boolean
=
config
(
"error_on_missing_input"
,
false
)
...
...
@@ -130,7 +129,7 @@ object WriteDependencies extends Logging with Configurable {
"fail_at_start"
->
f
.
isFail
)
}.
toIterator
.
toMap
val
outputFile
=
new
File
(
outputDir
,
s
"
$prefix.
deps.json"
)
val
outputFile
=
new
File
(
outputDir
,
s
"deps.json"
)
logger
.
info
(
s
"Writing dependencies to: $outputFile"
)
val
writer
=
new
PrintWriter
(
outputFile
)
writer
.
println
(
ConfigUtils
.
mapToJson
(
Map
(
...
...
@@ -143,22 +142,22 @@ object WriteDependencies extends Logging with Configurable {
case
l
:
List
[
_
]
=>
l
.
map
(
_
.
toString
)
case
_
=>
throw
new
IllegalStateException
(
"Value 'depends_on_jobs' is not a list"
)
}))
val
jobsWriter
=
new
PrintWriter
(
new
File
(
outputDir
,
s
"
$prefix.
jobs.json"
))
val
jobsWriter
=
new
PrintWriter
(
new
File
(
outputDir
,
s
"jobs.json"
))
jobsWriter
.
println
(
ConfigUtils
.
mapToJson
(
jobsDeps
).
spaces2
)
jobsWriter
.
close
()
writeGraphvizFile
(
jobsDeps
,
new
File
(
outputDir
,
s
"
$prefix.
jobs.gv"
))
writeGraphvizFile
(
compressOnType
(
jobsDeps
),
new
File
(
outputDir
,
s
"
$prefix.
compress.jobs.gv"
))
writeGraphvizFile
(
jobsDeps
,
new
File
(
outputDir
,
s
"jobs.gv"
))
writeGraphvizFile
(
compressOnType
(
jobsDeps
),
new
File
(
outputDir
,
s
"compress.jobs.gv"
))
val
mainJobs
=
jobs
.
filter
(
_
.
_2
(
"main_job"
)
==
true
).
map
{
case
(
name
,
job
)
=>
name
->
getMainDependencies
(
name
,
jobs
)
}
val
mainJobsWriter
=
new
PrintWriter
(
new
File
(
outputDir
,
s
"
$prefix.
main_jobs.json"
))
val
mainJobsWriter
=
new
PrintWriter
(
new
File
(
outputDir
,
s
"main_jobs.json"
))
mainJobsWriter
.
println
(
ConfigUtils
.
mapToJson
(
mainJobs
).
spaces2
)
mainJobsWriter
.
close
()
writeGraphvizFile
(
mainJobs
,
new
File
(
outputDir
,
s
"
$prefix.
main_jobs.gv"
))
writeGraphvizFile
(
compressOnType
(
mainJobs
),
new
File
(
outputDir
,
s
"
$prefix.
compress.main_jobs.gv"
))
writeGraphvizFile
(
mainJobs
,
new
File
(
outputDir
,
s
"main_jobs.gv"
))
writeGraphvizFile
(
compressOnType
(
mainJobs
),
new
File
(
outputDir
,
s
"compress.main_jobs.gv"
))
logger
.
info
(
"done calculating dependencies"
)
}
...
...
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