Skip to content
Snippets Groups Projects
Commit 705d9cd6 authored by Wai Yi Leung's avatar Wai Yi Leung
Browse files

Style fixes and config for samtofastq

parent 4cb2adf1
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@
*/
package nl.lumc.sasc.biopet.extensions.sambamba
import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Version }
import nl.lumc.sasc.biopet.core.{BiopetCommandLineFunction, Version}
/** General Sambamba extension */
abstract class Sambamba extends BiopetCommandLineFunction with Version {
......@@ -24,7 +24,7 @@ abstract class Sambamba extends BiopetCommandLineFunction with Version {
override def subPath = "sambamba" :: super.subPath
executable = config("exe", default = "sambamba", submodule = "sambamba")
executable = config("exe", default = "sambamba", submodule = "sambamba", freeVar = false)
def versionCommand = executable
def versionRegex = """sambamba v(.*)""".r
override def versionExitcode = List(0, 1)
......
......@@ -63,9 +63,14 @@ class Gears(val root: Configurable) extends QScript with SummaryQScript with Sam
gears.summaryFile = summaryFile
Some(gears)
}
override def defaults = Map(
"samtofastq" -> Map(
"validationstringency" -> "LENIENT"
)
)
/** Method to add jobs */
def biopetScript(): Unit = {
val fastqFiles: List[File] = bamFile.map { bamfile =>
// sambamba view -f bam -F "unmapped or mate_is_unmapped" <alnFile> > <extracted.bam>
......@@ -79,7 +84,6 @@ class Gears(val root: Configurable) extends QScript with SummaryQScript with Sam
// start bam to fastq (only on unaligned reads) also extract the matesam
val samToFastq = new SamToFastq(this)
samToFastq.input = samFilterUnmapped.output
samToFastq.stringency = Some("LENIENT")
samToFastq.fastqR1 = new File(outputDir, s"$outputName.unmapped.R1.fq.gz")
samToFastq.fastqR2 = new File(outputDir, s"$outputName.unmapped.R2.fq.gz")
samToFastq.fastqUnpaired = new File(outputDir, s"$outputName.unmapped.singleton.fq.gz")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment