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
004bd645
Commit
004bd645
authored
Jan 27, 2017
by
Peter van 't Hof
Browse files
Added more tables to schema
parent
361db5f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/SummaryToSqlite.scala
View file @
004bd645
...
...
@@ -53,7 +53,9 @@ object SummaryToSqlite extends ToolCommand {
val
setup
=
DBIO
.
seq
(
(
runs
.
schema
++
samples
.
schema
++
samplesRuns
.
schema
++
libraries
.
schema
++
librariesRuns
.
schema
++
pipelines
.
schema
).
create
librariesRuns
.
schema
++
pipelineNames
.
schema
++
moduleNames
.
schema
++
stats
.
schema
++
files
.
schema
++
executables
.
schema
).
create
)
val
setupFuture
=
db
.
run
(
setup
)
Await
.
result
(
setupFuture
,
Duration
.
Inf
)
...
...
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/db/Schema.scala
View file @
004bd645
...
...
@@ -11,15 +11,15 @@ object Schema {
class
Runs
(
tag
:
Tag
)
extends
Table
[(
Int
,
String
)](
tag
,
"Runs"
)
{
def
runId
=
column
[
Int
](
"runId"
,
O
.
PrimaryKey
)
def
runName
=
column
[
String
](
"
sample
Name"
)
def
runName
=
column
[
String
](
"
run
Name"
)
def
*
=
(
runId
,
runName
)
}
val
runs
=
TableQuery
[
Runs
]
class
Samples
(
tag
:
Tag
)
extends
Table
[(
Int
,
String
,
Option
[
Blob
])](
tag
,
"Samples"
)
{
def
sampleId
=
column
[
Int
](
"
sampleI
d"
,
O
.
PrimaryKey
)
def
sampleName
=
column
[
String
](
"
sampleN
ame"
)
def
sampleId
=
column
[
Int
](
"
i
d"
,
O
.
PrimaryKey
)
def
sampleName
=
column
[
String
](
"
n
ame"
)
def
tags
=
column
[
Option
[
Blob
]](
"tags"
)
def
*
=
(
sampleId
,
sampleName
,
tags
)
...
...
@@ -37,8 +37,8 @@ object Schema {
val
samplesRuns
=
TableQuery
[
SamplesRuns
]
class
Libraries
(
tag
:
Tag
)
extends
Table
[(
Int
,
String
,
Int
,
Option
[
Blob
])](
tag
,
"Libraries"
)
{
def
libraryId
=
column
[
Int
](
"
libraryI
d"
,
O
.
PrimaryKey
)
def
libraryName
=
column
[
String
](
"
libraryN
ame"
)
def
libraryId
=
column
[
Int
](
"
i
d"
,
O
.
PrimaryKey
)
def
libraryName
=
column
[
String
](
"
n
ame"
)
def
sampleId
=
column
[
Int
](
"sampleId"
)
def
tags
=
column
[
Option
[
Blob
]](
"tags"
)
...
...
@@ -56,11 +56,60 @@ object Schema {
}
val
librariesRuns
=
TableQuery
[
LibrariesRuns
]
class
Pipelines
(
tag
:
Tag
)
extends
Table
[(
Int
,
String
)](
tag
,
"Pipelines"
)
{
def
pipelineI
d
=
column
[
Int
](
"
runI
d"
,
O
.
PrimaryKey
)
def
pipelineN
ame
=
column
[
String
](
"
sampleN
ame"
)
class
Pipeline
Name
s
(
tag
:
Tag
)
extends
Table
[(
Int
,
String
)](
tag
,
"Pipeline
Name
s"
)
{
def
i
d
=
column
[
Int
](
"
i
d"
,
O
.
PrimaryKey
)
def
n
ame
=
column
[
String
](
"
n
ame"
)
def
*
=
(
pipelineId
,
pipelineN
ame
)
def
*
=
(
id
,
n
ame
)
}
val
pipelines
=
TableQuery
[
Pipelines
]
val
pipelineNames
=
TableQuery
[
PipelineNames
]
class
ModuleNames
(
tag
:
Tag
)
extends
Table
[(
Int
,
String
)](
tag
,
"ModuleNames"
)
{
def
id
=
column
[
Int
](
"id"
,
O
.
PrimaryKey
)
def
name
=
column
[
String
](
"name"
)
def
*
=
(
id
,
name
)
}
val
moduleNames
=
TableQuery
[
ModuleNames
]
class
Stats
(
tag
:
Tag
)
extends
Table
[(
Int
,
Int
,
Option
[
Int
]
,
Option
[
Int
]
,
Option
[
Int
]
,
Blob
,
Option
[
String
])](
tag
,
"Stats"
)
{
def
pipelineId
=
column
[
Int
](
"pipelineId"
)
def
runId
=
column
[
Int
](
"runId"
)
def
moduleId
=
column
[
Option
[
Int
]](
"moduleId"
)
def
sampleId
=
column
[
Option
[
Int
]](
"sampleId"
)
def
libraryId
=
column
[
Option
[
Int
]](
"libraryId"
)
def
stats
=
column
[
Blob
](
"stats"
)
def
schema
=
column
[
Option
[
String
]](
"schema"
)
def
*
=
(
pipelineId
,
runId
,
moduleId
,
sampleId
,
libraryId
,
stats
,
schema
)
def
idx
=
index
(
"idx_stats"
,
(
pipelineId
,
runId
,
sampleId
,
libraryId
),
unique
=
true
)
}
val
stats
=
TableQuery
[
Stats
]
class
Files
(
tag
:
Tag
)
extends
Table
[(
Int
,
Int
,
Option
[
Int
]
,
Option
[
Int
]
,
Option
[
Int
]
,
String
,
String
)](
tag
,
"Files"
)
{
def
pipelineId
=
column
[
Int
](
"pipelineId"
)
def
runId
=
column
[
Int
](
"runId"
)
def
moduleId
=
column
[
Option
[
Int
]](
"moduleId"
)
def
sampleId
=
column
[
Option
[
Int
]](
"sampleId"
)
def
libraryId
=
column
[
Option
[
Int
]](
"libraryId"
)
def
path
=
column
[
String
](
"path"
)
def
md5
=
column
[
String
](
"md5"
)
def
*
=
(
pipelineId
,
runId
,
moduleId
,
sampleId
,
libraryId
,
path
,
md5
)
def
idx
=
index
(
"idx_files"
,
(
pipelineId
,
runId
,
sampleId
,
libraryId
,
path
),
unique
=
true
)
}
val
files
=
TableQuery
[
Files
]
class
Executables
(
tag
:
Tag
)
extends
Table
[(
Int
,
Int
)](
tag
,
"Executables"
)
{
def
runId
=
column
[
Int
](
"runId"
)
def
moduleId
=
column
[
Int
](
"moduleId"
)
//TODO: add fields
def
*
=
(
runId
,
moduleId
)
}
val
executables
=
TableQuery
[
Executables
]
}
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