Scala protected is more akin to Java private than Java protected. Not typing these defs.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4470 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
chartl 2010-10-08 19:36:23 +00:00
parent bdd3a9752e
commit 6368a46bab
2 changed files with 19 additions and 19 deletions

View File

@ -33,7 +33,7 @@ class BamProcessing(yaml: File, gatkJar: File, fixMatesJar: File) {
* @Doc: Creates a standard realigner target creator CLF given a bam, an output file, and the contigs over which to run
* @Returns: A CLF for the realigner target creator job
*/
protected def StandardRealignerTargetCreator(bam: File, contigs: List[String], output: File) : RealignerTargetCreator = {
def StandardRealignerTargetCreator(bam: File, contigs: List[String], output: File) : RealignerTargetCreator = {
var rtc = new RealignerTargetCreator with StandardCommandLineGATK
rtc.intervals = null
rtc.intervalsString = contigs
@ -48,7 +48,7 @@ class BamProcessing(yaml: File, gatkJar: File, fixMatesJar: File) {
* @Doc: Creates a standard indel cleaner CLF given a bam, the results of the target creator, and an output .bam file
* @Returns: A CLF for the indel cleaning job
*/
protected def StandardIndelCleaner(bam: File, contigs: List[String], targets: File, outBam: File) : IndelRealigner = {
def StandardIndelCleaner(bam: File, contigs: List[String], targets: File, outBam: File) : IndelRealigner = {
var realigner = new IndelRealigner with StandardCommandLineGATK
realigner.intervalsString = contigs
realigner.intervals = null
@ -65,7 +65,7 @@ class BamProcessing(yaml: File, gatkJar: File, fixMatesJar: File) {
* @Doc: Creates a standard split-by-contig indel cleaner job for a given bam file, RTC output, and bam to merge everything to
* @Returns: A list of CLFs (todo -- wrapped in a Pipeline)
*/
protected def StandardIndelCleanBam(bam: File, jobContigs: List[List[String]], targets: File, cleanedBam: File) : List[CommandLineFunction] = {
def StandardIndelCleanBam(bam: File, jobContigs: List[List[String]], targets: File, cleanedBam: File) : List[CommandLineFunction] = {
var cmds : List[CommandLineFunction] = Nil
var jobSpecs : List[(File,File,List[String])] = jobContigs.map[(File,File,List[String]),List[(File,File,List[String])]](
ctigs => { (bam, swapExt(bam,".bam",".%s.bam".format(ctigs.mkString("_"))), ctigs) }
@ -89,7 +89,7 @@ class BamProcessing(yaml: File, gatkJar: File, fixMatesJar: File) {
* @Returns: A list of command line functions for the full indel realignment pipeline from the collection
* of uncleaned bams to the collection of cleaned bams
*/
protected def StandardIndelRealign( bamsUncleanCleanPairs: List[(File,File)], nJobs: Int = 1 ) : List[CommandLineFunction] = {
def StandardIndelRealign( bamsUncleanCleanPairs: List[(File,File)], nJobs: Int = 1 ) : List[CommandLineFunction] = {
val contigsForJobs : List[List[String]] = PipelineUtils.smartSplitContigs(library.attributes.getProject.getReferenceFile, library.attributes.getProject.getIntervalList, nJobs)
var commands : List[CommandLineFunction] = Nil
for ( bamPair <- bamsUncleanCleanPairs ) {
@ -110,7 +110,7 @@ class BamProcessing(yaml: File, gatkJar: File, fixMatesJar: File) {
* @Doc: Merges N bam files into one bam file, fixing mate pairs in the process; does not assume they are sorted
* @Returns: Command line function for the merge, fix-mate, and sort operation
*/
protected def StandardPicardFixMates(inBams: List[File], outBam: File, picardJar: File) : CommandLineFunction = {
def StandardPicardFixMates(inBams: List[File], outBam: File, picardJar: File) : CommandLineFunction = {
var pfm : PicardFixMates = new PicardFixMates
pfm.bams = inBams
pfm.outBam = outBam

View File

@ -35,7 +35,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
* @Return: UnifiedGenotyper with the standard GSA arguments
* @TODO: Add a formula: f(#bams)=memory; allow yaml to specify triggers and perhaps other information
*/
protected def StandardUnifiedGenotyper(bams : List[File], output : File) : UnifiedGenotyper = {
def StandardUnifiedGenotyper(bams : List[File], output : File) : UnifiedGenotyper = {
var ug = new UnifiedGenotyper with StandardCommandLineGATK
ug.analysisName = "UnifiedGenotyper"
ug.input_file = bams
@ -63,7 +63,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
* @Doc: Creates a CLF to call indels on a specific .bam file, outputting to a given output file
* @Returns: An IndelGenotyperV2 CLF with standard GSA arguments
*/
protected def StandardIndelGenotyper(bam : File, output: File) : IndelGenotyperV2 = {
def StandardIndelGenotyper(bam : File, output: File) : IndelGenotyperV2 = {
var ig = new IndelGenotyperV2 with StandardCommandLineGATK
ig.analysisName = "IndelGenotyper"
ig.input_file :+= bam
@ -86,7 +86,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
* @Doc: Combines a list of indel VCFs to a single output file
* @Returns: A CombineVariants CLF with standard GSA arguments
*/
protected def StandardIndelCombine( igList : List[IndelGenotyperV2], output : File ) : CombineVariants = {
def StandardIndelCombine( igList : List[IndelGenotyperV2], output : File ) : CombineVariants = {
var cv = new CombineVariants with StandardCommandLineGATK
cv.out = output
cv.genotypemergeoption = Some(org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContextUtils.GenotypeMergeType.UNIQUIFY)
@ -105,7 +105,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
* @Doc: Generates indel calls on a list of .bam files, and merges those calls into an output file. This is a small pipeline.
* @Returns: A list of CLFs that run indel calls and indel merging. User has zero control over individual indel VCF names.
*/
protected def StandardIndelCalls ( bams : List[File], output : File ) : List[CommandLineGATK] = {
def StandardIndelCalls ( bams : List[File], output : File ) : List[CommandLineGATK] = {
var genotypers = bams.foldLeft[List[IndelGenotyperV2]](Nil)( (igs,bam) => igs ::: List(this.StandardIndelGenotyper(bam, swapExt(bam,".bam",".indels.vcf"), false)))
var combine = this.StandardIndelCombine( genotypers, output )
var callFunctions: List[CommandLineGATK] = genotypers
@ -114,7 +114,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
return callFunctions
}
protected def StandardFilterAtIndels ( snps: File, indels: File, output : File ) : VariantFiltration = {
def StandardFilterAtIndels ( snps: File, indels: File, output : File ) : VariantFiltration = {
var iFil = new VariantFiltration with StandardCommandLineGATK
iFil.analysisName = "FilterAtIndels"
iFil.out = output
@ -128,7 +128,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
return iFil
}
protected def StandardHandfilter( snps: File, output: File ) : VariantFiltration = {
def StandardHandfilter( snps: File, output: File ) : VariantFiltration = {
var hFil = new VariantFiltration with StandardCommandLineGATK
hFil.analysisName = "HandFilter"
hFil.out = output
@ -143,7 +143,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
return hFil
}
protected def StandardVariantCluster( snps: File, output: File ) : GenerateVariantClusters = {
def StandardVariantCluster( snps: File, output: File ) : GenerateVariantClusters = {
var genC = new GenerateVariantClusters with StandardCommandLineGATK
genC.analysisName = "VariantQualityRecalibration"
genC.rodBind :+= new RodBind("input","VCF",snps)
@ -157,7 +157,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
return genC
}
protected def StandardVariantRecalibrator ( raw_vcf: File, cluster: File, target_titv: scala.Double, out_vcf: File,
def StandardVariantRecalibrator ( raw_vcf: File, cluster: File, target_titv: scala.Double, out_vcf: File,
out_tranches: File, out_dat: File) : VariantRecalibrator = {
var vr = new VariantRecalibrator with StandardCommandLineGATK
vr.analysisName = "VariantQualityRecalibration"
@ -176,7 +176,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
}
protected def StandardApplyVariantCuts( snpRecal: File, tranches: File, output: File) : ApplyVariantCuts = {
def StandardApplyVariantCuts( snpRecal: File, tranches: File, output: File) : ApplyVariantCuts = {
var avc = new ApplyVariantCuts with StandardCommandLineGATK
avc.analysisName = "VariantQualityRecalibration"
avc.rodBind :+= new RodBind("input","VCF",snpRecal)
@ -187,7 +187,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
return avc
}
protected def StandardRecalibrateVariants( snps: File, targetTiTv: scala.Double, recalVcf: File) : List[CommandLineGATK] = {
def StandardRecalibrateVariants( snps: File, targetTiTv: scala.Double, recalVcf: File) : List[CommandLineGATK] = {
var clust = StandardVariantCluster(snps, swapExt(snps,".vcf",".cluster"))
var recal = StandardVariantRecalibrator(snps,clust.clusterFile,targetTiTv,swapExt(snps,".vcf",".recal.vcf"),
swapExt(snps,".vcf",".recal.tranch"),swapExt(snps,".vcf",".recal.dat"))
@ -201,7 +201,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
return cmds
}
protected def StandardGenomicAnnotation ( snps: File, refseqFile: File, outputVCF: File) : GenomicAnnotator = {
def StandardGenomicAnnotation ( snps: File, refseqFile: File, outputVCF: File) : GenomicAnnotator = {
var ga = new GenomicAnnotator with StandardCommandLineGATK
ga.analysisName = "GenomicAnnotator"
ga.variantVCF = snps
@ -212,7 +212,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
return ga
}
protected def StandardSNPCalls( bams: List[File], output: File, targetTiTv: scala.Double, refGene: File = null ) : List[CommandLineGATK] = {
def StandardSNPCalls( bams: List[File], output: File, targetTiTv: scala.Double, refGene: File = null ) : List[CommandLineGATK] = {
var commands : List[CommandLineGATK] = Nil
var dir = ""
@ -250,7 +250,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
return commands
}
protected def StandardSNPCallsBothFilterTypes(bams: List[File], recalOut: File, handFilteredOut: File, targetTiTv: scala.Double, refGene: File = null ) : List[CommandLineGATK] = {
def StandardSNPCallsBothFilterTypes(bams: List[File], recalOut: File, handFilteredOut: File, targetTiTv: scala.Double, refGene: File = null ) : List[CommandLineGATK] = {
var commands : List[CommandLineGATK] = Nil
var dir = ""
@ -292,7 +292,7 @@ class VariantCalling(yaml: File,gatkJar: File) {
return commands
}
protected def StandardCallingPipeline(bams: List[File], indelOut: File, recalOut: File, handFilteredOut: File, targetTiTv: scala.Double, refGene: File = null ) : List[CommandLineGATK] = {
def StandardCallingPipeline(bams: List[File], indelOut: File, recalOut: File, handFilteredOut: File, targetTiTv: scala.Double, refGene: File = null ) : List[CommandLineGATK] = {
var commands : List[CommandLineGATK] = Nil
var dir = ""