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
134e9302
Commit
134e9302
authored
Feb 16, 2017
by
Peter van 't Hof
Browse files
Added wait step for executable
parent
f96791cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScript.scala
View file @
134e9302
...
...
@@ -121,8 +121,8 @@ trait SummaryQScript extends BiopetQScript { qscript: QScript =>
private
def
createRun
()
:
Int
=
{
val
db
=
SummaryDb
.
openSqliteSummary
(
summaryDbFile
)
val
dir
=
root
match
{
case
q
:
BiopetQScript
=>
q
.
outputDir
case
_
=>
throw
new
IllegalStateException
(
"Root should be a BiopetQscript"
)
case
q
:
BiopetQScript
=>
q
.
outputDir
case
_
=>
throw
new
IllegalStateException
(
"Root should be a BiopetQscript"
)
}
val
id
=
Await
.
result
(
db
.
createRun
(
summaryName
,
dir
.
getAbsolutePath
),
Duration
.
Inf
)
runIdFile
.
getParentFile
.
mkdir
()
...
...
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala
View file @
134e9302
...
...
@@ -164,23 +164,16 @@ class WriteSummary(val parent: SummaryQScript) extends InProcessFunction with Co
db
.
createOrUpdateSetting
(
qscript
.
summaryRunId
,
pipelineId
,
None
,
None
,
None
,
ConfigUtils
.
mapToJson
(
q
.
summarySettings
).
nospaces
)
}
for
(
(
name
,
f
)
<-
qscript
.
functions
.
flatMap
(
_
match
{
case
c
:
Configurable
with
Version
=>
Some
(
c
)
case
_
=>
None
}).
groupBy
(
_
.
configNamespace
)
)
yield
{
f
match
{
case
f
:
BiopetJavaCommandLineFunction
with
Version
=>
db
.
createOrUpdateExecutable
(
qscript
.
summaryRunId
,
name
,
f
.
getVersion
,
f
.
getJavaVersion
,
javaMd5
=
BiopetCommandLineFunction
.
executableMd5Cache
.
get
(
f
.
executable
),
jarPath
=
Some
(
f
.
jarFile
.
getAbsolutePath
))
case
f
:
BiopetCommandLineFunction
with
Version
=>
db
.
createOrUpdateExecutable
(
qscript
.
summaryRunId
,
name
,
f
.
getVersion
,
Option
(
f
.
executable
))
case
f
:
Configurable
with
Version
=>
db
.
createOrUpdateExecutable
(
qscript
.
summaryRunId
,
name
,
f
.
getVersion
)
case
_
=>
None
}
}
(
for
(
f
<-
qscript
.
functions
.
par
)
yield
f
match
{
case
f
:
BiopetJavaCommandLineFunction
with
Version
=>
Some
(
db
.
createOrUpdateExecutable
(
qscript
.
summaryRunId
,
f
.
configNamespace
,
f
.
getVersion
,
f
.
getJavaVersion
,
javaMd5
=
BiopetCommandLineFunction
.
executableMd5Cache
.
get
(
f
.
executable
),
jarPath
=
Some
(
f
.
jarFile
.
getAbsolutePath
)))
case
f
:
BiopetCommandLineFunction
with
Version
=>
Some
(
db
.
createOrUpdateExecutable
(
qscript
.
summaryRunId
,
f
.
configNamespace
,
f
.
getVersion
,
Option
(
f
.
executable
)))
case
f
:
Configurable
with
Version
=>
Some
(
db
.
createOrUpdateExecutable
(
qscript
.
summaryRunId
,
f
.
configNamespace
,
f
.
getVersion
))
case
_
=>
None
}).
flatten
.
foreach
(
Await
.
ready
(
_
,
Duration
.
Inf
))
///////////////// OLD //////////////////
for
(((
name
,
sampleId
,
libraryId
),
summarizables
)
<-
qscript
.
summarizables
;
summarizable
<-
summarizables
)
{
...
...
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/db/SummaryDb.scala
View file @
134e9302
...
...
@@ -215,7 +215,7 @@ class SummaryDb(db: Database) extends Closeable {
/** This return a [[Query]] for [[Settings]] */
private
def
settingsFilter
(
runId
:
Option
[
Int
]
=
None
,
pipelineId
:
Option
[
Int
]
=
None
,
moduleId
:
Option
[
Option
[
Int
]]
=
None
,
sampleId
:
Option
[
Option
[
Int
]]
=
None
,
libId
:
Option
[
Option
[
Int
]]
=
None
)
=
{
sampleId
:
Option
[
Option
[
Int
]]
=
None
,
libId
:
Option
[
Option
[
Int
]]
=
None
)
=
{
var
f
:
Query
[
Settings
,
Settings
#
TableElementType
,
Seq
]
=
settings
runId
.
foreach
(
r
=>
f
=
f
.
filter
(
_
.
runId
===
r
))
pipelineId
.
foreach
(
r
=>
f
=
f
.
filter
(
_
.
pipelineId
===
r
))
...
...
@@ -249,8 +249,8 @@ class SummaryDb(db: Database) extends Closeable {
/** Return a [[Query]] for [[Files]] */
private
def
filesFilter
(
runId
:
Option
[
Int
]
=
None
,
pipelineId
:
Option
[
Int
]
=
None
,
moduleId
:
Option
[
Option
[
Int
]],
sampleId
:
Option
[
Option
[
Int
]]
=
None
,
libId
:
Option
[
Option
[
Int
]]
=
None
,
key
:
Option
[
String
]
=
None
)
=
{
sampleId
:
Option
[
Option
[
Int
]]
=
None
,
libId
:
Option
[
Option
[
Int
]]
=
None
,
key
:
Option
[
String
]
=
None
)
=
{
var
f
:
Query
[
Files
,
Files
#
TableElementType
,
Seq
]
=
files
runId
.
foreach
(
r
=>
f
=
f
.
filter
(
_
.
runId
===
r
))
pipelineId
.
foreach
(
r
=>
f
=
f
.
filter
(
_
.
pipelineId
===
r
))
...
...
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