Commit d125c2f3 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fix on index ln methods

parent d8464ae3
...@@ -66,12 +66,13 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr ...@@ -66,12 +66,13 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
else if (files.size == 1) { else if (files.size == 1) {
val bamFile = new File(outputDir, files.head.getName) val bamFile = new File(outputDir, files.head.getName)
if (bamFile != files.head) { if (bamFile != files.head) {
val oldIndex: File = files.head.getAbsolutePath.stripSuffix(".bam") + ".bai" val oldIndex: File = new File(files.head.getAbsolutePath.stripSuffix(".bam") + ".bai")
val newIndex: File = bamFile.getAbsolutePath.stripSuffix(".bam") + ".bai" val newIndex: File = swapExt(outputDir, bamFile, ".bam", ".bai")
add(Ln(this, oldIndex, newIndex)) val baiLn = Ln(this, oldIndex, newIndex)
add(baiLn)
val bamLn = Ln(this, files.head, bamFile) val bamLn = Ln(this, files.head, bamFile)
bamLn.deps :+= newIndex bamLn.deps :+= baiLn.out
add(bamLn) add(bamLn)
} }
List(bamFile) List(bamFile)
......
...@@ -30,7 +30,7 @@ class Ln(val root: Configurable) extends InProcessFunction with Configurable { ...@@ -30,7 +30,7 @@ class Ln(val root: Configurable) extends InProcessFunction with Configurable {
@Output(doc = "Link destination") @Output(doc = "Link destination")
var out: File = _ var out: File = _
@Output @Input(required = false)
var deps: List[File] = Nil var deps: List[File] = Nil
var relative: Boolean = true var relative: Boolean = true
......
Supports Markdown
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