Commit 6f754064 authored by Peter van 't Hof's avatar Peter van 't Hof

Added to generateIndexes

parent 40802e4e
......@@ -42,9 +42,8 @@ class Hisat2Build(val root: Configurable) extends BiopetCommandLineFunction with
var localftabchars: Option[Int] = config("localftabchars")
var seed: Option[Int] = config("seed")
var large-index: Boolean = config("large-index", default = false)
var dcv: Boolean = config("dcv", default = false)
var memory-fitting: Boolean = config("memory-fitting", default = false)
var largeIndex: Boolean = config("large_index", default = false)
var memoryFitting: Boolean = config("memory_fitting", default = false)
var nodc: Boolean = config("nodc", default = false)
var noref: Boolean = config("noref", default = false)
var justref: Boolean = config("justref", default = false)
......@@ -70,9 +69,8 @@ class Hisat2Build(val root: Configurable) extends BiopetCommandLineFunction with
optional("--haplotype", haplotype) +
optional("--ss", ss) +
optional("--exon", exon) +
conditional(large-index, "--large-index") +
conditional(dcv, "--dcv") +
conditional(memory-fitting, "--memory-fitting") +
conditional(largeIndex, "--large-index") +
conditional(memoryFitting, "--memory-fitting") +
conditional(nodc, "--nodc") +
conditional(noref, "--noref") +
conditional(justref, "--justref") +
......
......@@ -14,16 +14,17 @@
*/
package nl.lumc.sasc.biopet.pipelines.generateindexes
import java.io.{ File, PrintWriter }
import java.io.{File, PrintWriter}
import java.util
import nl.lumc.sasc.biopet.core.extensions.Md5sum
import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import nl.lumc.sasc.biopet.core.{BiopetQScript, PipelineCommand}
import nl.lumc.sasc.biopet.extensions._
import nl.lumc.sasc.biopet.extensions.bowtie.{ Bowtie2Build, BowtieBuild }
import nl.lumc.sasc.biopet.extensions.bowtie.{Bowtie2Build, BowtieBuild}
import nl.lumc.sasc.biopet.extensions.bwa.BwaIndex
import nl.lumc.sasc.biopet.extensions.gatk.CombineVariants
import nl.lumc.sasc.biopet.extensions.gmap.GmapBuild
import nl.lumc.sasc.biopet.extensions.hisat.Hisat2Build
import nl.lumc.sasc.biopet.extensions.picard.CreateSequenceDictionary
import nl.lumc.sasc.biopet.extensions.samtools.SamtoolsFaidx
import nl.lumc.sasc.biopet.utils.ConfigUtils
......@@ -267,6 +268,17 @@ class GenerateIndexes(val root: Configurable) extends QScript with BiopetQScript
"bowtie_index" -> bowtie2Index.reference.getAbsolutePath.stripSuffix(".fa").stripSuffix(".fasta")
)
// Hisat2 index
val hisat2Index = new Hisat2Build(this)
hisat2Index.inputFasta = createLinks(new File(genomeDir, "hisat2"))
hisat2Index.hisat2IndexBase = new File(new File(genomeDir, "hisat2"), "reference").getAbsolutePath
add(hisat2Index)
configDeps :+= hisat2Index.jobOutputFile
outputConfig += "hisat2" -> Map(
"reference_fasta" -> hisat2Index.inputFasta.getAbsolutePath,
"hisat_index" -> hisat2Index.inputFasta.getAbsolutePath.stripSuffix(".fa").stripSuffix(".fasta")
)
val writeConfig = new WriteConfig
writeConfig.deps = configDeps
writeConfig.out = new File(genomeDir, s"$speciesName-$genomeName.json")
......
......@@ -102,6 +102,7 @@ object GenerateIndexesTest {
val config = Map("output_dir" -> outputDir,
"bwa" -> Map("exe" -> "test"),
"star" -> Map("exe" -> "test"),
"hisat2build" -> Map("exe" -> "test"),
"bowtiebuild" -> Map("exe" -> "test"),
"bowtie2build" -> Map("exe" -> "test"),
"gmapbuild" -> Map("exe" -> "test"),
......
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