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
134e9302
Commit
134e9302
authored
Feb 16, 2017
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added wait step for executable
parent
f96791cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
22 deletions
+15
-22
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScript.scala
...ala/nl/lumc/sasc/biopet/core/summary/SummaryQScript.scala
+2
-2
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala
...scala/nl/lumc/sasc/biopet/core/summary/WriteSummary.scala
+10
-17
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/db/SummaryDb.scala
...cala/nl/lumc/sasc/biopet/utils/summary/db/SummaryDb.scala
+3
-3
No files found.
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
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