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
b1191ca3
Commit
b1191ca3
authored
Jan 26, 2017
by
Peter van 't Hof
Browse files
Try setup with sqlite
parent
e34fe3a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/
JsonToHdf5
.scala
→
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/
SummaryToSqlite
.scala
View file @
b1191ca3
...
...
@@ -2,14 +2,16 @@ package nl.lumc.sasc.biopet.tools
import
java.io.File
import
ncsa.hdf.
`object`
.
h5
.
H5File
import
nl.lumc.sasc.biopet.tools.GvcfToBed.Args
import
slick.driver.H2Driver.api._
import
scala.concurrent.ExecutionContext.Implicits.global
import
nl.lumc.sasc.biopet.utils.
{
ConfigUtils
,
ToolCommand
}
/**
* Created by pjvanthof on 26/01/2017.
*/
object
JsonToHdf5
extends
ToolCommand
{
object
SummaryToSqlite
extends
ToolCommand
{
case
class
Args
(
inputJson
:
File
=
null
,
outputHdf5
:
File
=
null
)
extends
AbstractArgs
...
...
@@ -29,8 +31,12 @@ object JsonToHdf5 extends ToolCommand {
val
jsonMap
=
ConfigUtils
.
fileToConfigMap
(
cmdArgs
.
inputJson
)
val
hdf5
=
new
H5File
(
cmdArgs
.
outputHdf5
.
getAbsolutePath
)
val
db
=
Database
.
forURL
(
s
"jdbc:sqlite:${
cmdArgs.outputHdf5.getAbsolutePath
}"
,
driver
=
"org.sqlite.JDBC"
)
try
{
}
finally
db
.
close
}
}
biopet-utils/pom.xml
View file @
b1191ca3
...
...
@@ -31,9 +31,14 @@
<dependencies>
<dependency>
<groupId>
org.hdfgroup
</groupId>
<artifactId>
hdf-java
</artifactId>
<version>
2.6.1
</version>
<groupId>
com.typesafe.slick
</groupId>
<artifactId>
slick_2.10
</artifactId>
<version>
3.1.1
</version>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-nop
</artifactId>
<version>
1.6.4
</version>
</dependency>
<dependency>
<groupId>
colt
</groupId>
...
...
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/db/Samples.scala
0 → 100644
View file @
b1191ca3
package
nl.lumc.sasc.biopet.utils.summary.db
import
slick.driver.H2Driver.api._
/**
* Created by pjvan_thof on 26-1-17.
*/
class
Samples
(
tag
:
Tag
)
extends
Table
[(
Int
,
String
)](
tag
,
"SUPPLIERS"
)
{
def
sampleId
=
column
[
Int
](
"sampleId"
,
O
.
PrimaryKey
)
// This is the primary key column
def
sampleName
=
column
[
String
](
"sampleName"
)
// Every table needs a * projection with the same type as the table's type parameter
def
*
=
(
sampleId
,
sampleName
)
}
\ No newline at end of file
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