From 8a6b126ea8a4dae3d37dc2ef1037872b26affb1c Mon Sep 17 00:00:00 2001 From: delangel Date: Wed, 12 Jan 2011 18:35:24 +0000 Subject: [PATCH] Several cleanups to IndelMetricsByAC: - No longer a standard eval module to keep integration tests happy - Remove class name overlaps with SimpleMetricsByAC so that modules don't overwrite each other's files, and to make it easier to grep results. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4978 348d0f76-0448-11de-a6fe-93d51630548a --- .../walkers/varianteval/IndelMetricsByAC.java | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/IndelMetricsByAC.java b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/IndelMetricsByAC.java index b2815fae1..84cefa544 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/IndelMetricsByAC.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/IndelMetricsByAC.java @@ -3,7 +3,6 @@ package org.broadinstitute.sting.gatk.walkers.varianteval; import org.broad.tribble.util.variantcontext.VariantContext; import org.broadinstitute.sting.gatk.contexts.AlignmentContext; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; -import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContextUtils; import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; import org.broadinstitute.sting.utils.report.tags.Analysis; import org.broadinstitute.sting.utils.report.tags.DataPoint; @@ -43,10 +42,10 @@ import java.util.ArrayList; */ @Analysis(name = "Indel Metrics by allele count", description = "Shows various stats binned by allele count") -public class IndelMetricsByAC extends VariantEvaluator implements StandardEval { +public class IndelMetricsByAC extends VariantEvaluator { // a mapping from quality score histogram bin to Ti/Tv ratio @DataPoint(name="Indel Metrics by AC", description = "Indel Metrics by allele count") - MetricsByAc metrics = null; + IndelMetricsByAc metrics = null; //@DataPoint(name="Quality by Allele Count", description = "average variant quality for each allele count") //AlleleCountStats alleleCountStats = null; @@ -74,11 +73,11 @@ public class IndelMetricsByAC extends VariantEvaluator implements StandardEval { METRIC_COLUMNS[k] = "indel_size_len"+Integer.valueOf(index2len(k)); } - class MetricsAtAC { + class IndelMetricsAtAC { public int ac = -1, nIns =0, nDel = 0, nComplex = 0, nLong; public int sizeCount[] = new int[2*INDEL_SIZE_LIMIT+1]; - public MetricsAtAC(int ac) { this.ac = ac; } + public IndelMetricsAtAC(int ac) { this.ac = ac; } public void update(VariantContext eval) { int eventLength = 0; @@ -120,15 +119,15 @@ public class IndelMetricsByAC extends VariantEvaluator implements StandardEval { } } - class MetricsByAc implements TableType { - ArrayList metrics = new ArrayList(); + class IndelMetricsByAc implements TableType { + ArrayList metrics = new ArrayList(); Object[] rows = null; - public MetricsByAc( int nchromosomes ) { + public IndelMetricsByAc( int nchromosomes ) { rows = new Object[nchromosomes+1]; - metrics = new ArrayList(nchromosomes+1); + metrics = new ArrayList(nchromosomes+1); for ( int i = 0; i < nchromosomes + 1; i++ ) { - metrics.add(new MetricsAtAC(i)); + metrics.add(new IndelMetricsAtAC(i)); rows[i] = "ac" + i; } } @@ -142,7 +141,7 @@ public class IndelMetricsByAC extends VariantEvaluator implements StandardEval { } public String getName() { - return "MetricsByAc"; + return "IndelMetricsByAc"; } // @@ -197,7 +196,7 @@ public class IndelMetricsByAC extends VariantEvaluator implements StandardEval { if ( metrics == null ) { int nSamples = this.getVEWalker().getNSamplesForEval(eval); if ( nSamples != -1 ) - metrics = new MetricsByAc(2 * nSamples); + metrics = new IndelMetricsByAc(2 * nSamples); } if ( eval.isIndel() && eval.isBiallelic() &&