Updated the GATK bundle script to:
1. Include exome target list for b37 2. Not delete the 'current' link unless -run is applied to the command line! (sorry, Ryan)
This commit is contained in:
parent
5a2ef37ead
commit
209f2a61aa
|
|
@ -95,6 +95,7 @@ class GATKResourcesBundle extends QScript {
|
||||||
def isBAM(file: File) = file.getName.endsWith(".bam")
|
def isBAM(file: File) = file.getName.endsWith(".bam")
|
||||||
def isOUT(file: File) = file.getName.endsWith(".out")
|
def isOUT(file: File) = file.getName.endsWith(".out")
|
||||||
def isFASTA(file: File) = file.getName.endsWith(".fasta")
|
def isFASTA(file: File) = file.getName.endsWith(".fasta")
|
||||||
|
def isIntervalList(file: File) = file.getName.endsWith(".interval_list")
|
||||||
|
|
||||||
var RESOURCES: List[Resource] = Nil
|
var RESOURCES: List[Resource] = Nil
|
||||||
def addResource(comp: Resource) { RESOURCES = comp :: RESOURCES }
|
def addResource(comp: Resource) { RESOURCES = comp :: RESOURCES }
|
||||||
|
|
@ -180,11 +181,17 @@ class GATKResourcesBundle extends QScript {
|
||||||
"NA12878.HiSeq.WGS.bwa.cleaned.raw.subset", b37, true, true))
|
"NA12878.HiSeq.WGS.bwa.cleaned.raw.subset", b37, true, true))
|
||||||
|
|
||||||
//
|
//
|
||||||
// Test BAM file, specific to each reference
|
// Test BAM file, only for the b37 reference
|
||||||
//
|
//
|
||||||
addResource(new Resource("/humgen/gsa-hpprojects/NA12878Collection/bams/CEUTrio.HiSeq.WGS.b37.NA12878.bam",
|
addResource(new Resource("/humgen/gsa-hpprojects/NA12878Collection/bams/CEUTrio.HiSeq.WGS.b37.NA12878.bam",
|
||||||
"IGNORE", b37, false, false))
|
"IGNORE", b37, false, false))
|
||||||
|
|
||||||
|
//
|
||||||
|
// Exome targets file, only for the b37 reference
|
||||||
|
//
|
||||||
|
addResource(new Resource("/seq/references/HybSelOligos/HybSelOligos/whole_exome_agilent_1.1_refseq_plus_3_boosters/whole_exome_agilent_1.1_refseq_plus_3_boosters.Homo_sapiens_assembly19.targets.interval_list",
|
||||||
|
"Broad.human.exome", b37, true, false, false))
|
||||||
|
|
||||||
//
|
//
|
||||||
// refGene files specific to each reference
|
// refGene files specific to each reference
|
||||||
//
|
//
|
||||||
|
|
@ -217,7 +224,7 @@ class GATKResourcesBundle extends QScript {
|
||||||
|
|
||||||
val currentLink = new File(BUNDLE_ROOT + "/current")
|
val currentLink = new File(BUNDLE_ROOT + "/current")
|
||||||
|
|
||||||
if ( currentLink.exists ) currentLink.delete()
|
if ( currentLink.exists ) add(new deleteLink(currentLink))
|
||||||
|
|
||||||
add(new linkFile(bundleDir, currentLink))
|
add(new linkFile(bundleDir, currentLink))
|
||||||
}
|
}
|
||||||
|
|
@ -275,6 +282,9 @@ class GATKResourcesBundle extends QScript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if ( isIntervalList(resource.file) ) {
|
||||||
|
val out = destFile(BUNDLE_DIR, resource.ref, resource.destname(resource.ref))
|
||||||
|
add(new cpFile(resource.file, out))
|
||||||
} else {
|
} else {
|
||||||
//throw new ReviewedStingException("Unknown file type: " + resource)
|
//throw new ReviewedStingException("Unknown file type: " + resource)
|
||||||
}
|
}
|
||||||
|
|
@ -354,6 +364,10 @@ class GATKResourcesBundle extends QScript {
|
||||||
def commandLine = "cp %s %s".format(in.getAbsolutePath, out.getAbsolutePath)
|
def commandLine = "cp %s %s".format(in.getAbsolutePath, out.getAbsolutePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class deleteLink(@Input val in: File) extends CommandLineFunction {
|
||||||
|
def commandLine = "rm %s".format(in.getAbsolutePath)
|
||||||
|
}
|
||||||
|
|
||||||
class linkFile(@Input val in: File, @Output val out: File) extends CommandLineFunction {
|
class linkFile(@Input val in: File, @Output val out: File) extends CommandLineFunction {
|
||||||
def commandLine = "ln -s %s %s".format(in.getAbsolutePath, out.getAbsolutePath)
|
def commandLine = "ln -s %s %s".format(in.getAbsolutePath, out.getAbsolutePath)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue