diff --git a/protected/java/src/org/broadinstitute/sting/gatk/DummyProtectedClass.java b/protected/java/src/org/broadinstitute/sting/gatk/DummyProtectedClass.java deleted file mode 100644 index c1324aea4..000000000 --- a/protected/java/src/org/broadinstitute/sting/gatk/DummyProtectedClass.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.broadinstitute.sting.gatk; - -/* - * Copyright (c) 2009 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. - */ - -import org.broadinstitute.sting.utils.classloader.ProtectedPackageSource; - -public class DummyProtectedClass implements ProtectedPackageSource { - - // THIS CLASS IS USED JUST SO THAT WE CAN TEST WHETHER WE ARE USING THE LITE OR FULL VERSION OF THE GATK - // **** DO NOT REMOVE! **** -} diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/AlleleBalance.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/AlleleBalance.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/AlleleBalance.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/AlleleBalance.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/AlleleBalanceBySample.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/AlleleBalanceBySample.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/AlleleBalanceBySample.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/AlleleBalanceBySample.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/AverageAltAlleleLength.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/AverageAltAlleleLength.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/AverageAltAlleleLength.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/AverageAltAlleleLength.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/BaseCounts.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/BaseCounts.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/BaseCounts.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/BaseCounts.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/BaseQualityRankSumTest.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/BaseQualityRankSumTest.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/BaseQualityRankSumTest.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/BaseQualityRankSumTest.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/ChromosomeCounts.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/ChromosomeCounts.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/ChromosomeCounts.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/ChromosomeCounts.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/ClippingRankSumTest.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/ClippingRankSumTest.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/ClippingRankSumTest.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/ClippingRankSumTest.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthOfCoverage.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthOfCoverage.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthOfCoverage.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthOfCoverage.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthPerAlleleBySample.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthPerAlleleBySample.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthPerAlleleBySample.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthPerAlleleBySample.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/FisherStrand.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/FisherStrand.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/FisherStrand.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/FisherStrand.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/GCContent.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/GCContent.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/GCContent.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/GCContent.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HaplotypeScore.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HaplotypeScore.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HaplotypeScore.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HaplotypeScore.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HardyWeinberg.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HardyWeinberg.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HardyWeinberg.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HardyWeinberg.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HomopolymerRun.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HomopolymerRun.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HomopolymerRun.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/HomopolymerRun.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/InbreedingCoeff.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/InbreedingCoeff.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/InbreedingCoeff.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/InbreedingCoeff.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/LowMQ.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/LowMQ.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/LowMQ.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/LowMQ.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MVLikelihoodRatio.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityRankSumTest.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityRankSumTest.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityRankSumTest.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityRankSumTest.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityZero.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityZero.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityZero.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityZero.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityZeroBySample.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityZeroBySample.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityZeroBySample.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityZeroBySample.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityZeroFraction.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityZeroFraction.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityZeroFraction.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/MappingQualityZeroFraction.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/NBaseCount.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/NBaseCount.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/NBaseCount.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/NBaseCount.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/QualByDepth.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/QualByDepth.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/QualByDepth.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/QualByDepth.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/RMSMappingQuality.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/RMSMappingQuality.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/RMSMappingQuality.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/RMSMappingQuality.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/RankSumTest.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/RankSumTest.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/RankSumTest.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/RankSumTest.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/ReadPosRankSumTest.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/ReadPosRankSumTest.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/ReadPosRankSumTest.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/ReadPosRankSumTest.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SampleList.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SampleList.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SampleList.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SampleList.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SnpEff.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SnpEff.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SnpEff.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SnpEff.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SpanningDeletions.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SpanningDeletions.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SpanningDeletions.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/SpanningDeletions.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/TandemRepeatAnnotator.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/TandemRepeatAnnotator.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/TandemRepeatAnnotator.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/TandemRepeatAnnotator.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/TechnologyComposition.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/TechnologyComposition.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/TechnologyComposition.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/TechnologyComposition.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/TransmissionDisequilibriumTest.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/TransmissionDisequilibriumTest.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/TransmissionDisequilibriumTest.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/TransmissionDisequilibriumTest.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotator.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotator.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotator.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotator.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorEngine.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorEngine.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorEngine.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantAnnotatorEngine.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantType.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantType.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantType.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/VariantType.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/ActiveRegionBasedAnnotation.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/ActiveRegionBasedAnnotation.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/ActiveRegionBasedAnnotation.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/ActiveRegionBasedAnnotation.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/AnnotationInterfaceManager.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/AnnotationInterfaceManager.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/AnnotationInterfaceManager.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/AnnotationInterfaceManager.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/AnnotationType.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/AnnotationType.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/AnnotationType.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/AnnotationType.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/AnnotatorCompatible.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/AnnotatorCompatible.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/AnnotatorCompatible.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/AnnotatorCompatible.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/ExperimentalAnnotation.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/ExperimentalAnnotation.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/ExperimentalAnnotation.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/ExperimentalAnnotation.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/GenotypeAnnotation.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/GenotypeAnnotation.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/GenotypeAnnotation.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/GenotypeAnnotation.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/InfoFieldAnnotation.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/InfoFieldAnnotation.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/InfoFieldAnnotation.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/InfoFieldAnnotation.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/RodRequiringAnnotation.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/RodRequiringAnnotation.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/RodRequiringAnnotation.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/RodRequiringAnnotation.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/StandardAnnotation.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/StandardAnnotation.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/StandardAnnotation.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/StandardAnnotation.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/VariantAnnotatorAnnotation.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/VariantAnnotatorAnnotation.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/VariantAnnotatorAnnotation.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/VariantAnnotatorAnnotation.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/WorkInProgressAnnotation.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/WorkInProgressAnnotation.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/WorkInProgressAnnotation.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/annotator/interfaces/WorkInProgressAnnotation.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/beagle/BeagleOutputToVCF.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/beagle/BeagleOutputToVCF.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/beagle/BeagleOutputToVCF.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/beagle/BeagleOutputToVCF.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/beagle/ProduceBeagleInput.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/beagle/ProduceBeagleInput.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/beagle/ProduceBeagleInput.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/beagle/ProduceBeagleInput.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/beagle/VariantsToBeagleUnphased.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/beagle/VariantsToBeagleUnphased.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/beagle/VariantsToBeagleUnphased.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/beagle/VariantsToBeagleUnphased.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/compression/reducereads/SimpleGenomeLoc.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/compression/reducereads/SimpleGenomeLoc.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/compression/reducereads/SimpleGenomeLoc.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/compression/reducereads/SimpleGenomeLoc.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CallableLoci.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CallableLoci.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CallableLoci.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CallableLoci.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CompareCallableLoci.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CompareCallableLoci.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CompareCallableLoci.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CompareCallableLoci.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CoverageUtils.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CoverageUtils.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CoverageUtils.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/CoverageUtils.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverage.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverage.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverage.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverage.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageStats.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageStats.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageStats.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageStats.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DoCOutputType.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DoCOutputType.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DoCOutputType.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DoCOutputType.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/GCContentByInterval.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/GCContentByInterval.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/GCContentByInterval.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/coverage/GCContentByInterval.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/ErrorRatePerCycle.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/ErrorRatePerCycle.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/ErrorRatePerCycle.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/ErrorRatePerCycle.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/ReadGroupProperties.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/ReadGroupProperties.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/ReadGroupProperties.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/ReadGroupProperties.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/ReadLengthDistribution.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/ReadLengthDistribution.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/ReadLengthDistribution.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/ReadLengthDistribution.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/CallableStatus.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/CallableStatus.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/CallableStatus.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/CallableStatus.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/DiagnoseTargets.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/DiagnoseTargets.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/DiagnoseTargets.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/DiagnoseTargets.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/FindCoveredIntervals.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/FindCoveredIntervals.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/FindCoveredIntervals.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/FindCoveredIntervals.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/IntervalStatistics.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/IntervalStatistics.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/IntervalStatistics.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/IntervalStatistics.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/LocusStatistics.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/LocusStatistics.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/LocusStatistics.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/LocusStatistics.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/SampleStatistics.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/SampleStatistics.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/SampleStatistics.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/SampleStatistics.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/ThresHolder.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/ThresHolder.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/ThresHolder.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diagnostics/targets/ThresHolder.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/BAMDiffableReader.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/BAMDiffableReader.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/BAMDiffableReader.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/BAMDiffableReader.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffElement.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffElement.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffElement.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffElement.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffEngine.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffEngine.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffEngine.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffEngine.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffNode.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffNode.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffNode.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffNode.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffObjects.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffObjects.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffObjects.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffObjects.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffValue.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffValue.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffValue.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffValue.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffableReader.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffableReader.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffableReader.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffableReader.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/Difference.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/Difference.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/Difference.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/Difference.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/GATKReportDiffableReader.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/GATKReportDiffableReader.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/GATKReportDiffableReader.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/GATKReportDiffableReader.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/VCFDiffableReader.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/VCFDiffableReader.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/VCFDiffableReader.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/VCFDiffableReader.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaAlternateReferenceMaker.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaAlternateReferenceMaker.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaAlternateReferenceMaker.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaAlternateReferenceMaker.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaReferenceMaker.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaReferenceMaker.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaReferenceMaker.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaReferenceMaker.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaSequence.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaSequence.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaSequence.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaSequence.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaStats.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaStats.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaStats.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaStats.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/filters/ClusteredSnps.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/filters/ClusteredSnps.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/filters/ClusteredSnps.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/filters/ClusteredSnps.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/filters/FiltrationContext.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/filters/FiltrationContext.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/filters/FiltrationContext.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/filters/FiltrationContext.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/filters/FiltrationContextWindow.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/filters/FiltrationContextWindow.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/filters/FiltrationContextWindow.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/filters/FiltrationContextWindow.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltration.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltration.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltration.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltration.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/BaseMismatchModel.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/BaseMismatchModel.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/BaseMismatchModel.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/BaseMismatchModel.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/ConsensusAlleleCounter.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/ConsensusAlleleCounter.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/ConsensusAlleleCounter.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/ConsensusAlleleCounter.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidGenotype.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidGenotype.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidGenotype.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidGenotype.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidSNPGenotypeLikelihoods.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidSNPGenotypeLikelihoods.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidSNPGenotypeLikelihoods.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidSNPGenotypeLikelihoods.java diff --git a/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/ErrorModel.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/ErrorModel.java index 30650e9c0..e51e41e88 100644 --- a/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/ErrorModel.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/ErrorModel.java @@ -60,7 +60,7 @@ public class ErrorModel { boolean hasCalledAlleles = false; - final PerReadAlleleLikelihoodMap perReadAlleleLikelihoodMap = PerReadAlleleLikelihoodMap.getBestAvailablePerReadAlleleLikelihoodMap(); + final PerReadAlleleLikelihoodMap perReadAlleleLikelihoodMap = new PerReadAlleleLikelihoodMap(); if (refSampleVC != null) { for (Allele allele : refSampleVC.getAlleles()) { diff --git a/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GeneralPloidyGenotypeLikelihoodsCalculationModel.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GeneralPloidyGenotypeLikelihoodsCalculationModel.java index ce66ce8d0..2788f201c 100644 --- a/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GeneralPloidyGenotypeLikelihoodsCalculationModel.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GeneralPloidyGenotypeLikelihoodsCalculationModel.java @@ -31,6 +31,7 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; import org.broadinstitute.sting.utils.GenomeLoc; import org.broadinstitute.sting.utils.GenomeLocParser; import org.broadinstitute.sting.utils.MathUtils; +import org.broadinstitute.sting.utils.genotyper.PerReadAlleleLikelihoodMap; import org.broadinstitute.variant.vcf.VCFConstants; import org.broadinstitute.sting.utils.collections.Pair; import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; @@ -231,7 +232,7 @@ public abstract class GeneralPloidyGenotypeLikelihoodsCalculationModel extends G ReadBackedPileup pileup = AlignmentContextUtils.stratify(sample.getValue(), contextType).getBasePileup(); if (!perReadAlleleLikelihoodMap.containsKey(sample.getKey())){ // no likelihoods have been computed for this sample at this site - perReadAlleleLikelihoodMap.put(sample.getKey(), org.broadinstitute.sting.utils.genotyper.PerReadAlleleLikelihoodMap.getBestAvailablePerReadAlleleLikelihoodMap()); + perReadAlleleLikelihoodMap.put(sample.getKey(), new PerReadAlleleLikelihoodMap()); } // create the GenotypeLikelihoods object diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypeLikelihoodsCalculationModel.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypeLikelihoodsCalculationModel.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypeLikelihoodsCalculationModel.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypeLikelihoodsCalculationModel.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypePriors.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypePriors.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypePriors.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/GenotypePriors.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java similarity index 99% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java index 56965c022..ce59a90fc 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/IndelGenotypeLikelihoodsCalculationModel.java @@ -119,7 +119,7 @@ public class IndelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihood if (!perReadAlleleLikelihoodMap.containsKey(sample.getKey())){ // no likelihoods have been computed for this sample at this site - perReadAlleleLikelihoodMap.put(sample.getKey(), PerReadAlleleLikelihoodMap.getBestAvailablePerReadAlleleLikelihoodMap()); + perReadAlleleLikelihoodMap.put(sample.getKey(), new PerReadAlleleLikelihoodMap()); } final ReadBackedPileup pileup = context.getBasePileup(); if (pileup != null) { diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java similarity index 99% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java index c10f7264e..80a787fe0 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/SNPGenotypeLikelihoodsCalculationModel.java @@ -55,7 +55,7 @@ public class SNPGenotypeLikelihoodsCalculationModel extends GenotypeLikelihoodsC protected SNPGenotypeLikelihoodsCalculationModel(UnifiedArgumentCollection UAC, Logger logger) { super(UAC, logger); useAlleleFromVCF = UAC.GenotypingMode == GENOTYPING_MODE.GENOTYPE_GIVEN_ALLELES; - perReadAlleleLikelihoodMap = PerReadAlleleLikelihoodMap.getBestAvailablePerReadAlleleLikelihoodMap(); + perReadAlleleLikelihoodMap = new PerReadAlleleLikelihoodMap(); } public VariantContext getLikelihoods(final RefMetaDataTracker tracker, diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java similarity index 94% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java index b5386ff6b..3dc0c3b71 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java @@ -28,7 +28,6 @@ package org.broadinstitute.sting.gatk.walkers.genotyper; import org.broadinstitute.sting.commandline.*; import org.broadinstitute.sting.gatk.CommandLineGATK; import org.broadinstitute.sting.gatk.arguments.DbsnpArgumentCollection; -import org.broadinstitute.sting.gatk.arguments.StandardCallerArgumentCollection; import org.broadinstitute.sting.gatk.contexts.AlignmentContext; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; import org.broadinstitute.sting.gatk.downsampling.DownsampleType; @@ -41,7 +40,6 @@ import org.broadinstitute.sting.gatk.walkers.annotator.VariantAnnotatorEngine; import org.broadinstitute.sting.gatk.walkers.annotator.interfaces.AnnotatorCompatible; import org.broadinstitute.sting.utils.SampleUtils; import org.broadinstitute.sting.utils.baq.BAQ; -import org.broadinstitute.sting.utils.classloader.GATKLiteUtils; import org.broadinstitute.sting.utils.variant.GATKVariantContextUtils; import org.broadinstitute.variant.vcf.*; import org.broadinstitute.sting.utils.exceptions.UserException; @@ -230,25 +228,6 @@ public class UnifiedGenotyper extends LocusWalker, Unif **/ public void initialize() { - // Check for protected modes - if (GATKLiteUtils.isGATKLite()) { - // no polyploid/pooled mode in GATK Like - if (UAC.samplePloidy != GATKVariantContextUtils.DEFAULT_PLOIDY || - UAC.referenceSampleName != null || - UAC.referenceSampleRod.isBound()) { - throw new UserException.NotSupportedInGATKLite("you cannot enable usage of ploidy values other than 2"); - } - - if ( UAC.CONTAMINATION_FRACTION > 0.0 ) { - if ( UAC.CONTAMINATION_FRACTION == StandardCallerArgumentCollection.DEFAULT_CONTAMINATION_FRACTION ) { - UAC.CONTAMINATION_FRACTION = 0.0; - logger.warn("setting contamination down-sampling fraction to 0.0 because it is not enabled in GATK-lite"); - } else { - throw new UserException.NotSupportedInGATKLite("you cannot enable usage of contamination down-sampling"); - } - } - } - if ( UAC.TREAT_ALL_READS_AS_SINGLE_POOL ) { samples.add(GenotypeLikelihoodsCalculationModel.DUMMY_SAMPLE_NAME); } else { diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/VariantCallContext.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/VariantCallContext.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/VariantCallContext.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/VariantCallContext.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalc.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalc.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalc.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalc.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalcFactory.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalcFactory.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalcFactory.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalcFactory.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalcResult.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalcResult.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalcResult.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/AFCalcResult.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/DiploidExactAFCalc.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/DiploidExactAFCalc.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/DiploidExactAFCalc.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/DiploidExactAFCalc.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactACcounts.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactACcounts.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactACcounts.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactACcounts.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactACset.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactACset.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactACset.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactACset.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactAFCalc.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactAFCalc.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactAFCalc.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactAFCalc.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactCallLogger.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactCallLogger.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactCallLogger.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ExactCallLogger.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/IndependentAllelesDiploidExactAFCalc.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/IndependentAllelesDiploidExactAFCalc.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/IndependentAllelesDiploidExactAFCalc.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/IndependentAllelesDiploidExactAFCalc.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/OriginalDiploidExactAFCalc.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/OriginalDiploidExactAFCalc.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/OriginalDiploidExactAFCalc.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/OriginalDiploidExactAFCalc.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ReferenceDiploidExactAFCalc.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ReferenceDiploidExactAFCalc.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ReferenceDiploidExactAFCalc.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/ReferenceDiploidExactAFCalc.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/StateTracker.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/StateTracker.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/StateTracker.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/afcalc/StateTracker.java diff --git a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/GenotypingEngine.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/GenotypingEngine.java index 8b7b0b918..0c7e43525 100644 --- a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/GenotypingEngine.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/GenotypingEngine.java @@ -223,7 +223,7 @@ public class GenotypingEngine { final Map returnMap = new HashMap(); final GenomeLoc callLoc = parser.createGenomeLoc(call); for( final Map.Entry sample : perSampleReadMap.entrySet() ) { - final PerReadAlleleLikelihoodMap likelihoodMap = PerReadAlleleLikelihoodMap.getBestAvailablePerReadAlleleLikelihoodMap(); + final PerReadAlleleLikelihoodMap likelihoodMap = new PerReadAlleleLikelihoodMap(); for( final Map.Entry> mapEntry : sample.getValue().getLikelihoodReadMap().entrySet() ) { // only count the read if it overlaps the event, otherwise it is not added to the output read list at all @@ -277,7 +277,7 @@ public class GenotypingEngine { final Map alleleReadMap = new HashMap(); for( final Map.Entry haplotypeReadMapEntry : haplotypeReadMap.entrySet() ) { // for each sample - final PerReadAlleleLikelihoodMap perReadAlleleLikelihoodMap = PerReadAlleleLikelihoodMap.getBestAvailablePerReadAlleleLikelihoodMap(); + final PerReadAlleleLikelihoodMap perReadAlleleLikelihoodMap = new PerReadAlleleLikelihoodMap(); for( final Map.Entry> alleleMapperEntry : alleleMapper.entrySet() ) { // for each output allele final List mappedHaplotypes = alleleMapperEntry.getValue(); for( final Map.Entry> readEntry : haplotypeReadMapEntry.getValue().getLikelihoodReadMap().entrySet() ) { // for each read diff --git a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/LikelihoodCalculationEngine.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/LikelihoodCalculationEngine.java index 1be484075..8e90285d9 100644 --- a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/LikelihoodCalculationEngine.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/LikelihoodCalculationEngine.java @@ -104,7 +104,7 @@ public class LikelihoodCalculationEngine { private PerReadAlleleLikelihoodMap computeReadLikelihoods( final ArrayList haplotypes, final ArrayList reads) { - final PerReadAlleleLikelihoodMap perReadAlleleLikelihoodMap = PerReadAlleleLikelihoodMap.getBestAvailablePerReadAlleleLikelihoodMap(); + final PerReadAlleleLikelihoodMap perReadAlleleLikelihoodMap = new PerReadAlleleLikelihoodMap(); final int numHaplotypes = haplotypes.size(); for( final GATKSAMRecord read : reads ) { final byte[] overallGCP = new byte[read.getReadLength()]; diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/ConstrainedMateFixingManager.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/indels/ConstrainedMateFixingManager.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/indels/ConstrainedMateFixingManager.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/indels/ConstrainedMateFixingManager.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/HaplotypeIndelErrorModel.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/indels/HaplotypeIndelErrorModel.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/indels/HaplotypeIndelErrorModel.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/indels/HaplotypeIndelErrorModel.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/LeftAlignIndels.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/indels/LeftAlignIndels.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/indels/LeftAlignIndels.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/indels/LeftAlignIndels.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/PairHMMIndelErrorModel.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/indels/PairHMMIndelErrorModel.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/indels/PairHMMIndelErrorModel.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/indels/PairHMMIndelErrorModel.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/RealignerTargetCreator.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/indels/RealignerTargetCreator.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/indels/RealignerTargetCreator.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/indels/RealignerTargetCreator.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/AllelePair.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/AllelePair.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/AllelePair.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/AllelePair.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/BaseArray.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/BaseArray.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/BaseArray.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/BaseArray.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/CardinalityCounter.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/CardinalityCounter.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/CardinalityCounter.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/CardinalityCounter.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/CloneableIteratorLinkedList.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/CloneableIteratorLinkedList.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/CloneableIteratorLinkedList.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/CloneableIteratorLinkedList.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/DisjointSet.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/DisjointSet.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/DisjointSet.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/DisjointSet.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/Haplotype.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/Haplotype.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/Haplotype.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/Haplotype.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/MergeSegregatingAlternateAllelesVCFWriter.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/MergeSegregatingAlternateAllelesVCFWriter.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/MergeSegregatingAlternateAllelesVCFWriter.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/MergeSegregatingAlternateAllelesVCFWriter.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhaseByTransmission.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhaseByTransmission.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhaseByTransmission.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhaseByTransmission.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingGraph.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingGraph.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingGraph.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingGraph.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingGraphEdge.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingGraphEdge.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingGraphEdge.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingGraphEdge.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingRead.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingRead.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingRead.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingRead.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingUtils.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingUtils.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingUtils.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PhasingUtils.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PreciseNonNegativeDouble.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PreciseNonNegativeDouble.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PreciseNonNegativeDouble.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/PreciseNonNegativeDouble.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBackedPhasing.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBackedPhasing.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBackedPhasing.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBackedPhasing.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBase.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBase.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBase.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBase.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBasesAtPosition.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBasesAtPosition.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBasesAtPosition.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBasesAtPosition.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/SNPallelePair.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/SNPallelePair.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/SNPallelePair.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/phasing/SNPallelePair.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/validation/GenotypeAndValidate.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/GenotypeAndValidate.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/validation/GenotypeAndValidate.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/GenotypeAndValidate.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/validation/ValidationAmplicons.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/ValidationAmplicons.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/validation/ValidationAmplicons.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/ValidationAmplicons.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/FrequencyModeSelector.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/FrequencyModeSelector.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/FrequencyModeSelector.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/FrequencyModeSelector.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/GLBasedSampleSelector.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/GLBasedSampleSelector.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/GLBasedSampleSelector.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/GLBasedSampleSelector.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/GTBasedSampleSelector.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/GTBasedSampleSelector.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/GTBasedSampleSelector.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/GTBasedSampleSelector.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/GenomeEvent.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/GenomeEvent.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/GenomeEvent.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/GenomeEvent.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/KeepAFSpectrumFrequencySelector.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/KeepAFSpectrumFrequencySelector.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/KeepAFSpectrumFrequencySelector.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/KeepAFSpectrumFrequencySelector.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/NullSampleSelector.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/NullSampleSelector.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/NullSampleSelector.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/NullSampleSelector.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/SampleSelector.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/SampleSelector.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/SampleSelector.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/SampleSelector.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/UniformSamplingFrequencySelector.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/UniformSamplingFrequencySelector.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/UniformSamplingFrequencySelector.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/UniformSamplingFrequencySelector.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/ValidationSiteSelector.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/ValidationSiteSelector.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/ValidationSiteSelector.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/validation/validationsiteselector/ValidationSiteSelector.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEval.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEval.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEval.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEval.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalReportWriter.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalReportWriter.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalReportWriter.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantEvalReportWriter.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/CompOverlap.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/CompOverlap.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/CompOverlap.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/CompOverlap.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/CountVariants.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/CountVariants.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/CountVariants.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/CountVariants.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/GenotypeConcordance.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/GenotypeConcordance.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/GenotypeConcordance.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/GenotypeConcordance.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/IndelLengthHistogram.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/IndelLengthHistogram.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/IndelLengthHistogram.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/IndelLengthHistogram.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/IndelSummary.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/IndelSummary.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/IndelSummary.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/IndelSummary.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/MendelianViolationEvaluator.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/MendelianViolationEvaluator.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/MendelianViolationEvaluator.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/MendelianViolationEvaluator.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/MultiallelicSummary.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/MultiallelicSummary.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/MultiallelicSummary.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/MultiallelicSummary.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/PrintMissingComp.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/PrintMissingComp.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/PrintMissingComp.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/PrintMissingComp.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/StandardEval.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/StandardEval.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/StandardEval.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/StandardEval.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/ThetaVariantEvaluator.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/ThetaVariantEvaluator.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/ThetaVariantEvaluator.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/ThetaVariantEvaluator.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/TiTvVariantEvaluator.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/TiTvVariantEvaluator.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/TiTvVariantEvaluator.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/TiTvVariantEvaluator.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/ValidationReport.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/ValidationReport.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/ValidationReport.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/ValidationReport.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/VariantEvaluator.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/VariantEvaluator.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/VariantEvaluator.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/VariantEvaluator.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/VariantSummary.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/VariantSummary.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/VariantSummary.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/VariantSummary.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/genotypePhasingEvaluator/GenotypePhasingEvaluator.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/genotypePhasingEvaluator/GenotypePhasingEvaluator.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/genotypePhasingEvaluator/GenotypePhasingEvaluator.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/genotypePhasingEvaluator/GenotypePhasingEvaluator.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/genotypePhasingEvaluator/SamplePhasingStatistics.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/genotypePhasingEvaluator/SamplePhasingStatistics.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/genotypePhasingEvaluator/SamplePhasingStatistics.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/evaluators/genotypePhasingEvaluator/SamplePhasingStatistics.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/AlleleCount.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/AlleleCount.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/AlleleCount.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/AlleleCount.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/AlleleFrequency.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/AlleleFrequency.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/AlleleFrequency.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/AlleleFrequency.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/CompRod.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/CompRod.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/CompRod.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/CompRod.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Contig.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Contig.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Contig.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Contig.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/CpG.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/CpG.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/CpG.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/CpG.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Degeneracy.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Degeneracy.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Degeneracy.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Degeneracy.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/DynamicStratification.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/DynamicStratification.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/DynamicStratification.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/DynamicStratification.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/EvalRod.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/EvalRod.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/EvalRod.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/EvalRod.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Filter.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Filter.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Filter.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Filter.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/FunctionalClass.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/FunctionalClass.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/FunctionalClass.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/FunctionalClass.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/IndelSize.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/IndelSize.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/IndelSize.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/IndelSize.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/IntervalStratification.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/IntervalStratification.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/IntervalStratification.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/IntervalStratification.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/JexlExpression.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/JexlExpression.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/JexlExpression.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/JexlExpression.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Novelty.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Novelty.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Novelty.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Novelty.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/OneBPIndel.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/OneBPIndel.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/OneBPIndel.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/OneBPIndel.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/RequiredStratification.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/RequiredStratification.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/RequiredStratification.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/RequiredStratification.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Sample.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Sample.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Sample.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/Sample.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/StandardStratification.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/StandardStratification.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/StandardStratification.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/StandardStratification.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/TandemRepeat.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/TandemRepeat.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/TandemRepeat.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/TandemRepeat.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/VariantStratifier.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/VariantStratifier.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/VariantStratifier.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/VariantStratifier.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/VariantType.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/VariantType.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/VariantType.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/VariantType.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/StratNode.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/StratNode.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/StratNode.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/StratNode.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/StratNodeIterator.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/StratNodeIterator.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/StratNodeIterator.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/StratNodeIterator.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/StratificationManager.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/StratificationManager.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/StratificationManager.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/StratificationManager.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/Stratifier.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/Stratifier.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/Stratifier.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/stratifications/manager/Stratifier.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/Analysis.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/Analysis.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/Analysis.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/Analysis.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/AnalysisModuleScanner.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/AnalysisModuleScanner.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/AnalysisModuleScanner.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/AnalysisModuleScanner.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/DataPoint.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/DataPoint.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/DataPoint.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/DataPoint.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/EvaluationContext.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/EvaluationContext.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/EvaluationContext.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/EvaluationContext.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/Molten.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/Molten.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/Molten.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/Molten.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/SortableJexlVCMatchExp.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/SortableJexlVCMatchExp.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/SortableJexlVCMatchExp.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/SortableJexlVCMatchExp.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/VariantEvalUtils.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/VariantEvalUtils.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/VariantEvalUtils.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/util/VariantEvalUtils.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/ApplyRecalibration.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/ApplyRecalibration.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/ApplyRecalibration.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/ApplyRecalibration.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/GaussianMixtureModel.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/GaussianMixtureModel.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/GaussianMixtureModel.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/GaussianMixtureModel.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/MultivariateGaussian.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/MultivariateGaussian.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/MultivariateGaussian.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/MultivariateGaussian.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/TrainingSet.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/TrainingSet.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/TrainingSet.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/TrainingSet.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/Tranche.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/Tranche.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/Tranche.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/Tranche.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/TrancheManager.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/TrancheManager.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/TrancheManager.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/TrancheManager.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VQSRCalibrationCurve.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VQSRCalibrationCurve.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VQSRCalibrationCurve.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VQSRCalibrationCurve.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantDataManager.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantDataManager.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantDataManager.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantDataManager.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantDatum.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantDatum.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantDatum.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantDatum.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibrator.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibrator.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibrator.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibrator.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibratorArgumentCollection.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibratorArgumentCollection.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibratorArgumentCollection.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibratorArgumentCollection.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibratorEngine.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibratorEngine.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibratorEngine.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantrecalibration/VariantRecalibratorEngine.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/CombineVariants.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/CombineVariants.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/CombineVariants.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/CombineVariants.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/FilterLiftedVariants.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/FilterLiftedVariants.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/FilterLiftedVariants.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/FilterLiftedVariants.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/LeftAlignVariants.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/LeftAlignVariants.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/LeftAlignVariants.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/LeftAlignVariants.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariants.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariants.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariants.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariants.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/RandomlySplitVariants.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/RandomlySplitVariants.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/RandomlySplitVariants.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/RandomlySplitVariants.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/SelectHeaders.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/SelectHeaders.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/SelectHeaders.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/SelectHeaders.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/SelectVariants.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/SelectVariants.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/SelectVariants.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/SelectVariants.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/ValidateVariants.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/ValidateVariants.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/ValidateVariants.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/ValidateVariants.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantValidationAssessor.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantValidationAssessor.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantValidationAssessor.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantValidationAssessor.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToBinaryPed.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToBinaryPed.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToBinaryPed.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToBinaryPed.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToTable.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToTable.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToTable.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToTable.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToVCF.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToVCF.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToVCF.java rename to protected/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/VariantsToVCF.java diff --git a/protected/java/src/org/broadinstitute/sting/utils/genotyper/AdvancedPerReadAlleleLikelihoodMap.java b/protected/java/src/org/broadinstitute/sting/utils/genotyper/AdvancedPerReadAlleleLikelihoodMap.java deleted file mode 100644 index 4a13fb615..000000000 --- a/protected/java/src/org/broadinstitute/sting/utils/genotyper/AdvancedPerReadAlleleLikelihoodMap.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.utils.genotyper; - - -import org.broadinstitute.sting.gatk.downsampling.AlleleBiasedDownsamplingUtils; -import org.broadinstitute.sting.utils.classloader.ProtectedPackageSource; -import org.broadinstitute.sting.utils.pileup.ReadBackedPileup; -import org.broadinstitute.sting.utils.sam.GATKSAMRecord; -import org.broadinstitute.variant.variantcontext.Allele; - -import java.io.PrintStream; -import java.util.*; - -public class AdvancedPerReadAlleleLikelihoodMap extends StandardPerReadAlleleLikelihoodMap implements ProtectedPackageSource { - - public ReadBackedPileup createPerAlleleDownsampledBasePileup(final ReadBackedPileup pileup, final double downsamplingFraction, final PrintStream log) { - return AlleleBiasedDownsamplingUtils.createAlleleBiasedBasePileup(pileup, downsamplingFraction, log); - } - - public void performPerAlleleDownsampling(final double downsamplingFraction, final PrintStream log) { - // special case removal of all or no reads - if ( downsamplingFraction <= 0.0 ) - return; - if ( downsamplingFraction >= 1.0 ) { - likelihoodReadMap.clear(); - return; - } - - // start by stratifying the reads by the alleles they represent at this position - final Map> alleleReadMap = new HashMap>(alleles.size()); - for ( Allele allele : alleles ) - alleleReadMap.put(allele, new ArrayList()); - - for ( Map.Entry> entry : likelihoodReadMap.entrySet() ) { - // do not remove reduced reads! - if ( !entry.getKey().isReducedRead() ) { - final Allele bestAllele = getMostLikelyAllele(entry.getValue()); - if ( bestAllele != Allele.NO_CALL ) - alleleReadMap.get(bestAllele).add(entry.getKey()); - } - } - - // compute the reads to remove and actually remove them - final List readsToRemove = AlleleBiasedDownsamplingUtils.selectAlleleBiasedReads(alleleReadMap, downsamplingFraction, log); - for ( final GATKSAMRecord read : readsToRemove ) - likelihoodReadMap.remove(read); - } -} diff --git a/public/java/src/org/broadinstitute/sting/utils/genotyper/PerReadAlleleLikelihoodMap.java b/protected/java/src/org/broadinstitute/sting/utils/genotyper/PerReadAlleleLikelihoodMap.java similarity index 69% rename from public/java/src/org/broadinstitute/sting/utils/genotyper/PerReadAlleleLikelihoodMap.java rename to protected/java/src/org/broadinstitute/sting/utils/genotyper/PerReadAlleleLikelihoodMap.java index ff85c33a0..5dcd5eb6c 100644 --- a/public/java/src/org/broadinstitute/sting/utils/genotyper/PerReadAlleleLikelihoodMap.java +++ b/protected/java/src/org/broadinstitute/sting/utils/genotyper/PerReadAlleleLikelihoodMap.java @@ -25,26 +25,23 @@ package org.broadinstitute.sting.utils.genotyper; -import org.broadinstitute.sting.utils.classloader.GATKLiteUtils; -import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; +import org.broadinstitute.sting.gatk.downsampling.AlleleBiasedDownsamplingUtils; import org.broadinstitute.sting.utils.pileup.PileupElement; import org.broadinstitute.sting.utils.pileup.ReadBackedPileup; import org.broadinstitute.sting.utils.sam.GATKSAMRecord; import org.broadinstitute.variant.variantcontext.Allele; import java.io.PrintStream; -import java.lang.reflect.Constructor; import java.util.*; -public abstract class PerReadAlleleLikelihoodMap { +public class PerReadAlleleLikelihoodMap { public static final double INFORMATIVE_LIKELIHOOD_THRESHOLD = 0.2; protected List alleles; protected Map> likelihoodReadMap; - public abstract void performPerAlleleDownsampling(final double downsamplingFraction, final PrintStream log); - public abstract ReadBackedPileup createPerAlleleDownsampledBasePileup(final ReadBackedPileup pileup, final double downsamplingFraction, final PrintStream log); + public PerReadAlleleLikelihoodMap() {} public void add(GATKSAMRecord read, Allele a, Double likelihood) { Map likelihoodMap; @@ -63,6 +60,39 @@ public abstract class PerReadAlleleLikelihoodMap { } + public ReadBackedPileup createPerAlleleDownsampledBasePileup(final ReadBackedPileup pileup, final double downsamplingFraction, final PrintStream log) { + return AlleleBiasedDownsamplingUtils.createAlleleBiasedBasePileup(pileup, downsamplingFraction, log); + } + + public void performPerAlleleDownsampling(final double downsamplingFraction, final PrintStream log) { + // special case removal of all or no reads + if ( downsamplingFraction <= 0.0 ) + return; + if ( downsamplingFraction >= 1.0 ) { + likelihoodReadMap.clear(); + return; + } + + // start by stratifying the reads by the alleles they represent at this position + final Map> alleleReadMap = new HashMap>(alleles.size()); + for ( Allele allele : alleles ) + alleleReadMap.put(allele, new ArrayList()); + + for ( Map.Entry> entry : likelihoodReadMap.entrySet() ) { + // do not remove reduced reads! + if ( !entry.getKey().isReducedRead() ) { + final Allele bestAllele = getMostLikelyAllele(entry.getValue()); + if ( bestAllele != Allele.NO_CALL ) + alleleReadMap.get(bestAllele).add(entry.getKey()); + } + } + + // compute the reads to remove and actually remove them + final List readsToRemove = AlleleBiasedDownsamplingUtils.selectAlleleBiasedReads(alleleReadMap, downsamplingFraction, log); + for ( final GATKSAMRecord read : readsToRemove ) + likelihoodReadMap.remove(read); + } + public int size() { return likelihoodReadMap.size(); } @@ -122,16 +152,4 @@ public abstract class PerReadAlleleLikelihoodMap { } return (maxLike - prevMaxLike > INFORMATIVE_LIKELIHOOD_THRESHOLD ? mostLikelyAllele : Allele.NO_CALL ); } - - public static PerReadAlleleLikelihoodMap getBestAvailablePerReadAlleleLikelihoodMap() { - final Class PerReadAlleleLikelihoodMapClass = GATKLiteUtils.getProtectedClassIfAvailable(PerReadAlleleLikelihoodMap.class); - try { - final Constructor constructor = PerReadAlleleLikelihoodMapClass.getDeclaredConstructor((Class[])null); - constructor.setAccessible(true); - return (PerReadAlleleLikelihoodMap)constructor.newInstance(); - } - catch (Exception e) { - throw new ReviewedStingException("Unable to create RecalibrationEngine class instance " + PerReadAlleleLikelihoodMapClass.getSimpleName()); - } - } } diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/BQSRMode.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/BQSRMode.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/BQSRMode.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/BQSRMode.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/BQSRReadTransformer.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/BQSRReadTransformer.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/BQSRReadTransformer.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/BQSRReadTransformer.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/BaseRecalibration.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/BaseRecalibration.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/BaseRecalibration.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/BaseRecalibration.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/EventType.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/EventType.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/EventType.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/EventType.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/QualQuantizer.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/QualQuantizer.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/QualQuantizer.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/QualQuantizer.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/QuantizationInfo.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/QuantizationInfo.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/QuantizationInfo.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/QuantizationInfo.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/ReadCovariates.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/ReadCovariates.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/ReadCovariates.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/ReadCovariates.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/RecalDatum.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/RecalDatum.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/RecalDatum.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/RecalDatum.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/RecalDatumNode.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/RecalDatumNode.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/RecalDatumNode.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/RecalDatumNode.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/RecalUtils.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/RecalUtils.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/RecalUtils.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/RecalUtils.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/RecalibrationReport.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/RecalibrationReport.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/RecalibrationReport.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/RecalibrationReport.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/RecalibrationTables.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/RecalibrationTables.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/RecalibrationTables.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/RecalibrationTables.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/ContextCovariate.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/ContextCovariate.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/ContextCovariate.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/ContextCovariate.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/Covariate.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/Covariate.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/Covariate.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/Covariate.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/CycleCovariate.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/CycleCovariate.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/CycleCovariate.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/CycleCovariate.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/ExperimentalCovariate.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/ExperimentalCovariate.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/ExperimentalCovariate.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/ExperimentalCovariate.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/QualityScoreCovariate.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/QualityScoreCovariate.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/QualityScoreCovariate.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/QualityScoreCovariate.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/ReadGroupCovariate.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/ReadGroupCovariate.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/ReadGroupCovariate.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/ReadGroupCovariate.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/RepeatLengthCovariate.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/RepeatLengthCovariate.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/RepeatLengthCovariate.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/RepeatLengthCovariate.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/RequiredCovariate.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/RequiredCovariate.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/RequiredCovariate.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/RequiredCovariate.java diff --git a/public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/StandardCovariate.java b/protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/StandardCovariate.java similarity index 100% rename from public/java/src/org/broadinstitute/sting/utils/recalibration/covariates/StandardCovariate.java rename to protected/java/src/org/broadinstitute/sting/utils/recalibration/covariates/StandardCovariate.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java b/public/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java index 1187039bb..54907f9f2 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java +++ b/public/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java @@ -53,7 +53,6 @@ import org.broadinstitute.sting.gatk.samples.SampleDB; import org.broadinstitute.sting.gatk.samples.SampleDBBuilder; import org.broadinstitute.sting.gatk.walkers.*; import org.broadinstitute.sting.utils.*; -import org.broadinstitute.sting.utils.classloader.GATKLiteUtils; import org.broadinstitute.sting.utils.classloader.PluginManager; import org.broadinstitute.sting.utils.collections.Pair; import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; @@ -217,13 +216,6 @@ public class GenomeAnalysisEngine { baseRecalibration = new BaseRecalibration(recalFile, quantizationLevels, disableIndelQuals, preserveQLessThan, emitOriginalQuals); } - /** - * Utility method to determine whether this is the lite version of the GATK - */ - public boolean isGATKLite() { - return GATKLiteUtils.isGATKLite(); - } - /** * Actually run the GATK with the specified walker. * @@ -330,10 +322,7 @@ public class GenomeAnalysisEngine { try { return walkerManager.createByName(walkerName); } catch ( UserException e ) { - if ( isGATKLite() && GATKLiteUtils.isAvailableOnlyInFullGATK(walkerName) ) { - e = new UserException.NotSupportedInGATKLite("the " + walkerName + " walker is available only in the full version of the GATK"); - } - else if ( isDeprecatedWalker(walkerName) ) { + if ( isDeprecatedWalker(walkerName) ) { e = new UserException.DeprecatedWalker(walkerName, getDeprecatedMajorVersionNumber(walkerName)); } throw e; diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/BQSRGatherer.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/BQSRGatherer.java deleted file mode 100755 index dbb628135..000000000 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/BQSRGatherer.java +++ /dev/null @@ -1,86 +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.bqsr; - -import org.broadinstitute.sting.commandline.Gatherer; -import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; -import org.broadinstitute.sting.utils.exceptions.UserException; -import org.broadinstitute.sting.utils.recalibration.RecalUtils; -import org.broadinstitute.sting.utils.recalibration.RecalibrationReport; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.PrintStream; -import java.util.List; - -/** - * User: carneiro - * Date: 3/29/11 - */ - - -public class BQSRGatherer extends Gatherer { - - private static final String EMPTY_INPUT_LIST = "list of inputs files is empty"; - private static final String MISSING_OUTPUT_FILE = "missing output file name"; - - @Override - public void gather(List inputs, File output) { - final PrintStream outputFile; - try { - outputFile = new PrintStream(output); - } catch(FileNotFoundException e) { - throw new UserException.MissingArgument("output", MISSING_OUTPUT_FILE); - } - - RecalibrationReport generalReport = null; - for (File input : inputs) { - final RecalibrationReport inputReport = new RecalibrationReport(input); - if (generalReport == null) - generalReport = inputReport; - else - generalReport.combine(inputReport); - } - if (generalReport == null) - throw new ReviewedStingException(EMPTY_INPUT_LIST); - - generalReport.calculateQuantizedQualities(); - - RecalibrationArgumentCollection RAC = generalReport.getRAC(); - if ( RAC.RECAL_PDF_FILE != null ) { - RAC.RECAL_TABLE_FILE = output; - if ( RAC.existingRecalibrationReport != null ) { - final RecalibrationReport originalReport = new RecalibrationReport(RAC.existingRecalibrationReport); - RecalUtils.generateRecalibrationPlot(RAC, originalReport.getRecalibrationTables(), generalReport.getRecalibrationTables(), generalReport.getCovariates()); - } - else { - RecalUtils.generateRecalibrationPlot(RAC, generalReport.getRecalibrationTables(), generalReport.getCovariates()); - } - } - - generalReport.output(outputFile); - } -} diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/BaseRecalibrator.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/BaseRecalibrator.java deleted file mode 100755 index 2c774d94d..000000000 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/BaseRecalibrator.java +++ /dev/null @@ -1,534 +0,0 @@ -/* - * Copyright (c) 2010 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.bqsr; - -import net.sf.picard.reference.IndexedFastaSequenceFile; -import net.sf.samtools.CigarElement; -import net.sf.samtools.SAMFileHeader; -import org.broad.tribble.Feature; -import org.broadinstitute.sting.commandline.Advanced; -import org.broadinstitute.sting.commandline.Argument; -import org.broadinstitute.sting.commandline.ArgumentCollection; -import org.broadinstitute.sting.gatk.CommandLineGATK; -import org.broadinstitute.sting.gatk.contexts.ReferenceContext; -import org.broadinstitute.sting.gatk.filters.*; -import org.broadinstitute.sting.gatk.iterators.ReadTransformer; -import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; -import org.broadinstitute.sting.gatk.walkers.*; -import org.broadinstitute.sting.utils.MathUtils; -import org.broadinstitute.variant.utils.BaseUtils; -import org.broadinstitute.sting.utils.baq.BAQ; -import org.broadinstitute.sting.utils.classloader.GATKLiteUtils; -import org.broadinstitute.sting.utils.clipping.ReadClipper; -import org.broadinstitute.sting.utils.collections.Pair; -import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; -import org.broadinstitute.sting.utils.exceptions.UserException; -import org.broadinstitute.sting.utils.help.DocumentedGATKFeature; -import org.broadinstitute.sting.utils.recalibration.*; -import org.broadinstitute.sting.utils.recalibration.covariates.Covariate; -import org.broadinstitute.sting.utils.sam.GATKSAMRecord; -import org.broadinstitute.sting.utils.sam.ReadUtils; - -import java.io.File; -import java.io.IOException; -import java.io.PrintStream; -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * First pass of the base quality score recalibration -- Generates recalibration table based on various user-specified covariates (such as read group, reported quality score, machine cycle, and nucleotide context). - * - *

- * This walker is designed to work as the first pass in a two-pass processing step. It does a by-locus traversal operating - * only at sites that are not in dbSNP. We assume that all reference mismatches we see are therefore errors and indicative - * of poor base quality. This walker generates tables based on various user-specified covariates (such as read group, - * reported quality score, cycle, and context). Since there is a large amount of data one can then calculate an empirical - * probability of error given the particular covariates seen at this site, where p(error) = num mismatches / num observations. - * The output file is a table (of the several covariate values, num observations, num mismatches, empirical quality score). - *

- * Note: ReadGroupCovariate and QualityScoreCovariate are required covariates and will be added for the user regardless of whether or not they were specified. - * - *

- * - *

Input

- *

- * The input read data whose base quality scores need to be assessed. - *

- * A database of known polymorphic sites to skip over. - *

- * - *

Output

- *

- * A GATK Report file with many tables: - *

    - *
  1. The list of arguments
  2. - *
  3. The quantized qualities table
  4. - *
  5. The recalibration table by read group
  6. - *
  7. The recalibration table by quality score
  8. - *
  9. The recalibration table for all the optional covariates
  10. - *
- * - * The GATK Report is intended to be easy to read by humans or computers. Check out the documentation of the GATKReport to learn how to manipulate this table. - *

- * - *

Examples

- *
- * java -Xmx4g -jar GenomeAnalysisTK.jar \
- *   -T BaseRecalibrator \
- *   -I my_reads.bam \
- *   -R resources/Homo_sapiens_assembly18.fasta \
- *   -knownSites bundle/hg18/dbsnp_132.hg18.vcf \
- *   -knownSites another/optional/setOfSitesToMask.vcf \
- *   -o recal_data.grp
- * 
- */ - -@DocumentedGATKFeature(groupName = "BAM Processing and Analysis Tools", extraDocs = {CommandLineGATK.class}) -@BAQMode(ApplicationTime = ReadTransformer.ApplicationTime.FORBIDDEN) -@ReadFilters({MappingQualityZeroFilter.class, MappingQualityUnavailableFilter.class, UnmappedReadFilter.class, NotPrimaryAlignmentFilter.class, DuplicateReadFilter.class, FailsVendorQualityCheckFilter.class}) -@PartitionBy(PartitionType.READ) -public class BaseRecalibrator extends ReadWalker implements NanoSchedulable { - /** - * all the command line arguments for BQSR and it's covariates - */ - @ArgumentCollection - private final RecalibrationArgumentCollection RAC = new RecalibrationArgumentCollection(); - - /** - * When you have nct > 1, BQSR uses nct times more memory to compute its recalibration tables, for efficiency - * purposes. If you have many covariates, and therefore are using a lot of memory, you can use this flag - * to safely access only one table. There may be some CPU cost, but as long as the table is really big - * there should be relatively little CPU costs. - */ - @Argument(fullName = "lowMemoryMode", shortName="lowMemoryMode", doc="Reduce memory usage in multi-threaded code at the expense of threading efficiency", required = false) - public boolean lowMemoryMode = false; - - @Advanced - @Argument(fullName = "bqsrBAQGapOpenPenalty", shortName="bqsrBAQGOP", doc="BQSR BAQ gap open penalty (Phred Scaled). Default value is 40. 30 is perhaps better for whole genome call sets", required = false) - public double BAQGOP = BAQ.DEFAULT_GOP; - - /** - * an object that keeps track of the information necessary for quality score quantization - */ - private QuantizationInfo quantizationInfo; - - /** - * list to hold the all the covariate objects that were requested (required + standard + experimental) - */ - private Covariate[] requestedCovariates; - - private RecalibrationEngine recalibrationEngine; - - private int minimumQToUse; - - private static final String NO_DBSNP_EXCEPTION = "This calculation is critically dependent on being able to skip over known variant sites. Please provide a VCF file containing known sites of genetic variation."; - - private BAQ baq; // BAQ the reads on the fly to generate the alignment uncertainty vector - private IndexedFastaSequenceFile referenceReader; // fasta reference reader for use with BAQ calculation - private final static byte NO_BAQ_UNCERTAINTY = (byte)'@'; - - /** - * Parse the -cov arguments and create a list of covariates to be used here - * Based on the covariates' estimates for initial capacity allocate the data hashmap - */ - public void initialize() { - baq = new BAQ(BAQGOP); // setup the BAQ object with the provided gap open penalty - - // check for unsupported access - if (getToolkit().isGATKLite() && !getToolkit().getArguments().disableIndelQuals) - throw new UserException.NotSupportedInGATKLite("base insertion/deletion recalibration is not supported, please use the --disable_indel_quals argument"); - - if (RAC.FORCE_PLATFORM != null) - RAC.DEFAULT_PLATFORM = RAC.FORCE_PLATFORM; - - if (RAC.knownSites.isEmpty() && !RAC.RUN_WITHOUT_DBSNP) // Warn the user if no dbSNP file or other variant mask was specified - throw new UserException.CommandLineException(NO_DBSNP_EXCEPTION); - - if (RAC.LIST_ONLY) { - RecalUtils.listAvailableCovariates(logger); - System.exit(0); - } - RAC.existingRecalibrationReport = getToolkit().getArguments().BQSR_RECAL_FILE; // if we have a recalibration file, record it so it goes on the report table - - Pair, ArrayList> covariates = RecalUtils.initializeCovariates(RAC); // initialize the required and optional covariates - ArrayList requiredCovariates = covariates.getFirst(); - ArrayList optionalCovariates = covariates.getSecond(); - - requestedCovariates = new Covariate[requiredCovariates.size() + optionalCovariates.size()]; - int covariateIndex = 0; - for (final Covariate covariate : requiredCovariates) - requestedCovariates[covariateIndex++] = covariate; - for (final Covariate covariate : optionalCovariates) - requestedCovariates[covariateIndex++] = covariate; - - logger.info("The covariates being used here: "); - for (Covariate cov : requestedCovariates) { // list all the covariates being used - logger.info("\t" + cov.getClass().getSimpleName()); - cov.initialize(RAC); // initialize any covariate member variables using the shared argument collection - } - - try { - RAC.RECAL_TABLE = new PrintStream(RAC.RECAL_TABLE_FILE); - } catch (IOException e) { - throw new UserException.CouldNotCreateOutputFile(RAC.RECAL_TABLE_FILE, e); - } - - initializeRecalibrationEngine(); - minimumQToUse = getToolkit().getArguments().PRESERVE_QSCORES_LESS_THAN; - referenceReader = getToolkit().getReferenceDataSource().getReference(); - } - - /** - * Initialize the recalibration engine - */ - private void initializeRecalibrationEngine() { - int numReadGroups = 0; - for ( final SAMFileHeader header : getToolkit().getSAMFileHeaders() ) - numReadGroups += header.getReadGroups().size(); - - recalibrationEngine = new RecalibrationEngine(requestedCovariates, numReadGroups, RAC.RECAL_TABLE_UPDATE_LOG, lowMemoryMode); - } - - private boolean isLowQualityBase( final GATKSAMRecord read, final int offset ) { - return read.getBaseQualities()[offset] < minimumQToUse; - } - - /** - * For each read at this locus get the various covariate values and increment that location in the map based on - * whether or not the base matches the reference at this particular location - */ - public Long map( final ReferenceContext ref, final GATKSAMRecord originalRead, final RefMetaDataTracker metaDataTracker ) { - - final GATKSAMRecord read = ReadClipper.hardClipSoftClippedBases( ReadClipper.hardClipAdaptorSequence(originalRead) ); - if( read.isEmpty() ) { return 0L; } // the whole read was inside the adaptor so skip it - - RecalUtils.parsePlatformForRead(read, RAC); - if (!RecalUtils.isColorSpaceConsistent(RAC.SOLID_NOCALL_STRATEGY, read)) { // parse the solid color space and check for color no-calls - return 0L; // skip this read completely - } - - final int[] isSNP = calculateIsSNP(read, ref, originalRead); - final int[] isInsertion = calculateIsIndel(read, EventType.BASE_INSERTION); - final int[] isDeletion = calculateIsIndel(read, EventType.BASE_DELETION); - final int nErrors = nEvents(isSNP, isInsertion, isDeletion); - - // note for efficiency regions we don't compute the BAQ array unless we actually have - // some error to marginalize over. For ILMN data ~85% of reads have no error - final byte[] baqArray = nErrors == 0 ? flatBAQArray(read) : calculateBAQArray(read); - - if( baqArray != null ) { // some reads just can't be BAQ'ed - final ReadCovariates covariates = RecalUtils.computeCovariates(read, requestedCovariates); - final boolean[] skip = calculateSkipArray(read, metaDataTracker); // skip known sites of variation as well as low quality and non-regular bases - final double[] snpErrors = calculateFractionalErrorArray(isSNP, baqArray); - final double[] insertionErrors = calculateFractionalErrorArray(isInsertion, baqArray); - final double[] deletionErrors = calculateFractionalErrorArray(isDeletion, baqArray); - - // aggregate all of the info into our info object, and update the data - final ReadRecalibrationInfo info = new ReadRecalibrationInfo(read, covariates, skip, snpErrors, insertionErrors, deletionErrors); - recalibrationEngine.updateDataForRead(info); - return 1L; - } else { - return 0L; - } - } - - /** - * Compute the number of mutational events across all hasEvent vectors - * - * Simply the sum of entries in hasEvents - * - * @param hasEvents a vector a vectors of 0 (no event) and 1 (has event) - * @return the total number of events across all hasEvent arrays - */ - private int nEvents(final int[]... hasEvents) { - int n = 0; - for ( final int[] hasEvent : hasEvents ) { - n += MathUtils.sum(hasEvent); - } - return n; - } - - protected boolean[] calculateSkipArray( final GATKSAMRecord read, final RefMetaDataTracker metaDataTracker ) { - final byte[] bases = read.getReadBases(); - final boolean[] skip = new boolean[bases.length]; - final boolean[] knownSites = calculateKnownSites(read, metaDataTracker.getValues(RAC.knownSites)); - for( int iii = 0; iii < bases.length; iii++ ) { - skip[iii] = !BaseUtils.isRegularBase(bases[iii]) || isLowQualityBase(read, iii) || knownSites[iii] || badSolidOffset(read, iii); - } - return skip; - } - - protected boolean badSolidOffset( final GATKSAMRecord read, final int offset ) { - return ReadUtils.isSOLiDRead(read) && RAC.SOLID_RECAL_MODE != RecalUtils.SOLID_RECAL_MODE.DO_NOTHING && !RecalUtils.isColorSpaceConsistent(read, offset); - } - - protected boolean[] calculateKnownSites( final GATKSAMRecord read, final List features ) { - final int readLength = read.getReadBases().length; - final boolean[] knownSites = new boolean[readLength]; - Arrays.fill(knownSites, false); - for( final Feature f : features ) { - int featureStartOnRead = ReadUtils.getReadCoordinateForReferenceCoordinate(read.getSoftStart(), read.getCigar(), f.getStart(), ReadUtils.ClippingTail.LEFT_TAIL, true); // BUGBUG: should I use LEFT_TAIL here? - if( featureStartOnRead == ReadUtils.CLIPPING_GOAL_NOT_REACHED ) { - featureStartOnRead = 0; - } - - int featureEndOnRead = ReadUtils.getReadCoordinateForReferenceCoordinate(read.getSoftStart(), read.getCigar(), f.getEnd(), ReadUtils.ClippingTail.LEFT_TAIL, true); - if( featureEndOnRead == ReadUtils.CLIPPING_GOAL_NOT_REACHED ) { - featureEndOnRead = readLength; - } - - if( featureStartOnRead > readLength ) { - featureStartOnRead = featureEndOnRead = readLength; - } - - Arrays.fill(knownSites, Math.max(0, featureStartOnRead), Math.min(readLength, featureEndOnRead + 1), true); - } - return knownSites; - } - - // BUGBUG: can be merged with calculateIsIndel - protected static int[] calculateIsSNP( final GATKSAMRecord read, final ReferenceContext ref, final GATKSAMRecord originalRead ) { - final byte[] readBases = read.getReadBases(); - final byte[] refBases = Arrays.copyOfRange(ref.getBases(), read.getAlignmentStart() - originalRead.getAlignmentStart(), ref.getBases().length + read.getAlignmentEnd() - originalRead.getAlignmentEnd()); - final int[] snp = new int[readBases.length]; - int readPos = 0; - int refPos = 0; - for ( final CigarElement ce : read.getCigar().getCigarElements() ) { - final int elementLength = ce.getLength(); - switch (ce.getOperator()) { - case M: - case EQ: - case X: - for( int iii = 0; iii < elementLength; iii++ ) { - snp[readPos] = ( BaseUtils.basesAreEqual(readBases[readPos], refBases[refPos]) ? 0 : 1 ); - readPos++; - refPos++; - } - break; - case D: - case N: - refPos += elementLength; - break; - case I: - case S: // ReferenceContext doesn't have the soft clipped bases! - readPos += elementLength; - break; - case H: - case P: - break; - default: - throw new ReviewedStingException("Unsupported cigar operator: " + ce.getOperator()); - } - } - return snp; - } - - protected static int[] calculateIsIndel( final GATKSAMRecord read, final EventType mode ) { - final byte[] readBases = read.getReadBases(); - final int[] indel = new int[readBases.length]; - Arrays.fill(indel, 0); - int readPos = 0; - for ( final CigarElement ce : read.getCigar().getCigarElements() ) { - final int elementLength = ce.getLength(); - switch (ce.getOperator()) { - case M: - case EQ: - case X: - case S: - { - readPos += elementLength; - break; - } - case D: - { - final int index = ( read.getReadNegativeStrandFlag() ? readPos : ( readPos > 0 ? readPos - 1 : readPos ) ); - indel[index] = ( mode.equals(EventType.BASE_DELETION) ? 1 : 0 ); - break; - } - case I: - { - final boolean forwardStrandRead = !read.getReadNegativeStrandFlag(); - if( forwardStrandRead ) { - indel[(readPos > 0 ? readPos - 1 : readPos)] = ( mode.equals(EventType.BASE_INSERTION) ? 1 : 0 ); - } - for (int iii = 0; iii < elementLength; iii++) { - readPos++; - } - if( !forwardStrandRead ) { - indel[(readPos < indel.length ? readPos : readPos - 1)] = ( mode.equals(EventType.BASE_INSERTION) ? 1 : 0 ); - } - break; - } - case N: - case H: - case P: - break; - default: - throw new ReviewedStingException("Unsupported cigar operator: " + ce.getOperator()); - } - } - return indel; - } - - protected static double[] calculateFractionalErrorArray( final int[] errorArray, final byte[] baqArray ) { - if(errorArray.length != baqArray.length ) { - throw new ReviewedStingException("Array length mismatch detected. Malformed read?"); - } - - final int BLOCK_START_UNSET = -1; - - final double[] fractionalErrors = new double[baqArray.length]; - Arrays.fill(fractionalErrors, 0.0); - boolean inBlock = false; - int blockStartIndex = BLOCK_START_UNSET; - int iii; - for( iii = 0; iii < fractionalErrors.length; iii++ ) { - if( baqArray[iii] == NO_BAQ_UNCERTAINTY ) { - if( !inBlock ) { - fractionalErrors[iii] = (double) errorArray[iii]; - } else { - calculateAndStoreErrorsInBlock(iii, blockStartIndex, errorArray, fractionalErrors); - inBlock = false; // reset state variables - blockStartIndex = BLOCK_START_UNSET; // reset state variables - } - } else { - inBlock = true; - if( blockStartIndex == BLOCK_START_UNSET ) { blockStartIndex = iii; } - } - } - if( inBlock ) { - calculateAndStoreErrorsInBlock(iii-1, blockStartIndex, errorArray, fractionalErrors); - } - if( fractionalErrors.length != errorArray.length ) { - throw new ReviewedStingException("Output array length mismatch detected. Malformed read?"); - } - return fractionalErrors; - } - - private static void calculateAndStoreErrorsInBlock( final int iii, - final int blockStartIndex, - final int[] errorArray, - final double[] fractionalErrors ) { - int totalErrors = 0; - for( int jjj = Math.max(0,blockStartIndex-1); jjj <= iii; jjj++ ) { - totalErrors += errorArray[jjj]; - } - for( int jjj = Math.max(0, blockStartIndex-1); jjj <= iii; jjj++ ) { - fractionalErrors[jjj] = ((double) totalErrors) / ((double)(iii - Math.max(0,blockStartIndex-1) + 1)); - } - } - - /** - * Create a BAQ style array that indicates no alignment uncertainty - * @param read the read for which we want a BAQ array - * @return a BAQ-style non-null byte[] counting NO_BAQ_UNCERTAINTY values - * // TODO -- could be optimized avoiding this function entirely by using this inline if the calculation code above - */ - private byte[] flatBAQArray(final GATKSAMRecord read) { - final byte[] baq = new byte[read.getReadLength()]; - Arrays.fill(baq, NO_BAQ_UNCERTAINTY); - return baq; - } - - /** - * Compute an actual BAQ array for read, based on its quals and the reference sequence - * @param read the read to BAQ - * @return a non-null BAQ tag array for read - */ - private byte[] calculateBAQArray( final GATKSAMRecord read ) { - baq.baqRead(read, referenceReader, BAQ.CalculationMode.RECALCULATE, BAQ.QualityMode.ADD_TAG); - return BAQ.getBAQTag(read); - } - - /** - * Initialize the reduce step by returning 0L - * - * @return returns 0L - */ - public Long reduceInit() { - return 0L; - } - - /** - * The Reduce method doesn't do anything for this walker. - * - * @param mapped Result of the map. This value is immediately ignored. - * @param sum The summing CountedData used to output the CSV data - * @return returns The sum used to output the CSV data - */ - public Long reduce(Long mapped, Long sum) { - sum += mapped; - return sum; - } - - @Override - public void onTraversalDone(Long result) { - recalibrationEngine.finalizeData(); - - logger.info("Calculating quantized quality scores..."); - quantizeQualityScores(); - - logger.info("Writing recalibration report..."); - generateReport(); - logger.info("...done!"); - - if ( RAC.RECAL_PDF_FILE != null ) { - logger.info("Generating recalibration plots..."); - generatePlots(); - } - - logger.info("Processed: " + result + " reads"); - } - - private RecalibrationTables getRecalibrationTable() { - return recalibrationEngine.getFinalRecalibrationTables(); - } - - private void generatePlots() { - File recalFile = getToolkit().getArguments().BQSR_RECAL_FILE; - if (recalFile != null) { - RecalibrationReport report = new RecalibrationReport(recalFile); - RecalUtils.generateRecalibrationPlot(RAC, report.getRecalibrationTables(), getRecalibrationTable(), requestedCovariates); - } - else - RecalUtils.generateRecalibrationPlot(RAC, getRecalibrationTable(), requestedCovariates); - } - - /** - * go through the quality score table and use the # observations and the empirical quality score - * to build a quality score histogram for quantization. Then use the QuantizeQual algorithm to - * generate a quantization map (recalibrated_qual -> quantized_qual) - */ - private void quantizeQualityScores() { - quantizationInfo = new QuantizationInfo(getRecalibrationTable(), RAC.QUANTIZING_LEVELS); - } - - private void generateReport() { - RecalUtils.outputRecalibrationReport(RAC, quantizationInfo, getRecalibrationTable(), requestedCovariates, RAC.SORT_BY_ALL_COLUMNS); - } -} \ No newline at end of file diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/ReadRecalibrationInfo.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/ReadRecalibrationInfo.java deleted file mode 100644 index b884b89db..000000000 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/ReadRecalibrationInfo.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 2012 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.bqsr; - -import com.google.java.contract.Ensures; -import com.google.java.contract.Requires; -import org.broadinstitute.sting.utils.QualityUtils; -import org.broadinstitute.sting.utils.recalibration.EventType; -import org.broadinstitute.sting.utils.recalibration.ReadCovariates; -import org.broadinstitute.sting.utils.sam.GATKSAMRecord; - -/** - * Created with IntelliJ IDEA. - * User: depristo - * Date: 12/18/12 - * Time: 3:50 PM - * - * TODO -- merge in ReadCovariates? - */ -public final class ReadRecalibrationInfo { - private final GATKSAMRecord read; - private final int length; - private final ReadCovariates covariates; - private final boolean[] skips; - private final byte[] baseQuals, insertionQuals, deletionQuals; - private final double[] snpErrors, insertionErrors, deletionErrors; - - public ReadRecalibrationInfo(final GATKSAMRecord read, - final ReadCovariates covariates, - final boolean[] skips, - final double[] snpErrors, - final double[] insertionErrors, - final double[] deletionErrors) { - if ( read == null ) throw new IllegalArgumentException("read cannot be null"); - if ( covariates == null ) throw new IllegalArgumentException("covariates cannot be null"); - if ( skips == null ) throw new IllegalArgumentException("skips cannot be null"); - if ( snpErrors == null ) throw new IllegalArgumentException("snpErrors cannot be null"); - if ( insertionErrors == null ) throw new IllegalArgumentException("insertionErrors cannot be null"); - if ( deletionErrors == null ) throw new IllegalArgumentException("deletionErrors cannot be null"); - - this.read = read; - this.baseQuals = read.getBaseQualities(); - this.length = baseQuals.length; - this.covariates = covariates; - this.skips = skips; - this.insertionQuals = read.getExistingBaseInsertionQualities(); - this.deletionQuals = read.getExistingBaseDeletionQualities(); - this.snpErrors = snpErrors; - this.insertionErrors = insertionErrors; - this.deletionErrors = deletionErrors; - - if ( skips.length != length ) throw new IllegalArgumentException("skips.length " + snpErrors.length + " != length " + length); - if ( snpErrors.length != length ) throw new IllegalArgumentException("snpErrors.length " + snpErrors.length + " != length " + length); - if ( insertionErrors.length != length ) throw new IllegalArgumentException("insertionErrors.length " + snpErrors.length + " != length " + length); - if ( deletionErrors.length != length ) throw new IllegalArgumentException("deletionErrors.length " + snpErrors.length + " != length " + length); - } - - /** - * Get the qual score for event type at offset - * - * @param eventType the type of event we want the qual for - * @param offset the offset into this read for the qual - * @return a valid quality score for event at offset - */ - @Requires("validOffset(offset)") - @Ensures("validQual(result)") - public byte getQual(final EventType eventType, final int offset) { - switch ( eventType ) { - case BASE_SUBSTITUTION: return baseQuals[offset]; - // note optimization here -- if we don't have ins/del quals we just return the default byte directly - case BASE_INSERTION: return insertionQuals == null ? GATKSAMRecord.DEFAULT_INSERTION_DELETION_QUAL : insertionQuals[offset]; - case BASE_DELETION: return deletionQuals == null ? GATKSAMRecord.DEFAULT_INSERTION_DELETION_QUAL : deletionQuals[offset]; - default: throw new IllegalStateException("Unknown event type " + eventType); - } - } - - /** - * Get the error fraction for event type at offset - * - * The error fraction is a value between 0 and 1 that indicates how much certainty we have - * in the error occurring at offset. A value of 1 means that the error definitely occurs at this - * site, a value of 0.0 means it definitely doesn't happen here. 0.5 means that half the weight - * of the error belongs here - * - * @param eventType the type of event we want the qual for - * @param offset the offset into this read for the qual - * @return a fractional weight for an error at this offset - */ - @Requires("validOffset(offset)") - @Ensures("result >= 0.0 && result <= 1.0") - public double getErrorFraction(final EventType eventType, final int offset) { - switch ( eventType ) { - case BASE_SUBSTITUTION: return snpErrors[offset]; - case BASE_INSERTION: return insertionErrors[offset]; - case BASE_DELETION: return deletionErrors[offset]; - default: throw new IllegalStateException("Unknown event type " + eventType); - } - } - - /** - * Get the read involved in this recalibration info - * @return a non-null GATKSAMRecord - */ - @Ensures("result != null") - public GATKSAMRecord getRead() { - return read; - } - - /** - * Should offset in this read be skipped (because it's covered by a known variation site?) - * @param offset a valid offset into this info - * @return true if offset should be skipped, false otherwise - */ - @Requires("validOffset(offset)") - public boolean skip(final int offset) { - return skips[offset]; - } - - /** - * Get the ReadCovariates object carrying the mapping from offsets -> covariate key sets - * @return a non-null ReadCovariates object - */ - @Ensures("result != null") - public ReadCovariates getCovariatesValues() { - return covariates; - } - - /** - * Ensures an offset is valid. Used in contracts - * @param offset a proposed offset - * @return true if offset is valid w.r.t. the data in this object, false otherwise - */ - private boolean validOffset(final int offset) { - return offset >= 0 && offset < baseQuals.length; - } - - private boolean validQual(final byte result) { - return result >= 0 && result <= QualityUtils.MAX_QUAL_SCORE; - } -} diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/RecalibrationArgumentCollection.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/RecalibrationArgumentCollection.java deleted file mode 100755 index 622413b18..000000000 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/RecalibrationArgumentCollection.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright (c) 2010 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.bqsr; - -import org.broad.tribble.Feature; -import org.broadinstitute.sting.commandline.*; -import org.broadinstitute.sting.gatk.report.GATKReportTable; -import org.broadinstitute.sting.utils.recalibration.RecalUtils; - -import java.io.File; -import java.io.PrintStream; -import java.util.Collections; -import java.util.List; - -/** - * Created by IntelliJ IDEA. - * User: rpoplin - * Date: Nov 27, 2009 - * - * A collection of the arguments that are common to both CovariateCounterWalker and TableRecalibrationWalker. - * This set of arguments will also be passed to the constructor of every Covariate when it is instantiated. - */ - -public class RecalibrationArgumentCollection { - - /** - * This algorithm treats every reference mismatch as an indication of error. However, real genetic variation is expected to mismatch the reference, - * so it is critical that a database of known polymorphic sites is given to the tool in order to skip over those sites. This tool accepts any number of RodBindings (VCF, Bed, etc.) - * for use as this database. For users wishing to exclude an interval list of known variation simply use -XL my.interval.list to skip over processing those sites. - * Please note however that the statistics reported by the tool will not accurately reflected those sites skipped by the -XL argument. - */ - @Input(fullName = "knownSites", shortName = "knownSites", doc = "A database of known polymorphic sites to skip over in the recalibration algorithm", required = false) - public List> knownSites = Collections.emptyList(); - - /** - * After the header, data records occur one per line until the end of the file. The first several items on a line are the - * values of the individual covariates and will change depending on which covariates were specified at runtime. The last - * three items are the data- that is, number of observations for this combination of covariates, number of reference mismatches, - * and the raw empirical quality score calculated by phred-scaling the mismatch rate. Use '/dev/stdout' to print to standard out. - */ - @Gather(BQSRGatherer.class) - @Output(doc = "The output recalibration table file to create", required = true) - public File RECAL_TABLE_FILE = null; - public PrintStream RECAL_TABLE; - - /** - * If not provided, then no plots will be generated (useful for queue scatter/gathering). - * However, we *highly* recommend that users generate these plots whenever possible for QC checking. - */ - @Output(fullName = "plot_pdf_file", shortName = "plots", doc = "The output recalibration pdf file to create", required = false) - public File RECAL_PDF_FILE = null; - - /** - * If not provided, then a temporary file is created and then deleted upon completion. - * For advanced users only. - */ - @Advanced - @Argument(fullName = "intermediate_csv_file", shortName = "intermediate", doc = "The intermediate csv file to create", required = false) - public File RECAL_CSV_FILE = null; - - /** - * Note that the --list argument requires a fully resolved and correct command-line to work. - */ - @Argument(fullName = "list", shortName = "ls", doc = "List the available covariates and exit", required = false) - public boolean LIST_ONLY = false; - - /** - * Note that the ReadGroup and QualityScore covariates are required and do not need to be specified. - * Also, unless --no_standard_covs is specified, the Cycle and Context covariates are standard and are included by default. - * Use the --list argument to see the available covariates. - */ - @Argument(fullName = "covariate", shortName = "cov", doc = "One or more covariates to be used in the recalibration. Can be specified multiple times", required = false) - public String[] COVARIATES = null; - - /* - * The Cycle and Context covariates are standard and are included by default unless this argument is provided. - * Note that the ReadGroup and QualityScore covariates are required and cannot be excluded. - */ - @Argument(fullName = "no_standard_covs", shortName = "noStandard", doc = "Do not use the standard set of covariates, but rather just the ones listed using the -cov argument", required = false) - public boolean DO_NOT_USE_STANDARD_COVARIATES = false; - - /** - * This calculation is critically dependent on being able to skip over known polymorphic sites. Please be sure that you know what you are doing if you use this option. - */ - @Advanced - @Argument(fullName = "run_without_dbsnp_potentially_ruining_quality", shortName = "run_without_dbsnp_potentially_ruining_quality", required = false, doc = "If specified, allows the recalibrator to be used without a dbsnp rod. Very unsafe and for expert users only.") - public boolean RUN_WITHOUT_DBSNP = false; - - /** - * CountCovariates and TableRecalibration accept a --solid_recal_mode flag which governs how the recalibrator handles the - * reads which have had the reference inserted because of color space inconsistencies. - */ - @Argument(fullName = "solid_recal_mode", shortName = "sMode", required = false, doc = "How should we recalibrate solid bases in which the reference was inserted? Options = DO_NOTHING, SET_Q_ZERO, SET_Q_ZERO_BASE_N, or REMOVE_REF_BIAS") - public RecalUtils.SOLID_RECAL_MODE SOLID_RECAL_MODE = RecalUtils.SOLID_RECAL_MODE.SET_Q_ZERO; - - /** - * CountCovariates and TableRecalibration accept a --solid_nocall_strategy flag which governs how the recalibrator handles - * no calls in the color space tag. Unfortunately because of the reference inserted bases mentioned above, reads with no calls in - * their color space tag can not be recalibrated. - */ - @Argument(fullName = "solid_nocall_strategy", shortName = "solid_nocall_strategy", doc = "Defines the behavior of the recalibrator when it encounters no calls in the color space. Options = THROW_EXCEPTION, LEAVE_READ_UNRECALIBRATED, or PURGE_READ", required = false) - public RecalUtils.SOLID_NOCALL_STRATEGY SOLID_NOCALL_STRATEGY = RecalUtils.SOLID_NOCALL_STRATEGY.THROW_EXCEPTION; - - /** - * The context covariate will use a context of this size to calculate it's covariate value for base mismatches - */ - @Argument(fullName = "mismatches_context_size", shortName = "mcs", doc = "size of the k-mer context to be used for base mismatches", required = false) - public int MISMATCHES_CONTEXT_SIZE = 2; - - /** - * The context covariate will use a context of this size to calculate it's covariate value for base insertions and deletions - */ - @Argument(fullName = "indels_context_size", shortName = "ics", doc = "size of the k-mer context to be used for base insertions and deletions", required = false) - public int INDELS_CONTEXT_SIZE = 3; - - /** - * The cycle covariate will generate an error if it encounters a cycle greater than this value. - * This argument is ignored if the Cycle covariate is not used. - */ - @Argument(fullName = "maximum_cycle_value", shortName = "maxCycle", doc = "the maximum cycle value permitted for the Cycle covariate", required = false) - public int MAXIMUM_CYCLE_VALUE = 500; - - /** - * A default base qualities to use as a prior (reported quality) in the mismatch covariate model. This value will replace all base qualities in the read for this default value. Negative value turns it off (default is off) - */ - @Argument(fullName = "mismatches_default_quality", shortName = "mdq", doc = "default quality for the base mismatches covariate", required = false) - public byte MISMATCHES_DEFAULT_QUALITY = -1; - - /** - * A default base qualities to use as a prior (reported quality) in the insertion covariate model. This parameter is used for all reads without insertion quality scores for each base. (default is on) - */ - @Argument(fullName = "insertions_default_quality", shortName = "idq", doc = "default quality for the base insertions covariate", required = false) - public byte INSERTIONS_DEFAULT_QUALITY = 45; - - /** - * A default base qualities to use as a prior (reported quality) in the mismatch covariate model. This value will replace all base qualities in the read for this default value. Negative value turns it off (default is off) - */ - @Argument(fullName = "deletions_default_quality", shortName = "ddq", doc = "default quality for the base deletions covariate", required = false) - public byte DELETIONS_DEFAULT_QUALITY = 45; - - /** - * Reads with low quality bases on either tail (beginning or end) will not be considered in the context. This parameter defines the quality below which (inclusive) a tail is considered low quality - */ - @Argument(fullName = "low_quality_tail", shortName = "lqt", doc = "minimum quality for the bases in the tail of the reads to be considered", required = false) - public byte LOW_QUAL_TAIL = 2; - - /** - * BQSR generates a quantization table for quick quantization later by subsequent tools. BQSR does not quantize the base qualities, this is done by the engine with the -qq or -BQSR options. - * This parameter tells BQSR the number of levels of quantization to use to build the quantization table. - */ - @Argument(fullName = "quantizing_levels", shortName = "ql", required = false, doc = "number of distinct quality scores in the quantized output") - public int QUANTIZING_LEVELS = 16; - - /** - * The tag name for the binary tag covariate (if using it) - */ - @Argument(fullName = "binary_tag_name", shortName = "bintag", required = false, doc = "the binary tag covariate name if using it") - public String BINARY_TAG_NAME = null; - - /* - * whether GATK report tables should have rows in sorted order, starting from leftmost column - */ - @Argument(fullName = "sort_by_all_columns", shortName = "sortAllCols", doc = "Sort the rows in the tables of reports", required = false) - public Boolean SORT_BY_ALL_COLUMNS = false; - - ///////////////////////////// - // Debugging-only Arguments - ///////////////////////////// - - @Hidden - @Argument(fullName = "default_platform", shortName = "dP", required = false, doc = "If a read has no platform then default to the provided String. Valid options are illumina, 454, and solid.") - public String DEFAULT_PLATFORM = null; - - @Hidden - @Argument(fullName = "force_platform", shortName = "fP", required = false, doc = "If provided, the platform of EVERY read will be forced to be the provided String. Valid options are illumina, 454, and solid.") - public String FORCE_PLATFORM = null; - - @Hidden - @Output(fullName = "recal_table_update_log", shortName = "recal_table_update_log", required = false, doc = "If provided, log all updates to the recalibration tables to the given file. For debugging/testing purposes only") - public PrintStream RECAL_TABLE_UPDATE_LOG = null; - - public File existingRecalibrationReport = null; - - public GATKReportTable generateReportTable(final String covariateNames) { - GATKReportTable argumentsTable; - if(SORT_BY_ALL_COLUMNS) { - argumentsTable = new GATKReportTable("Arguments", "Recalibration argument collection values used in this run", 2, GATKReportTable.TableSortingWay.SORT_BY_COLUMN); - } else { - argumentsTable = new GATKReportTable("Arguments", "Recalibration argument collection values used in this run", 2); - } - argumentsTable.addColumn("Argument"); - argumentsTable.addColumn(RecalUtils.ARGUMENT_VALUE_COLUMN_NAME); - argumentsTable.addRowID("covariate", true); - argumentsTable.set("covariate", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, covariateNames); - argumentsTable.addRowID("no_standard_covs", true); - argumentsTable.set("no_standard_covs", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, DO_NOT_USE_STANDARD_COVARIATES); - argumentsTable.addRowID("run_without_dbsnp", true); - argumentsTable.set("run_without_dbsnp", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, RUN_WITHOUT_DBSNP); - argumentsTable.addRowID("solid_recal_mode", true); - argumentsTable.set("solid_recal_mode", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, SOLID_RECAL_MODE); - argumentsTable.addRowID("solid_nocall_strategy", true); - argumentsTable.set("solid_nocall_strategy", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, SOLID_NOCALL_STRATEGY); - argumentsTable.addRowID("mismatches_context_size", true); - argumentsTable.set("mismatches_context_size", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, MISMATCHES_CONTEXT_SIZE); - argumentsTable.addRowID("indels_context_size", true); - argumentsTable.set("indels_context_size", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, INDELS_CONTEXT_SIZE); - argumentsTable.addRowID("mismatches_default_quality", true); - argumentsTable.set("mismatches_default_quality", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, MISMATCHES_DEFAULT_QUALITY); - argumentsTable.addRowID("insertions_default_quality", true); - argumentsTable.set("insertions_default_quality", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, INSERTIONS_DEFAULT_QUALITY); - argumentsTable.addRowID("low_quality_tail", true); - argumentsTable.set("low_quality_tail", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, LOW_QUAL_TAIL); - argumentsTable.addRowID("default_platform", true); - argumentsTable.set("default_platform", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, DEFAULT_PLATFORM); - argumentsTable.addRowID("force_platform", true); - argumentsTable.set("force_platform", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, FORCE_PLATFORM); - argumentsTable.addRowID("quantizing_levels", true); - argumentsTable.set("quantizing_levels", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, QUANTIZING_LEVELS); - argumentsTable.addRowID("recalibration_report", true); - argumentsTable.set("recalibration_report", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, existingRecalibrationReport == null ? "null" : existingRecalibrationReport.getAbsolutePath()); - argumentsTable.addRowID("plot_pdf_file", true); - argumentsTable.set("plot_pdf_file", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, RECAL_PDF_FILE == null ? "null" : RECAL_PDF_FILE.getAbsolutePath()); - argumentsTable.addRowID("binary_tag_name", true); - argumentsTable.set("binary_tag_name", RecalUtils.ARGUMENT_VALUE_COLUMN_NAME, BINARY_TAG_NAME == null ? "null" : BINARY_TAG_NAME); - return argumentsTable; - } - -} diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/RecalibrationEngine.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/RecalibrationEngine.java deleted file mode 100644 index ca9fb4bca..000000000 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/bqsr/RecalibrationEngine.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) 2012 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.bqsr; - -import com.google.java.contract.Requires; -import org.broadinstitute.sting.utils.collections.NestedIntegerArray; -import org.broadinstitute.sting.utils.recalibration.*; -import org.broadinstitute.sting.utils.recalibration.covariates.Covariate; -import org.broadinstitute.sting.utils.sam.GATKSAMRecord; - -import java.io.PrintStream; -import java.util.LinkedList; -import java.util.List; - -public class RecalibrationEngine { - final protected Covariate[] covariates; - final private int numReadGroups; - final private PrintStream maybeLogStream; - final private boolean lowMemoryMode; - - /** - * Has finalizeData() been called? - */ - private boolean finalized = false; - - /** - * The final (merged, etc) recalibration tables, suitable for downstream analysis. - */ - private RecalibrationTables finalRecalibrationTables = null; - - private final List recalibrationTablesList = new LinkedList(); - - private final ThreadLocal threadLocalTables = new ThreadLocal() { - private synchronized RecalibrationTables makeAndCaptureTable() { - final RecalibrationTables newTable = new RecalibrationTables(covariates, numReadGroups, maybeLogStream); - recalibrationTablesList.add(newTable); - return newTable; - } - - @Override - protected synchronized RecalibrationTables initialValue() { - if ( lowMemoryMode ) { - return recalibrationTablesList.isEmpty() ? makeAndCaptureTable() : recalibrationTablesList.get(0); - } else { - return makeAndCaptureTable(); - } - } - }; - - /** - * Get a recalibration table suitable for updating the underlying RecalDatums - * - * May return a thread-local version, or a single version, depending on the initialization - * arguments of this instance. - * - * @return updated tables - */ - protected RecalibrationTables getUpdatableRecalibrationTables() { - return threadLocalTables.get(); - } - - /** - * Initialize the recalibration engine - * - * Called once before any calls to updateDataForRead are made. The engine should prepare itself - * to handle any number of updateDataForRead calls containing ReadRecalibrationInfo containing - * keys for each of the covariates provided. - * - * The engine should collect match and mismatch data into the recalibrationTables data. - * - * @param covariates an array of the covariates we'll be using in this engine, order matters - * @param numReadGroups the number of read groups we should use for the recalibration tables - * @param maybeLogStream an optional print stream for logging calls to the nestedhashmap in the recalibration tables - */ - public RecalibrationEngine(final Covariate[] covariates, final int numReadGroups, final PrintStream maybeLogStream, final boolean enableLowMemoryMode) { - if ( covariates == null ) throw new IllegalArgumentException("Covariates cannot be null"); - if ( numReadGroups < 1 ) throw new IllegalArgumentException("numReadGroups must be >= 1 but got " + numReadGroups); - - this.covariates = covariates.clone(); - this.numReadGroups = numReadGroups; - this.maybeLogStream = maybeLogStream; - this.lowMemoryMode = enableLowMemoryMode; - } - - /** - * Update the recalibration statistics using the information in recalInfo - * @param recalInfo data structure holding information about the recalibration values for a single read - */ - @Requires("recalInfo != null") - public void updateDataForRead( final ReadRecalibrationInfo recalInfo ) { - final GATKSAMRecord read = recalInfo.getRead(); - final ReadCovariates readCovariates = recalInfo.getCovariatesValues(); - final RecalibrationTables tables = getUpdatableRecalibrationTables(); - final NestedIntegerArray qualityScoreTable = tables.getQualityScoreTable(); - - for( int offset = 0; offset < read.getReadBases().length; offset++ ) { - if( ! recalInfo.skip(offset) ) { - - for (final EventType eventType : EventType.values()) { - final int[] keys = readCovariates.getKeySet(offset, eventType); - final int eventIndex = eventType.ordinal(); - final byte qual = recalInfo.getQual(eventType, offset); - final double isError = recalInfo.getErrorFraction(eventType, offset); - - RecalUtils.incrementDatumOrPutIfNecessary(qualityScoreTable, qual, isError, keys[0], keys[1], eventIndex); - - for (int i = 2; i < covariates.length; i++) { - if (keys[i] < 0) - continue; - - RecalUtils.incrementDatumOrPutIfNecessary(tables.getTable(i), qual, isError, keys[0], keys[1], keys[i], eventIndex); - } - } - } - } - } - - - /** - * Finalize, if appropriate, all derived data in recalibrationTables. - * - * Called once after all calls to updateDataForRead have been issued. - * - * Assumes that all of the principal tables (by quality score) have been completely updated, - * and walks over this data to create summary data tables like by read group table. - */ - public void finalizeData() { - if ( finalized ) throw new IllegalStateException("FinalizeData() has already been called"); - - // merge all of the thread-local tables - finalRecalibrationTables = mergeThreadLocalRecalibrationTables(); - - final NestedIntegerArray byReadGroupTable = finalRecalibrationTables.getReadGroupTable(); - final NestedIntegerArray byQualTable = finalRecalibrationTables.getQualityScoreTable(); - - // iterate over all values in the qual table - for ( NestedIntegerArray.Leaf leaf : byQualTable.getAllLeaves() ) { - final int rgKey = leaf.keys[0]; - final int eventIndex = leaf.keys[2]; - final RecalDatum rgDatum = byReadGroupTable.get(rgKey, eventIndex); - final RecalDatum qualDatum = leaf.value; - - if ( rgDatum == null ) { - // create a copy of qualDatum, and initialize byReadGroup table with it - byReadGroupTable.put(new RecalDatum(qualDatum), rgKey, eventIndex); - } else { - // combine the qual datum with the existing datum in the byReadGroup table - rgDatum.combine(qualDatum); - } - } - - finalized = true; - } - - /** - * Merge all of the thread local recalibration tables into a single one. - * - * Reuses one of the recalibration tables to hold the merged table, so this function can only be - * called once in the engine. - * - * @return the merged recalibration table - */ - @Requires("! finalized") - private RecalibrationTables mergeThreadLocalRecalibrationTables() { - if ( recalibrationTablesList.isEmpty() ) throw new IllegalStateException("recalibration tables list is empty"); - - RecalibrationTables merged = null; - for ( final RecalibrationTables table : recalibrationTablesList ) { - if ( merged == null ) - // fast path -- if there's only only one table, so just make it the merged one - merged = table; - else { - merged.combine(table); - } - } - - return merged; - } - - /** - * Get the final recalibration tables, after finalizeData() has been called - * - * This returns the finalized recalibration table collected by this engine. - * - * It is an error to call this function before finalizeData has been called - * - * @return the finalized recalibration table collected by this engine - */ - public RecalibrationTables getFinalRecalibrationTables() { - if ( ! finalized ) throw new IllegalStateException("Cannot get final recalibration tables until finalizeData() has been called"); - return finalRecalibrationTables; - } -} diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/FlagStat.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/qc/FlagStat.java similarity index 96% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/FlagStat.java rename to public/java/src/org/broadinstitute/sting/gatk/walkers/qc/FlagStat.java index b4ef66aaf..c8304db21 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/FlagStat.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/qc/FlagStat.java @@ -1,9 +1,13 @@ -package org.broadinstitute.sting.gatk.walkers; +package org.broadinstitute.sting.gatk.walkers.qc; import org.broadinstitute.sting.commandline.Output; import org.broadinstitute.sting.gatk.CommandLineGATK; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; +import org.broadinstitute.sting.gatk.walkers.DataSource; +import org.broadinstitute.sting.gatk.walkers.NanoSchedulable; +import org.broadinstitute.sting.gatk.walkers.ReadWalker; +import org.broadinstitute.sting.gatk.walkers.Requires; import org.broadinstitute.sting.utils.help.DocumentedGATKFeature; import org.broadinstitute.sting.utils.sam.GATKSAMRecord; diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/Pileup.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/qc/Pileup.java similarity index 96% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/Pileup.java rename to public/java/src/org/broadinstitute/sting/gatk/walkers/qc/Pileup.java index a3efea9f1..fb08d1c03 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/Pileup.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/qc/Pileup.java @@ -23,7 +23,7 @@ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package org.broadinstitute.sting.gatk.walkers; +package org.broadinstitute.sting.gatk.walkers.qc; import org.broad.tribble.Feature; import org.broadinstitute.sting.commandline.Argument; @@ -34,6 +34,9 @@ import org.broadinstitute.sting.gatk.CommandLineGATK; import org.broadinstitute.sting.gatk.contexts.AlignmentContext; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; +import org.broadinstitute.sting.gatk.walkers.LocusWalker; +import org.broadinstitute.sting.gatk.walkers.NanoSchedulable; +import org.broadinstitute.sting.gatk.walkers.TreeReducible; import org.broadinstitute.sting.utils.Utils; import org.broadinstitute.sting.utils.help.DocumentedGATKFeature; import org.broadinstitute.sting.utils.pileup.PileupElement; diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/PrintRODs.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/qc/PrintRODs.java similarity index 96% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/PrintRODs.java rename to public/java/src/org/broadinstitute/sting/gatk/walkers/qc/PrintRODs.java index d7ae3050e..3ffdf3e9d 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/PrintRODs.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/qc/PrintRODs.java @@ -23,7 +23,7 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -package org.broadinstitute.sting.gatk.walkers; +package org.broadinstitute.sting.gatk.walkers.qc; import org.broad.tribble.Feature; import org.broadinstitute.sting.commandline.Input; @@ -33,6 +33,7 @@ import org.broadinstitute.sting.gatk.CommandLineGATK; import org.broadinstitute.sting.gatk.contexts.AlignmentContext; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; +import org.broadinstitute.sting.gatk.walkers.RodWalker; import org.broadinstitute.sting.utils.help.DocumentedGATKFeature; import java.io.PrintStream; diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/ClipReads.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/readutils/ClipReads.java similarity index 99% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/ClipReads.java rename to public/java/src/org/broadinstitute/sting/gatk/walkers/readutils/ClipReads.java index 93eaee209..3dd49dea8 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/ClipReads.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/readutils/ClipReads.java @@ -23,7 +23,7 @@ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package org.broadinstitute.sting.gatk.walkers; +package org.broadinstitute.sting.gatk.walkers.readutils; import net.sf.picard.reference.ReferenceSequence; import net.sf.picard.reference.ReferenceSequenceFile; @@ -37,6 +37,9 @@ import org.broadinstitute.sting.gatk.CommandLineGATK; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; import org.broadinstitute.sting.gatk.io.StingSAMFileWriter; import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; +import org.broadinstitute.sting.gatk.walkers.DataSource; +import org.broadinstitute.sting.gatk.walkers.ReadWalker; +import org.broadinstitute.sting.gatk.walkers.Requires; import org.broadinstitute.variant.utils.BaseUtils; import org.broadinstitute.sting.utils.Utils; import org.broadinstitute.sting.utils.clipping.ClippingOp; diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/PrintReads.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/readutils/PrintReads.java similarity index 98% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/PrintReads.java rename to public/java/src/org/broadinstitute/sting/gatk/walkers/readutils/PrintReads.java index 37176cbf9..956c0d7d4 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/PrintReads.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/readutils/PrintReads.java @@ -23,7 +23,7 @@ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package org.broadinstitute.sting.gatk.walkers; +package org.broadinstitute.sting.gatk.walkers.readutils; import net.sf.samtools.SAMFileWriter; import net.sf.samtools.SAMReadGroupRecord; @@ -35,6 +35,7 @@ import org.broadinstitute.sting.gatk.contexts.ReferenceContext; import org.broadinstitute.sting.gatk.iterators.ReadTransformer; import org.broadinstitute.sting.gatk.iterators.ReadTransformersMode; import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; +import org.broadinstitute.sting.gatk.walkers.*; import org.broadinstitute.sting.utils.SampleUtils; import org.broadinstitute.sting.utils.baq.BAQ; import org.broadinstitute.sting.utils.help.DocumentedGATKFeature; diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/SplitSamFile.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/readutils/SplitSamFile.java similarity index 95% rename from public/java/src/org/broadinstitute/sting/gatk/walkers/SplitSamFile.java rename to public/java/src/org/broadinstitute/sting/gatk/walkers/readutils/SplitSamFile.java index 7d70c470d..07d1f7c23 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/SplitSamFile.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/readutils/SplitSamFile.java @@ -23,7 +23,7 @@ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package org.broadinstitute.sting.gatk.walkers; +package org.broadinstitute.sting.gatk.walkers.readutils; import net.sf.samtools.SAMFileHeader; import net.sf.samtools.SAMFileWriter; @@ -34,6 +34,10 @@ import org.broadinstitute.sting.commandline.Argument; import org.broadinstitute.sting.gatk.CommandLineGATK; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; +import org.broadinstitute.sting.gatk.walkers.DataSource; +import org.broadinstitute.sting.gatk.walkers.ReadWalker; +import org.broadinstitute.sting.gatk.walkers.Requires; +import org.broadinstitute.sting.gatk.walkers.WalkerName; import org.broadinstitute.sting.utils.help.DocumentedGATKFeature; import org.broadinstitute.sting.utils.sam.GATKSAMRecord; import org.broadinstitute.sting.utils.sam.ReadUtils; diff --git a/public/java/src/org/broadinstitute/sting/utils/classloader/GATKLiteUtils.java b/public/java/src/org/broadinstitute/sting/utils/classloader/GATKLiteUtils.java deleted file mode 100755 index 2ab7d0618..000000000 --- a/public/java/src/org/broadinstitute/sting/utils/classloader/GATKLiteUtils.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2010 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.utils.classloader; - -import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; - -import java.util.*; - -/** - * Created by IntelliJ IDEA. - * User: ebanks - * - * A set of static utility methods for working with the full vs. Lite GATK build - */ -public class GATKLiteUtils { - /** - * Constructor access disallowed...static utility methods only! - */ - private GATKLiteUtils() { } - - - private static Set fullVersionGATKWalkers = new HashSet(); - static { - fullVersionGATKWalkers.add("HaplotypeCaller"); - fullVersionGATKWalkers.add("ReduceReads"); - } - /** - * Utility method to check whether a given walker is only available in the full GATK release - * - * @param walkerName the walker class name (not the package) to check - */ - public static boolean isAvailableOnlyInFullGATK(final String walkerName) { - return fullVersionGATKWalkers.contains(walkerName); - } - - /** - * Utility method to determine whether this is the lite version of the GATK - */ - public static boolean isGATKLite() { - if ( isLiteVersion == null ) { - try { - Class.forName(DummyProtectedClassName); - isLiteVersion = false; - } catch ( ClassNotFoundException e) { - isLiteVersion = true; - } - } - return isLiteVersion; - } - private static final String DummyProtectedClassName = "org.broadinstitute.sting.gatk.DummyProtectedClass"; - private static Boolean isLiteVersion = null; - - - /** - * Utility method to pull out a protected subclass if possible, otherwise it falls back to a public subclass. - * Important note: the protected classes MUST implement ProtectedPackageSource! - * - * @param interfaceClass the interface class which the target classes implement - */ - public static Class getProtectedClassIfAvailable(final Class interfaceClass) { - List> classes = new PluginManager(interfaceClass).getPlugins(); - if ( classes.isEmpty() ) - throw new ReviewedStingException("No classes implementing the interface class " + interfaceClass.getSimpleName() + " were found"); - - Class result = null; - for ( Class c : classes ) { - if ( ProtectedPackageSource.class.isAssignableFrom(c) ) { - result = c; - break; - } - } - if ( result == null ) - result = classes.get(0); - - return result; - } -} diff --git a/public/java/src/org/broadinstitute/sting/utils/exceptions/UserException.java b/public/java/src/org/broadinstitute/sting/utils/exceptions/UserException.java index 01c4b7a16..c799479ed 100755 --- a/public/java/src/org/broadinstitute/sting/utils/exceptions/UserException.java +++ b/public/java/src/org/broadinstitute/sting/utils/exceptions/UserException.java @@ -92,12 +92,6 @@ public class UserException extends ReviewedStingException { } } - public static class NotSupportedInGATKLite extends UserException { - public NotSupportedInGATKLite(String message) { - super(String.format("GATK Lite does not support all of the features of the full version: %s", message)); - } - } - // todo -- fix up exception cause passing public static class MissingArgument extends CommandLineException { public MissingArgument(String arg, String message) { diff --git a/public/java/src/org/broadinstitute/sting/utils/genotyper/StandardPerReadAlleleLikelihoodMap.java b/public/java/src/org/broadinstitute/sting/utils/genotyper/StandardPerReadAlleleLikelihoodMap.java deleted file mode 100644 index 1a27c6ecb..000000000 --- a/public/java/src/org/broadinstitute/sting/utils/genotyper/StandardPerReadAlleleLikelihoodMap.java +++ /dev/null @@ -1,46 +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.utils.genotyper; - - -import org.broadinstitute.sting.utils.classloader.PublicPackageSource; -import org.broadinstitute.sting.utils.pileup.ReadBackedPileup; -import org.broadinstitute.sting.utils.sam.GATKSAMRecord; -import org.broadinstitute.variant.variantcontext.Allele; - -import java.io.PrintStream; -import java.util.*; - -public class StandardPerReadAlleleLikelihoodMap extends PerReadAlleleLikelihoodMap implements PublicPackageSource { - - public StandardPerReadAlleleLikelihoodMap() { - likelihoodReadMap = new LinkedHashMap>(); - alleles = new ArrayList(); - } - - // not implemented in the standard version - public void performPerAlleleDownsampling(final double downsamplingFraction, final PrintStream log) {} - public ReadBackedPileup createPerAlleleDownsampledBasePileup(final ReadBackedPileup pileup, final double downsamplingFraction, final PrintStream log) { return pileup; } -} diff --git a/public/java/test/org/broadinstitute/sting/gatk/GenomeAnalysisEngineUnitTest.java b/public/java/test/org/broadinstitute/sting/gatk/GenomeAnalysisEngineUnitTest.java index d8905ad35..e96aae07a 100644 --- a/public/java/test/org/broadinstitute/sting/gatk/GenomeAnalysisEngineUnitTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/GenomeAnalysisEngineUnitTest.java @@ -28,7 +28,7 @@ import org.broadinstitute.sting.BaseTest; import org.broadinstitute.sting.commandline.ArgumentException; import org.broadinstitute.sting.commandline.Tags; import org.broadinstitute.sting.gatk.datasources.reads.SAMReaderID; -import org.broadinstitute.sting.gatk.walkers.PrintReads; +import org.broadinstitute.sting.gatk.walkers.readutils.PrintReads; import org.broadinstitute.sting.utils.GenomeLocSortedSet; import org.testng.annotations.Test; diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperLiteIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperLiteIntegrationTest.java deleted file mode 100755 index 783a8d7fc..000000000 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperLiteIntegrationTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.broadinstitute.sting.gatk.walkers.genotyper; - -import org.broadinstitute.sting.WalkerTest; -import org.broadinstitute.sting.utils.classloader.GATKLiteUtils; -import org.testng.SkipException; -import org.testng.annotations.Test; - -import java.util.Arrays; - -// ********************************************************************************** // -// Note that this class also serves as an integration test for the VariantAnnotator! // -// ********************************************************************************** // - -public class UnifiedGenotyperLiteIntegrationTest extends WalkerTest { - - private final static String baseCommand = "-T UnifiedGenotyper -R " + b36KGReference + " --no_cmdline_in_header -glm BOTH -minIndelFrac 0.0 --dbsnp " + b36dbSNP129; - - // -------------------------------------------------------------------------------------------------------------- - // - // testing contamination down-sampling gets ignored - // - // -------------------------------------------------------------------------------------------------------------- - - @Test - public void testContaminationDownsampling() { - if ( !GATKLiteUtils.isGATKLite() ) - throw new SkipException("Only want to test for GATK lite"); - - WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( - baseCommand + " -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s -L 1:10,000,000-10,010,000", 1, - Arrays.asList("9addd225a985178339a0c49dc5fdc220")); - executeTest("test contamination_percentage_to_filter gets ignored", spec); - } - -} diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/FlagStatIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/qc/FlagStatIntegrationTest.java similarity index 92% rename from public/java/test/org/broadinstitute/sting/gatk/walkers/FlagStatIntegrationTest.java rename to public/java/test/org/broadinstitute/sting/gatk/walkers/qc/FlagStatIntegrationTest.java index d2acaa588..aaebfc588 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/FlagStatIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/qc/FlagStatIntegrationTest.java @@ -1,4 +1,4 @@ -package org.broadinstitute.sting.gatk.walkers; +package org.broadinstitute.sting.gatk.walkers.qc; import org.broadinstitute.sting.WalkerTest; import org.testng.annotations.Test; diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/PileupWalkerIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/qc/PileupWalkerIntegrationTest.java similarity index 98% rename from public/java/test/org/broadinstitute/sting/gatk/walkers/PileupWalkerIntegrationTest.java rename to public/java/test/org/broadinstitute/sting/gatk/walkers/qc/PileupWalkerIntegrationTest.java index b457698e9..05c82806d 100644 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/PileupWalkerIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/qc/PileupWalkerIntegrationTest.java @@ -1,4 +1,4 @@ -package org.broadinstitute.sting.gatk.walkers; +package org.broadinstitute.sting.gatk.walkers.qc; import org.broadinstitute.sting.WalkerTest; import org.testng.annotations.Test; diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/ClipReadsWalkersIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/readutils/ClipReadsWalkersIntegrationTest.java similarity index 98% rename from public/java/test/org/broadinstitute/sting/gatk/walkers/ClipReadsWalkersIntegrationTest.java rename to public/java/test/org/broadinstitute/sting/gatk/walkers/readutils/ClipReadsWalkersIntegrationTest.java index ade9bda16..a19b3724f 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/ClipReadsWalkersIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/readutils/ClipReadsWalkersIntegrationTest.java @@ -22,7 +22,7 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -package org.broadinstitute.sting.gatk.walkers; +package org.broadinstitute.sting.gatk.walkers.readutils; import org.broadinstitute.sting.WalkerTest; import org.testng.annotations.Test; diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/PrintReadsIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/readutils/PrintReadsIntegrationTest.java similarity index 97% rename from public/java/test/org/broadinstitute/sting/gatk/walkers/PrintReadsIntegrationTest.java rename to public/java/test/org/broadinstitute/sting/gatk/walkers/readutils/PrintReadsIntegrationTest.java index 717d9d953..247000431 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/PrintReadsIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/readutils/PrintReadsIntegrationTest.java @@ -1,4 +1,4 @@ -package org.broadinstitute.sting.gatk.walkers; +package org.broadinstitute.sting.gatk.walkers.readutils; import org.broadinstitute.sting.WalkerTest; import org.testng.annotations.DataProvider; diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/PrintReadsLargeScaleTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/readutils/PrintReadsLargeScaleTest.java similarity index 92% rename from public/java/test/org/broadinstitute/sting/gatk/walkers/PrintReadsLargeScaleTest.java rename to public/java/test/org/broadinstitute/sting/gatk/walkers/readutils/PrintReadsLargeScaleTest.java index ad7ac56f9..81a3082a2 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/PrintReadsLargeScaleTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/readutils/PrintReadsLargeScaleTest.java @@ -1,4 +1,4 @@ -package org.broadinstitute.sting.gatk.walkers; +package org.broadinstitute.sting.gatk.walkers.readutils; import org.broadinstitute.sting.WalkerTest; import org.testng.annotations.Test; diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/PrintReadsUnitTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/readutils/PrintReadsUnitTest.java similarity index 94% rename from public/java/test/org/broadinstitute/sting/gatk/walkers/PrintReadsUnitTest.java rename to public/java/test/org/broadinstitute/sting/gatk/walkers/readutils/PrintReadsUnitTest.java index 1aaa00aee..0da3b6b1f 100644 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/PrintReadsUnitTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/readutils/PrintReadsUnitTest.java @@ -1,4 +1,4 @@ -package org.broadinstitute.sting.gatk.walkers; +package org.broadinstitute.sting.gatk.walkers.readutils; import net.sf.samtools.SAMFileHeader; import net.sf.samtools.SAMRecord; @@ -59,7 +59,7 @@ public class PrintReadsUnitTest extends BaseTest { private ReferenceContext bases = null; //private ReferenceContext ref = new ReferenceContext() - PrintReads walker; + org.broadinstitute.sting.gatk.walkers.readutils.PrintReads walker; ArtificialSAMFileWriter writer; @BeforeMethod @@ -67,7 +67,7 @@ public class PrintReadsUnitTest extends BaseTest { trav = new ArtificialReadsTraversal(); readTotal = ( ( trav.endingChr - trav.startingChr ) + 1 ) * trav.readsPerChr + trav.unMappedReads; - walker = new PrintReads(); + walker = new org.broadinstitute.sting.gatk.walkers.readutils.PrintReads(); writer = new ArtificialSAMFileWriter(); walker.out = writer; walker.initialize();