From bc125f104a9accedb89ef52238fea84af1f3fee8 Mon Sep 17 00:00:00 2001 From: Ryan Poplin Date: Wed, 10 Aug 2011 10:23:33 -0400 Subject: [PATCH] TrainingSets class is obsolete now. --- .../variantrecalibration/TrainingSet.java | 71 ------------------- .../VariantDataManager.java | 2 - 2 files changed, 73 deletions(-) delete mode 100755 public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/TrainingSet.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/TrainingSet.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/TrainingSet.java deleted file mode 100755 index 6c1a7ddbc..000000000 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/TrainingSet.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2011 The Broad Institute - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -package org.broadinstitute.sting.gatk.walkers.variantrecalibration; - -import org.apache.log4j.Logger; -import org.broadinstitute.sting.commandline.Tags; - -/** - * Created by IntelliJ IDEA. - * User: rpoplin - * Date: 3/12/11 - */ - -public class TrainingSet { - - public String name; - public boolean isKnown = false; - public boolean isTraining = false; - public boolean isAntiTraining = false; - public boolean isTruth = false; - public boolean isConsensus = false; - public double prior = 0.0; - - protected final static Logger logger = Logger.getLogger(TrainingSet.class); - - public TrainingSet( final String name, final Tags tags ) { - this.name = name; - - // Parse the tags to decide which tracks have which properties - if( tags != null ) { - isKnown = tags.containsKey("known") && tags.getValue("known").equals("true"); - isTraining = tags.containsKey("training") && tags.getValue("training").equals("true"); - isAntiTraining = tags.containsKey("bad") && tags.getValue("bad").equals("true"); - isTruth = tags.containsKey("truth") && tags.getValue("truth").equals("true"); - isConsensus = tags.containsKey("consensus") && tags.getValue("consensus").equals("true"); - prior = ( tags.containsKey("prior") ? Double.parseDouble(tags.getValue("prior")) : prior ); - } - - // Report back to the user which tracks were found and the properties that were detected - if( !isConsensus && !isAntiTraining ) { - logger.info( String.format( "Found %s track: \tKnown = %s \tTraining = %s \tTruth = %s \tPrior = Q%.1f", this.name, isKnown, isTraining, isTruth, prior) ); - } else if( isConsensus ) { - logger.info( String.format( "Found consensus track: %s", this.name) ); - } else { - logger.info( String.format( "Found bad sites training track: %s", this.name) ); - } - } -} diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantDataManager.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantDataManager.java index 08026a45e..cb4d94332 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantDataManager.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantDataManager.java @@ -52,7 +52,6 @@ public class VariantDataManager { private final double[] meanVector; private final double[] varianceVector; // this is really the standard deviation public final ArrayList annotationKeys; - private final ExpandingArrayList trainingSets; private final VariantRecalibratorArgumentCollection VRAC; protected final static Logger logger = Logger.getLogger(VariantDataManager.class); @@ -63,7 +62,6 @@ public class VariantDataManager { this.VRAC = VRAC; meanVector = new double[this.annotationKeys.size()]; varianceVector = new double[this.annotationKeys.size()]; - trainingSets = new ExpandingArrayList(); } public void setData( final ExpandingArrayList data ) {