From dec0a781c2de1902638ad0e47bf91b4645f1ee66 Mon Sep 17 00:00:00 2001 From: depristo Date: Wed, 2 Dec 2009 20:19:28 +0000 Subject: [PATCH] Un-reinventing the wheel. --sleep argument removed. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2227 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/GATKArgumentCollection.java | 7 ------- .../sting/gatk/GenomeAnalysisEngine.java | 8 -------- .../gatk/walkers/annotator/SecondBaseSkew.java | 18 ------------------ 3 files changed, 33 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/GATKArgumentCollection.java b/java/src/org/broadinstitute/sting/gatk/GATKArgumentCollection.java index 9de3779e7..945a0a69a 100755 --- a/java/src/org/broadinstitute/sting/gatk/GATKArgumentCollection.java +++ b/java/src/org/broadinstitute/sting/gatk/GATKArgumentCollection.java @@ -64,10 +64,6 @@ public class GATKArgumentCollection { @Argument(fullName = "intervals", shortName = "L", doc = "A list of genomic intervals over which to operate. Can be explicitly specified on the command line or in a file.", required = false) public List intervals = null; - @ElementList(required = false) - @Argument(fullName = "sleep", doc = "If provided, the engine will sleep for this number of milliseconds before starting the analysis -- useful for debugging", required = false) - public long sleep = 0; - @Element(required = false) @Argument(fullName = "reference_sequence", shortName = "R", doc = "Reference sequence file", required = false) public File referenceFile = null; @@ -223,9 +219,6 @@ public class GATKArgumentCollection { if (other.walkerArgs.size() != walkerArgs.size()) { return false; } - if (other.sleep != sleep) { - return false; - } for (String s : walkerArgs.keySet()) { if (!other.walkerArgs.containsKey(s)) { return false; diff --git a/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java b/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java index 5f6af06f1..910d0914f 100755 --- a/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java @@ -136,14 +136,6 @@ public class GenomeAnalysisEngine { // save our argument parameter this.argCollection = args; - if ( args.sleep > 0 ) { - try { - Thread.sleep(args.sleep); - } catch ( InterruptedException e ) { - throw new RuntimeException(e); - } - } - // Prepare the data for traversal. initializeDataSources(my_walker, filters, argCollection); diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SecondBaseSkew.java b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SecondBaseSkew.java index 93b854733..35fd2aa23 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SecondBaseSkew.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SecondBaseSkew.java @@ -33,13 +33,6 @@ public class SecondBaseSkew implements VariantAnnotation { public String annotate(ReferenceContext ref, ReadBackedPileup pileup, Variation variation, List genotypes) { if ( variation.isSNP() && variation.isBiallelic() ) { char snp = variation.getAlternativeBaseForSNP(); -// try { -// System.out.printf("snp %c, alt is %c%n", snp, getNonref(genotypes, ref.getBase())); -// } catch (IllegalStateException e) { -// System.out.printf("%s is not biallelic%n", variation.toString()); -// return null; -// } - Pair depthProp = getSecondaryPileupNonrefEstimator(ref.getBase(), pileup, snp); if ( depthProp == null ) { return null; @@ -79,21 +72,10 @@ public class SecondBaseSkew implements VariantAnnotation { } if ( variantDepth > 0 ) { - //System.out.printf("%d %d %d %d%n", primaryPileup.length, secondaryPileup.length, variantDepth, variantsWithRefSecondBase ); double biasedProportion = ( 1.0 + variantsWithRefSecondBase )/(1.0 + variantDepth ); return new Pair(variantDepth+1, biasedProportion); } else { return null; } } - - private char getNonref(List genotypes, char ref) { - for ( Genotype g : genotypes ) { - if ( g.isVariant(ref) ) { - return g.toVariation(ref).getAlternativeBaseForSNP(); - } - } - - throw new IllegalStateException("List of genotypes did not contain a variant."); - } }