diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantrecalibration/ApplyRecalibration.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantrecalibration/ApplyRecalibration.java index 0f8ad68fe..37a55ca69 100755 --- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantrecalibration/ApplyRecalibration.java +++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantrecalibration/ApplyRecalibration.java @@ -123,7 +123,7 @@ public class ApplyRecalibration extends RodWalker { // setup the header fields final Set hInfo = new HashSet(); hInfo.addAll(VCFUtils.getHeaderFields(getToolkit(), inputNames)); - hInfo.add(new VCFInfoHeaderLine(ContrastiveRecalibrator.VQS_LOD_KEY, 1, VCFHeaderLineType.Float, "log10-scaled probability of variant being true under the trained gaussian mixture model")); + hInfo.add(new VCFInfoHeaderLine(VariantRecalibrator.VQS_LOD_KEY, 1, VCFHeaderLineType.Float, "log10-scaled probability of variant being true under the trained gaussian mixture model")); final TreeSet samples = new TreeSet(); samples.addAll(SampleUtils.getUniqueSamplesFromRods(getToolkit(), inputNames)); @@ -170,12 +170,12 @@ public class ApplyRecalibration extends RodWalker { for( VariantContext vc : tracker.getVariantContexts(ref, inputNames, null, context.getLocation(), true, false) ) { if( vc != null ) { - if( ContrastiveRecalibrator.checkRecalibrationMode( vc, MODE ) ) { + if( VariantRecalibrator.checkRecalibrationMode( vc, MODE ) ) { String filterString = null; final Map attrs = new HashMap(vc.getAttributes()); final Double lod = (Double) lodMap.get( ref.getLocus().getContig(), ref.getLocus().getStart(), ref.getLocus().getStop() ); if( vc.isNotFiltered() || ignoreInputFilterSet.containsAll(vc.getFilters()) ) { - attrs.put(ContrastiveRecalibrator.VQS_LOD_KEY, String.format("%.4f", lod)); + attrs.put(VariantRecalibrator.VQS_LOD_KEY, String.format("%.4f", lod)); for( int i = tranches.size() - 1; i >= 0; i-- ) { final Tranche tranche = tranches.get(i); if( lod >= tranche.minVQSLod ) { diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantrecalibration/ContrastiveRecalibrator.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantrecalibration/VariantRecalibrator.java similarity index 98% rename from java/src/org/broadinstitute/sting/playground/gatk/walkers/variantrecalibration/ContrastiveRecalibrator.java rename to java/src/org/broadinstitute/sting/playground/gatk/walkers/variantrecalibration/VariantRecalibrator.java index 8311faba6..e8b9705d7 100755 --- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantrecalibration/ContrastiveRecalibrator.java +++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantrecalibration/VariantRecalibrator.java @@ -48,15 +48,15 @@ import java.io.PrintStream; import java.util.*; /** - * Applies calibrated variant cluster parameters to variant calls to produce an accurate and informative variant quality score. + * Takes variant calls as .vcf files, learns a Gaussian mixture model over the variant annotations and evaluates the variant -- assigning an informative lod score * * User: rpoplin * Date: 3/12/11 * - * @help.summary Takes variant calls as .vcf files, learns a Gaussian mixture model over the variant annotations and evaluates the variants + * @help.summary Takes variant calls as .vcf files, learns a Gaussian mixture model over the variant annotations and evaluates the variant -- assigning an informative lod score */ -public class ContrastiveRecalibrator extends RodWalker, ExpandingArrayList> implements TreeReducible> { +public class VariantRecalibrator extends RodWalker, ExpandingArrayList> implements TreeReducible> { public static final String VQS_LOD_KEY = "VQSLOD"; diff --git a/scala/qscript/core/MethodsDevelopmentCallingPipeline.scala b/scala/qscript/core/MethodsDevelopmentCallingPipeline.scala index 15a7be90a..47741deb1 100755 --- a/scala/qscript/core/MethodsDevelopmentCallingPipeline.scala +++ b/scala/qscript/core/MethodsDevelopmentCallingPipeline.scala @@ -244,7 +244,7 @@ class MethodsDevelopmentCallingPipeline extends QScript { } // 3.) Variant Quality Score Recalibration - Generate Recalibration table - class VQSR(t: Target, goldStandard: Boolean) extends ContrastiveRecalibrator with UNIVERSAL_GATK_ARGS { + class VQSR(t: Target, goldStandard: Boolean) extends VariantRecalibrator with UNIVERSAL_GATK_ARGS { this.memoryLimit = 4 this.reference_sequence = t.reference this.intervalsString ++= List(t.intervals) diff --git a/scala/qscript/oneoffs/carneiro/pbCalling.scala b/scala/qscript/oneoffs/carneiro/pbCalling.scala index 33baa3369..5a304ed63 100755 --- a/scala/qscript/oneoffs/carneiro/pbCalling.scala +++ b/scala/qscript/oneoffs/carneiro/pbCalling.scala @@ -187,7 +187,7 @@ class pbCalling extends QScript { this.analysisName = t.name + "_VF" } - class VQSR(t: Target, goldStandard: Boolean) extends ContrastiveRecalibrator { + class VQSR(t: Target, goldStandard: Boolean) extends VariantRecalibrator { this.memoryLimit = 6 this.intervalsString ++= List(t.intervals) this.rodBind :+= RodBind("input", "VCF", if ( goldStandard ) { t.goldStandard_VCF } else { t.filteredVCF } ) diff --git a/scala/qscript/oneoffs/chartl/Exome_VQSR_FullSearch.q b/scala/qscript/oneoffs/chartl/Exome_VQSR_FullSearch.q index aad6ae70b..17360659b 100755 --- a/scala/qscript/oneoffs/chartl/Exome_VQSR_FullSearch.q +++ b/scala/qscript/oneoffs/chartl/Exome_VQSR_FullSearch.q @@ -154,7 +154,7 @@ class Exome_VQSR_FullSearch extends QScript { val directory = getPath(annotations,recalTogether) for ( call_thresh <- VQSR_CALL_THRESH ) { for ( vqsr_rb <- VQSR_RODBINDS.iterator ) { - trait VQSR_Args extends ContrastiveRecalibrator { + trait VQSR_Args extends VariantRecalibrator { this.allPoly = true this.analysisName = "VQSR_%s_%s_%.1f".format( annotations.reduceLeft( _ + "." + _), if ( recalTogether ) "true" else "false", call_thresh) this.commandDirectory = directory @@ -166,17 +166,17 @@ class Exome_VQSR_FullSearch extends QScript { } val nameFormat = SCRIPT_BASE_NAME+".%1f.%s.".format(call_thresh,vqsr_rb._1)+"%s." if ( recalTogether ) { - var vqsr = new ContrastiveRecalibrator with VQSR_Args with ExpandedIntervals with CommandLineGATKArgs + var vqsr = new VariantRecalibrator with VQSR_Args with ExpandedIntervals with CommandLineGATKArgs vqsr.tranchesFile = new File(nameFormat.format("both")+"tranche") vqsr.recalFile = new File(nameFormat.format("both")+"recal") add(vqsr) addAll(eval(vqsr, ei.outList, "flanks")) addAll(eval(vqsr, INTS, "exons")) } else { - var exons = new ContrastiveRecalibrator with VQSR_Args with CommandLineGATKArgs + var exons = new VariantRecalibrator with VQSR_Args with CommandLineGATKArgs exons.tranchesFile = new File(nameFormat.format("exons")+"tranche") exons.recalFile = new File(nameFormat.format("exons")+"recal") - var flanks = new ContrastiveRecalibrator with VQSR_Args + var flanks = new VariantRecalibrator with VQSR_Args flanks.intervals :+= ei.outList.getAbsoluteFile flanks.jarFile = GATK_JAR flanks.memoryLimit = Some(8) @@ -194,8 +194,8 @@ class Exome_VQSR_FullSearch extends QScript { } // want to apply and eval - def eval(recal: ContrastiveRecalibrator) : List[QFunction] = { eval(recal,null,"") } - def eval(recal: ContrastiveRecalibrator, list: File, ext: String) : List[QFunction] = { + def eval(recal: VariantRecalibrator) : List[QFunction] = { eval(recal,null,"") } + def eval(recal: VariantRecalibrator, list: File, ext: String) : List[QFunction] = { var functions : List[QFunction] = Nil trait ImplicitArgs extends CommandLineGATK { this.jarFile = recal.jarFile @@ -245,4 +245,4 @@ class Exome_VQSR_FullSearch extends QScript { functions } -} \ No newline at end of file +} diff --git a/scala/qscript/playground/wgs.q b/scala/qscript/playground/wgs.q index 3b834926f..7b974e581 100644 --- a/scala/qscript/playground/wgs.q +++ b/scala/qscript/playground/wgs.q @@ -170,7 +170,7 @@ class WGSpipeline extends QScript { recombine.jobName = qscript.project + ".recombine" recombine.jobOutputFile = swapExt(combineVCFs.jobOutputFile, "combine.out", "recombine.out") - val cr = new ContrastiveRecalibrator with CommandLineGATKArgs + val cr = new VariantRecalibrator with CommandLineGATKArgs cr.rodBind :+= RodBind("hapmap","VCF", qscript.hapmap, "training=true, prior=3.0") cr.rodBind :+= RodBind("1kg", "VCF", qscript.omni, "training=true, prior=3.0") cr.rodBind :+= RodBind("input", "VCF", recombine.out)