samtools merge requires indexed files, so added them as implicit inputs.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5962 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
a331e13721
commit
d784dac495
|
|
@ -42,6 +42,19 @@ class SamtoolsMergeFunction extends SamtoolsCommandLineFunction {
|
|||
@Argument(doc="region", required=false)
|
||||
var region: String = _
|
||||
|
||||
@Input(doc="BAM file input indexes")
|
||||
var inputBamIndexes: List[File] = Nil
|
||||
|
||||
override def freezeFieldValues = {
|
||||
super.freezeFieldValues
|
||||
inputBamIndexes ++= inputBams
|
||||
.filter(orig => orig != null && orig.getName.endsWith(".bam"))
|
||||
.flatMap(orig => Array(
|
||||
new File(orig.getPath + ".bai"),
|
||||
new File(orig.getPath.stripSuffix(".bam") + ".bai")
|
||||
))
|
||||
}
|
||||
|
||||
def commandLine = "%s merge%s %s%s".format(
|
||||
samtools, optional(" -R ", region),
|
||||
outputBam, repeat(" ", inputBams))
|
||||
|
|
|
|||
Loading…
Reference in New Issue