Commit b1191ca3 authored by Peter van 't Hof's avatar Peter van 't Hof

Try setup with sqlite

parent e34fe3a1
......@@ -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
}
}
......@@ -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>
......
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment