From 1bc26f69e97f111c1e4f3429b74b1c5f70038b27 Mon Sep 17 00:00:00 2001 From: hanna Date: Mon, 19 Apr 2010 23:00:08 +0000 Subject: [PATCH] An attempt to cleanup the Utils directory. Email to follow. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3198 348d0f76-0448-11de-a6fe-93d51630548a --- .../alignment/AlignmentValidationWalker.java | 25 +- .../sting/alignment/AlignmentWalker.java | 25 +- .../alignment/CountBestAlignmentsWalker.java | 25 +- .../AnalysisDataManager.java | 26 +- .../analyzecovariates/AnalyzeCovariates.java | 58 ++- .../cmdLine => commandline}/Argument.java | 25 +- .../sting/commandline/ArgumentCollection.java | 43 ++ .../ArgumentDefinition.java | 15 +- .../ArgumentDefinitionGroup.java | 25 +- .../ArgumentDefinitions.java | 42 +- .../sting/commandline/ArgumentException.java | 36 ++ .../ArgumentMatches.java | 40 +- .../ArgumentSource.java | 14 +- .../ArgumentTypeDescriptor.java | 15 +- .../CommandLineProgram.java | 42 +- .../CommandLineUtils.java | 28 +- .../EnumerationArgumentDefault.java | 63 +++ .../ParsingEngine.java | 43 +- .../ParsingMethod.java | 25 +- .../sting/commandline/package-info.java | 27 ++ .../sting/gatk/CommandLineExecutable.java | 56 ++- .../sting/gatk/CommandLineGATK.java | 46 ++- .../{utils => gatk}/GATKErrorReport.java | 26 +- .../sting/gatk/GenomeAnalysisEngine.java | 16 +- .../sting/gatk/WalkerManager.java | 16 +- .../arguments/GATKArgumentCollection.java | 42 +- .../gatk/arguments/ValidationExclusion.java | 41 +- .../sting/gatk/datasources/BAMFileStat.java | 31 +- .../providers/RODMetaDataContainer.java | 25 +- .../datasources/providers/RodLocusView.java | 38 +- .../datasources/shards/IntervalSharder.java | 24 ++ .../sting/gatk/executive/Accumulator.java | 39 +- .../sting/gatk/filters/FilterManager.java | 25 +- .../filters/MappingQualityReadFilter.java | 13 +- .../gatk/filters/MaxReadLengthFilter.java | 25 +- .../sting/gatk/filters/Platform454Filter.java | 15 +- .../sting/gatk/filters/PlatformFilter.java | 17 +- .../filters/PlatformUnitFilterHelper.java | 27 +- .../filters/ReadGroupBlackListFilter.java | 27 +- .../sting/gatk/filters/SampleFilter.java | 25 +- .../gatk/filters/SingleReadGroupFilter.java | 26 +- .../sting/gatk/io/OutputTracker.java | 40 +- .../GenotypeWriterArgumentTypeDescriptor.java | 35 +- .../OutputStreamArgumentTypeDescriptor.java | 14 +- .../SAMFileReaderArgumentTypeDescriptor.java | 18 +- .../SAMFileWriterArgumentTypeDescriptor.java | 14 +- .../sting/gatk/refdata/AnnotatorROD.java | 27 +- .../sting/gatk/refdata/BeagleROD.java | 27 +- .../sting/gatk/refdata/RODRecordIterator.java | 29 +- .../sting/gatk/refdata/RodGLF.java | 32 +- .../sting/gatk/refdata/SAMPileupRecord.java | 28 +- .../sting/gatk/refdata/TabularROD.java | 29 +- .../gatk/refdata/tracks/RMDTrackManager.java | 14 +- .../builders/TribbleRMDTrackBuilder.java | 14 +- .../sting/gatk/walkers/ClipReadsWalker.java | 26 +- .../gatk/walkers/FixBAMSortOrderTag.java | 25 +- .../sting/gatk/walkers/PileupWalker.java | 15 +- .../sting/gatk/walkers/PrintReadsWalker.java | 50 ++- .../gatk/walkers/SplitSamFileWalker.java | 20 +- .../sting/gatk/walkers/VariantsToVCF.java | 25 +- .../sting/gatk/walkers/Walker.java | 25 +- .../gatk/walkers/annotator/AlleleBalance.java | 27 +- .../walkers/annotator/HaplotypeScore.java | 24 ++ .../walkers/annotator/SecondBaseSkew.java | 25 +- .../walkers/annotator/VariantAnnotator.java | 29 +- .../annotator/VariantAnnotatorEngine.java | 25 +- .../concordance/CallsetConcordanceWalker.java | 29 +- .../coverage/CoarseCoverageWalker.java | 25 +- .../coverage/DepthOfCoverageWalker.java | 27 +- .../gatk/walkers/fasta/BamToFastqWalker.java | 25 +- .../fasta/FastaAlternateReferenceWalker.java | 25 +- .../walkers/fasta/FastaReferenceWalker.java | 27 +- .../filters/VariantFiltrationWalker.java | 25 +- .../DiploidGenotypeCalculationModel.java | 24 ++ .../genotyper/DiploidGenotypePriors.java | 25 +- .../genotyper/UnifiedArgumentCollection.java | 14 +- .../walkers/genotyper/UnifiedGenotyper.java | 14 +- .../genotyper/UnifiedGenotyperEngine.java | 14 +- .../indels/IndelGenotyperV2Walker.java | 28 +- .../gatk/walkers/indels/IndelRealigner.java | 31 +- .../indels/RealignerTargetCreator.java | 25 +- .../gatk/walkers/qc/CountRodByRefWalker.java | 32 +- .../sting/gatk/walkers/qc/CountRodWalker.java | 27 +- .../walkers/qc/ValidatingPileupWalker.java | 25 +- .../recalibration/CovariateCounterWalker.java | 55 +-- .../recalibration/RecalDataManager.java | 34 +- .../RecalibrationArgumentCollection.java | 20 +- .../TableRecalibrationWalker.java | 70 ++-- .../walkers/sequenom/PickSequenomProbes.java | 25 +- .../sequenom/SequenomValidationConverter.java | 25 +- .../varianteval/VariantEvalWalker.java | 31 +- .../varianteval/VariantQualityScore.java | 50 ++- .../ClassicGenotypeLikelihoods.java | 31 +- .../multisamplecaller/MultiSampleCaller.java | 34 +- ...seTransitionTableCalculatorJavaWalker.java | 26 +- .../oneoffprojects/walkers/DSBWalkerV3.java | 26 +- .../walkers/IOCrusherWalker.java | 29 +- .../walkers/IndelErrorRateWalker.java | 29 +- .../PairedQualityScoreCountsWalker.java | 27 +- .../walkers/QualityScoreByStrandWalker.java | 27 +- .../walkers/ReadErrorRateWalker.java | 26 +- .../walkers/ReadQualityScoreWalker.java | 50 ++- .../oneoffprojects/walkers/ReplaceQuals.java | 27 +- .../walkers/TestReadFishingWalker.java | 27 +- .../walkers/TestVariantContextWalker.java | 25 +- .../walkers/ValidateDbSNPConversion.java | 25 +- .../ProportionOfNonrefBasesSupportingSNP.java | 25 +- ...oportionOfRefSecondBasesSupportingSNP.java | 25 +- ...oportionOfSNPSecondBasesSupportingRef.java | 25 +- .../MultiSampleConcordanceWalker.java | 25 +- .../vcftools/BeagleTrioToVCFWalker.java | 25 +- .../vcftools/SimpleVCFIntersectWalker.java | 25 +- .../walkers/vcftools/VCFToBeagleWalker.java | 25 +- .../AnalyzeConcordance.java | 33 +- .../CalculateAlleleLikelihoodsWalker.java | 25 +- .../CalculateBaseLikelihoodsWalker.java | 27 +- .../CalculatePhaseLikelihoodsWalker.java | 25 +- .../gatk/walkers/HLAcaller/CallHLAWalker.java | 27 +- .../HLAcaller/CreatePedFileWalker.java | 25 +- .../HLAcaller/FindClosestAlleleWalker.java | 25 +- .../gatk/walkers/LocusMismatchWalker.java | 25 +- .../walkers/SnpCallRateByCoverageWalker.java | 33 +- .../gatk/walkers/TrioGenotyperWalker.java | 27 +- .../walkers/annotator/GenomicAnnotator.java | 27 +- .../FindContaminatingReadGroupsWalker.java | 25 +- .../diagnostics/ComputeConfusionMatrix.java | 25 +- .../gatk/walkers/diagnostics/SNPDensity.java | 27 +- .../duplicates/CombineDuplicatesWalker.java | 25 +- .../duplicates/CountDuplicatesWalker.java | 14 +- .../graphalign/GraphReferenceAssessor.java | 40 +- .../graphalign/GraphReferenceBuilder.java | 25 +- .../CoverageAcrossBaitsWalker.java | 27 +- .../HybSelPerformanceWalker.java | 27 +- .../papergenotyper/GATKPaperGenotyper.java | 29 +- .../poolseq/PowerBelowFrequencyWalker.java | 30 +- .../playground/gatk/walkers/poolseq/Quad.java | 25 +- .../gatk/walkers/poolseq/ReadOffsetQuad.java | 25 +- .../gatk/walkers/qc/CountPairsWalker.java | 25 +- .../AnalyzeAnnotationsWalker.java | 50 ++- .../ApplyVariantClustersWalker.java | 51 ++- .../VariantConcordanceROCCurveWalker.java | 54 ++- .../variantoptimizer/VariantDataManager.java | 24 +- .../VariantGaussianMixtureModel.java | 54 ++- .../variantoptimizer/VariantOptimizer.java | 52 ++- .../gatk/walkers/vcftools/VCFCombine.java | 27 +- .../walkers/vcftools/VCFSelectWalker.java | 25 +- .../walkers/vcftools/VCFSubsetWalker.java | 25 +- .../sting/playground/tools/PairMaker.java | 27 +- .../playground/tools/RemapAlignments.java | 25 +- .../tools/vcf/GenotypeConcordance.java | 38 +- .../playground/tools/vcf/VCFApplyCuts.java | 39 +- .../playground/tools/vcf/VCFCallRates.java | 37 +- .../playground/tools/vcf/VCFHomogenizer.java | 30 +- .../sting/playground/tools/vcf/VCFMerge.java | 39 +- .../playground/tools/vcf/VCFOptimize.java | 39 +- .../tools/vcf/VCFSequenomAnalysis.java | 35 +- .../tools/vcf/VCFSequenomAnalysis2.java | 34 +- .../sting/playground/tools/vcf/VCFTool.java | 32 +- .../sting/playground/utils/GenomicMap.java | 26 +- .../playground/utils/ParallelSAMIterator.java | 25 +- .../sting/playground/utils/PoolUtils.java | 27 +- .../sting/playground/utils/ProcessUtils.java | 29 +- .../utils/report/templates/TableFormat.java | 29 +- .../sting/utils/GenomeLocParser.java | 51 ++- .../broadinstitute/sting/utils/ListUtils.java | 155 -------- .../broadinstitute/sting/utils/MathUtils.java | 373 ++++++++++++++++++ .../sting/utils/SWPairwiseAlignment.java | 25 ++ .../sting/utils/SampleUtils.java | 24 ++ .../org/broadinstitute/sting/utils/Utils.java | 303 ++------------ .../sting/utils/WilcoxonRankSum.java | 25 ++ .../utils/{ => classloader}/JVMUtils.java | 27 +- .../utils/{ => classloader}/PackageUtils.java | 26 +- .../{ => classloader}/PluginManager.java | 28 +- .../utils/cmdLine/ArgumentCollection.java | 37 -- .../utils/cmdLine/ArgumentException.java | 13 - .../cmdLine/EnumerationArgumentDefault.java | 40 -- .../sting/utils/cmdLine/package-info.java | 4 - .../{ => collections}/CircularArray.java | 27 +- .../{ => collections}/ExpandingArrayList.java | 25 +- .../{ => collections}/MergingIterator.java | 27 +- .../{ => collections}/NestedHashMap.java | 20 +- .../sting/utils/{ => collections}/Pair.java | 25 +- .../{ => collections}/PrimitivePair.java | 25 +- .../sting/utils/duplicates/DupUtils.java | 26 +- .../sting/utils/genotype/DiploidGenotype.java | 27 +- .../sting/utils/genotype/vcf/VCFUtils.java | 25 +- .../sting/utils/help/ApplicationDetails.java | 16 +- .../sting/utils/help/HelpFormatter.java | 44 ++- .../help/ResourceBundleExtractorDoclet.java | 25 +- .../pileup/ReadBackedExtendedEventPileup.java | 25 +- .../sting/utils/{ => sam}/AlignmentUtils.java | 27 +- .../utils/{ => sam}/ComparableSAMRecord.java | 29 +- .../sting/utils/sam/ReadUtils.java | 112 ++++++ .../utils/{ => text}/TextFormattingUtils.java | 26 +- .../{xReadLines.java => text/XReadLines.java} | 43 +- .../org/broadinstitute/sting/WalkerTest.java | 25 +- .../ParsingEngineUnitTest.java | 39 +- .../variantcontext/AlleleUnitTest.java | 26 +- .../TraverseDuplicatesUnitTest.java | 24 +- .../sting/utils/ListUtilsUnitTest.java | 59 --- .../sting/utils/MathUtilsUnitTest.java | 67 ++++ .../ExpandingArrayListUnitTest.java | 27 +- 202 files changed, 4984 insertions(+), 1744 deletions(-) rename java/src/org/broadinstitute/sting/{utils/cmdLine => commandline}/Argument.java (65%) create mode 100755 java/src/org/broadinstitute/sting/commandline/ArgumentCollection.java rename java/src/org/broadinstitute/sting/{utils/cmdLine => commandline}/ArgumentDefinition.java (92%) rename java/src/org/broadinstitute/sting/{utils/cmdLine => commandline}/ArgumentDefinitionGroup.java (64%) rename java/src/org/broadinstitute/sting/{utils/cmdLine => commandline}/ArgumentDefinitions.java (85%) create mode 100755 java/src/org/broadinstitute/sting/commandline/ArgumentException.java rename java/src/org/broadinstitute/sting/{utils/cmdLine => commandline}/ArgumentMatches.java (91%) rename java/src/org/broadinstitute/sting/{utils/cmdLine => commandline}/ArgumentSource.java (94%) rename java/src/org/broadinstitute/sting/{utils/cmdLine => commandline}/ArgumentTypeDescriptor.java (98%) rename java/src/org/broadinstitute/sting/{utils/cmdLine => commandline}/CommandLineProgram.java (92%) rename java/src/org/broadinstitute/sting/{utils/cmdLine => commandline}/CommandLineUtils.java (58%) create mode 100644 java/src/org/broadinstitute/sting/commandline/EnumerationArgumentDefault.java rename java/src/org/broadinstitute/sting/{utils/cmdLine => commandline}/ParsingEngine.java (94%) rename java/src/org/broadinstitute/sting/{utils/cmdLine => commandline}/ParsingMethod.java (72%) create mode 100644 java/src/org/broadinstitute/sting/commandline/package-info.java rename java/src/org/broadinstitute/sting/{utils => gatk}/GATKErrorReport.java (68%) delete mode 100644 java/src/org/broadinstitute/sting/utils/ListUtils.java rename java/src/org/broadinstitute/sting/utils/{ => classloader}/JVMUtils.java (78%) rename java/src/org/broadinstitute/sting/utils/{ => classloader}/PackageUtils.java (66%) rename java/src/org/broadinstitute/sting/utils/{ => classloader}/PluginManager.java (76%) delete mode 100755 java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentCollection.java delete mode 100755 java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentException.java delete mode 100644 java/src/org/broadinstitute/sting/utils/cmdLine/EnumerationArgumentDefault.java delete mode 100644 java/src/org/broadinstitute/sting/utils/cmdLine/package-info.java rename java/src/org/broadinstitute/sting/utils/{ => collections}/CircularArray.java (84%) rename java/src/org/broadinstitute/sting/utils/{ => collections}/ExpandingArrayList.java (52%) rename java/src/org/broadinstitute/sting/utils/{ => collections}/MergingIterator.java (77%) rename java/src/org/broadinstitute/sting/utils/{ => collections}/NestedHashMap.java (86%) rename java/src/org/broadinstitute/sting/utils/{ => collections}/Pair.java (63%) rename java/src/org/broadinstitute/sting/utils/{ => collections}/PrimitivePair.java (83%) rename java/src/org/broadinstitute/sting/utils/{ => sam}/AlignmentUtils.java (90%) rename java/src/org/broadinstitute/sting/utils/{ => sam}/ComparableSAMRecord.java (52%) create mode 100644 java/src/org/broadinstitute/sting/utils/sam/ReadUtils.java rename java/src/org/broadinstitute/sting/utils/{ => text}/TextFormattingUtils.java (73%) rename java/src/org/broadinstitute/sting/utils/{xReadLines.java => text/XReadLines.java} (69%) mode change 100755 => 100644 rename java/test/org/broadinstitute/sting/{utils/cmdLine => commandline}/ParsingEngineUnitTest.java (94%) delete mode 100644 java/test/org/broadinstitute/sting/utils/ListUtilsUnitTest.java rename java/test/org/broadinstitute/sting/utils/{ => collections}/ExpandingArrayListUnitTest.java (76%) diff --git a/java/src/org/broadinstitute/sting/alignment/AlignmentValidationWalker.java b/java/src/org/broadinstitute/sting/alignment/AlignmentValidationWalker.java index dcbd9a82f..a625926ae 100644 --- a/java/src/org/broadinstitute/sting/alignment/AlignmentValidationWalker.java +++ b/java/src/org/broadinstitute/sting/alignment/AlignmentValidationWalker.java @@ -1,10 +1,33 @@ +/* + * 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.alignment; import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker; import org.broadinstitute.sting.gatk.walkers.ReadWalker; import org.broadinstitute.sting.utils.BaseUtils; import org.broadinstitute.sting.utils.StingException; -import org.broadinstitute.sting.utils.cmdLine.Argument; +import org.broadinstitute.sting.commandline.Argument; import org.broadinstitute.sting.alignment.bwa.c.BWACAligner; import org.broadinstitute.sting.alignment.bwa.BWAConfiguration; import org.broadinstitute.sting.alignment.bwa.BWTFiles; diff --git a/java/src/org/broadinstitute/sting/alignment/AlignmentWalker.java b/java/src/org/broadinstitute/sting/alignment/AlignmentWalker.java index 214b34d38..9393accb7 100644 --- a/java/src/org/broadinstitute/sting/alignment/AlignmentWalker.java +++ b/java/src/org/broadinstitute/sting/alignment/AlignmentWalker.java @@ -1,7 +1,30 @@ +/* + * 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.alignment; import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker; -import org.broadinstitute.sting.utils.cmdLine.Argument; +import org.broadinstitute.sting.commandline.Argument; import org.broadinstitute.sting.gatk.walkers.ReadWalker; import org.broadinstitute.sting.gatk.walkers.WalkerName; import org.broadinstitute.sting.alignment.bwa.c.BWACAligner; diff --git a/java/src/org/broadinstitute/sting/alignment/CountBestAlignmentsWalker.java b/java/src/org/broadinstitute/sting/alignment/CountBestAlignmentsWalker.java index 8e8dc617d..bc8e71d4a 100644 --- a/java/src/org/broadinstitute/sting/alignment/CountBestAlignmentsWalker.java +++ b/java/src/org/broadinstitute/sting/alignment/CountBestAlignmentsWalker.java @@ -1,3 +1,26 @@ +/* + * 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.alignment; import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker; @@ -5,7 +28,7 @@ import org.broadinstitute.sting.gatk.walkers.ReadWalker; import org.broadinstitute.sting.alignment.bwa.BWTFiles; import org.broadinstitute.sting.alignment.bwa.BWAConfiguration; import org.broadinstitute.sting.alignment.bwa.c.BWACAligner; -import org.broadinstitute.sting.utils.cmdLine.Argument; +import org.broadinstitute.sting.commandline.Argument; import net.sf.samtools.SAMRecord; import java.util.*; diff --git a/java/src/org/broadinstitute/sting/analyzecovariates/AnalysisDataManager.java b/java/src/org/broadinstitute/sting/analyzecovariates/AnalysisDataManager.java index 8f7b6aa5d..c89406fc7 100755 --- a/java/src/org/broadinstitute/sting/analyzecovariates/AnalysisDataManager.java +++ b/java/src/org/broadinstitute/sting/analyzecovariates/AnalysisDataManager.java @@ -1,35 +1,33 @@ -package org.broadinstitute.sting.analyzecovariates; - -import org.broadinstitute.sting.gatk.walkers.recalibration.RecalDatum; -import org.broadinstitute.sting.utils.NestedHashMap; - -import java.util.ArrayList; - /* - * Copyright (c) 2009 The Broad Institute - * + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +package org.broadinstitute.sting.analyzecovariates; + +import org.broadinstitute.sting.gatk.walkers.recalibration.RecalDatum; +import org.broadinstitute.sting.utils.collections.NestedHashMap; + +import java.util.ArrayList; + /** * Created by IntelliJ IDEA. * User: rpoplin diff --git a/java/src/org/broadinstitute/sting/analyzecovariates/AnalyzeCovariates.java b/java/src/org/broadinstitute/sting/analyzecovariates/AnalyzeCovariates.java index 8c437d285..072e157cd 100755 --- a/java/src/org/broadinstitute/sting/analyzecovariates/AnalyzeCovariates.java +++ b/java/src/org/broadinstitute/sting/analyzecovariates/AnalyzeCovariates.java @@ -1,10 +1,33 @@ +/* + * 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.analyzecovariates; import org.broadinstitute.sting.gatk.walkers.recalibration.*; -import org.broadinstitute.sting.utils.PackageUtils; -import org.broadinstitute.sting.utils.xReadLines; -import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram; -import org.broadinstitute.sting.utils.cmdLine.Argument; +import org.broadinstitute.sting.utils.classloader.PackageUtils; +import org.broadinstitute.sting.utils.text.XReadLines; +import org.broadinstitute.sting.commandline.CommandLineProgram; +import org.broadinstitute.sting.commandline.Argument; import java.util.ArrayList; import java.util.List; @@ -12,31 +35,6 @@ import java.util.Map; import java.util.regex.Pattern; import java.io.*; -/* - * 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. - */ - /** * Created by IntelliJ IDEA. * User: rpoplin @@ -120,7 +118,7 @@ class AnalyzeCovariatesCLP extends CommandLineProgram { requestedCovariates = new ArrayList(); try { - for ( String line : new xReadLines(new File( RECAL_FILE )) ) { + for ( String line : new XReadLines(new File( RECAL_FILE )) ) { lineNumber++; if( COMMENT_PATTERN.matcher(line).matches() || OLD_RECALIBRATOR_HEADER.matcher(line).matches()) { ; // Skip over the comment lines, (which start with '#') diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/Argument.java b/java/src/org/broadinstitute/sting/commandline/Argument.java similarity index 65% rename from java/src/org/broadinstitute/sting/utils/cmdLine/Argument.java rename to java/src/org/broadinstitute/sting/commandline/Argument.java index cd157439d..c8775d933 100755 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/Argument.java +++ b/java/src/org/broadinstitute/sting/commandline/Argument.java @@ -1,4 +1,27 @@ -package org.broadinstitute.sting.utils.cmdLine; +/* + * 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.commandline; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/java/src/org/broadinstitute/sting/commandline/ArgumentCollection.java b/java/src/org/broadinstitute/sting/commandline/ArgumentCollection.java new file mode 100755 index 000000000..8ed125155 --- /dev/null +++ b/java/src/org/broadinstitute/sting/commandline/ArgumentCollection.java @@ -0,0 +1,43 @@ +/* + * 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.commandline; + +import java.lang.annotation.*; + +/** + * @author aaron + * @version 1.0 + * @date May 8, 2009 + *

+ * @interface ArgumentCollection + *

+ * This object represents an class, that is a collection of arguments. + */ +@Documented +@Inherited +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD}) +public @interface ArgumentCollection { + +} diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentDefinition.java b/java/src/org/broadinstitute/sting/commandline/ArgumentDefinition.java similarity index 92% rename from java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentDefinition.java rename to java/src/org/broadinstitute/sting/commandline/ArgumentDefinition.java index 5de20f7d9..e6ee45aee 100644 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentDefinition.java +++ b/java/src/org/broadinstitute/sting/commandline/ArgumentDefinition.java @@ -1,34 +1,31 @@ /* - * Copyright (c) 2009 The Broad Institute - * + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package org.broadinstitute.sting.utils.cmdLine; +package org.broadinstitute.sting.commandline; import org.broadinstitute.sting.utils.Utils; import java.util.List; -import java.util.Collections; /** * A specific argument definition. Maps one-to-one with a field in some class. diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentDefinitionGroup.java b/java/src/org/broadinstitute/sting/commandline/ArgumentDefinitionGroup.java similarity index 64% rename from java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentDefinitionGroup.java rename to java/src/org/broadinstitute/sting/commandline/ArgumentDefinitionGroup.java index 8d2c761da..e8c155c2a 100644 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentDefinitionGroup.java +++ b/java/src/org/broadinstitute/sting/commandline/ArgumentDefinitionGroup.java @@ -1,4 +1,27 @@ -package org.broadinstitute.sting.utils.cmdLine; +/* + * 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.commandline; import org.broadinstitute.sting.utils.StingException; diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentDefinitions.java b/java/src/org/broadinstitute/sting/commandline/ArgumentDefinitions.java similarity index 85% rename from java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentDefinitions.java rename to java/src/org/broadinstitute/sting/commandline/ArgumentDefinitions.java index 591aac460..e4a29e347 100755 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentDefinitions.java +++ b/java/src/org/broadinstitute/sting/commandline/ArgumentDefinitions.java @@ -1,29 +1,35 @@ -package org.broadinstitute.sting.utils.cmdLine; +/* + * 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.commandline; import org.broadinstitute.sting.utils.StingException; import java.util.Set; import java.util.HashSet; import java.util.Collection; -import java.util.List; -import java.util.ArrayList; import java.util.Iterator; -import java.util.Collections; -/** - * Created by IntelliJ IDEA. - * User: mhanna - * Date: May 3, 2009 - * Time: 6:02:04 PM - *

- * The Broad Institute - * SOFTWARE COPYRIGHT NOTICE AGREEMENT - * This software and its documentation are copyright 2009 by the - * Broad Institute/Massachusetts Institute of Technology. All rights are reserved. - *

- * This software is supplied without any warranty or guaranteed support whatsoever. Neither - * the Broad Institute nor MIT can be responsible for its use, misuse, or functionality. - */ /** * A collection of argument definitions. */ diff --git a/java/src/org/broadinstitute/sting/commandline/ArgumentException.java b/java/src/org/broadinstitute/sting/commandline/ArgumentException.java new file mode 100755 index 000000000..3a335fb9c --- /dev/null +++ b/java/src/org/broadinstitute/sting/commandline/ArgumentException.java @@ -0,0 +1,36 @@ +/* + * 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.commandline; + +import org.broadinstitute.sting.utils.StingException; + +/** + * Generic class for handling misc parsing exceptions. + */ +public class ArgumentException extends StingException { + public ArgumentException( String message ) { + super( message ); + } +} + diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentMatches.java b/java/src/org/broadinstitute/sting/commandline/ArgumentMatches.java similarity index 91% rename from java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentMatches.java rename to java/src/org/broadinstitute/sting/commandline/ArgumentMatches.java index c5e61db1f..7776d2fc1 100755 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentMatches.java +++ b/java/src/org/broadinstitute/sting/commandline/ArgumentMatches.java @@ -1,21 +1,29 @@ -package org.broadinstitute.sting.utils.cmdLine; - -import java.util.*; -/** - * Created by IntelliJ IDEA. - * User: mhanna - * Date: May 3, 2009 - * Time: 6:36:43 PM - *

- * The Broad Institute - * SOFTWARE COPYRIGHT NOTICE AGREEMENT - * This software and its documentation are copyright 2009 by the - * Broad Institute/Massachusetts Institute of Technology. All rights are reserved. - *

- * This software is supplied without any warranty or guaranteed support whatsoever. Neither - * the Broad Institute nor MIT can be responsible for its use, misuse, or functionality. +/* + * 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.commandline; + +import java.util.*; /** * Represents a list of potential matches between the arguments defined * by the argument sources and the arguments passed in via the command line. diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentSource.java b/java/src/org/broadinstitute/sting/commandline/ArgumentSource.java similarity index 94% rename from java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentSource.java rename to java/src/org/broadinstitute/sting/commandline/ArgumentSource.java index acf69d7e1..d3ebf59c7 100644 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentSource.java +++ b/java/src/org/broadinstitute/sting/commandline/ArgumentSource.java @@ -1,29 +1,27 @@ /* - * Copyright (c) 2009 The Broad Institute - * + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package org.broadinstitute.sting.utils.cmdLine; +package org.broadinstitute.sting.commandline; import java.lang.reflect.Field; import java.util.Collection; diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentTypeDescriptor.java b/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java similarity index 98% rename from java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentTypeDescriptor.java rename to java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java index 0ebf632ee..6deb8c2ab 100644 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentTypeDescriptor.java +++ b/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java @@ -1,34 +1,31 @@ /* - * Copyright (c) 2009 The Broad Institute - * + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package org.broadinstitute.sting.utils.cmdLine; +package org.broadinstitute.sting.commandline; import org.broadinstitute.sting.utils.StingException; import org.apache.log4j.Logger; -import java.lang.annotation.Annotation; import java.lang.reflect.*; import java.util.*; diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/CommandLineProgram.java b/java/src/org/broadinstitute/sting/commandline/CommandLineProgram.java similarity index 92% rename from java/src/org/broadinstitute/sting/utils/cmdLine/CommandLineProgram.java rename to java/src/org/broadinstitute/sting/commandline/CommandLineProgram.java index fb568a5a9..17d195a5e 100644 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/CommandLineProgram.java +++ b/java/src/org/broadinstitute/sting/commandline/CommandLineProgram.java @@ -1,4 +1,27 @@ -package org.broadinstitute.sting.utils.cmdLine; +/* + * 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.commandline; import org.apache.log4j.*; import org.broadinstitute.sting.utils.help.ApplicationDetails; @@ -12,23 +35,6 @@ import java.util.Collections; import java.util.EnumSet; import java.util.Enumeration; -/** - * User: aaron - * Date: Mar 19, 2009 - * Time: 3:54:56 PM - *

- * The Broad Institute - * SOFTWARE COPYRIGHT NOTICE AGREEMENT - * This software and its documentation are copyright 2009 by the - * Broad Institute/Massachusetts Institute of Technology. All rights are reserved. - *

- * This software is supplied without any warranty or guaranteed support whatsoever. Neither - * the Broad Institute nor MIT can be responsible for its use, misuse, or functionality. - *

- *

- * This class is our implementation of the command line parser, similar to Pickard's. We instead - * support GNU style command line arguments, and use this class to setup the global parser. - */ public abstract class CommandLineProgram { /** The command-line program and the arguments it returned. */ diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/CommandLineUtils.java b/java/src/org/broadinstitute/sting/commandline/CommandLineUtils.java similarity index 58% rename from java/src/org/broadinstitute/sting/utils/cmdLine/CommandLineUtils.java rename to java/src/org/broadinstitute/sting/commandline/CommandLineUtils.java index 069446694..3755863af 100644 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/CommandLineUtils.java +++ b/java/src/org/broadinstitute/sting/commandline/CommandLineUtils.java @@ -1,12 +1,34 @@ -package org.broadinstitute.sting.utils.cmdLine; +/* + * 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. + */ -import org.broadinstitute.sting.utils.JVMUtils; +package org.broadinstitute.sting.commandline; + +import org.broadinstitute.sting.utils.classloader.JVMUtils; import java.util.Map; import java.util.List; import java.util.LinkedHashMap; import java.util.Collection; -import java.lang.reflect.Field; /** * Static utility methods for working with command-line arguments. diff --git a/java/src/org/broadinstitute/sting/commandline/EnumerationArgumentDefault.java b/java/src/org/broadinstitute/sting/commandline/EnumerationArgumentDefault.java new file mode 100644 index 000000000..ab9366daf --- /dev/null +++ b/java/src/org/broadinstitute/sting/commandline/EnumerationArgumentDefault.java @@ -0,0 +1,63 @@ +/* + * 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.commandline; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @author aaron + *

+ * Annotation EnumerationArgumentDefault + *

+ * Allows the default argument value to be set for an enum; this allows us to treat enums as + * booleans on the command line. I.e. + * + * if we're using an enum Shape, + * + * enum shape { + * SQUARE, + * CIRCLE, + * @EnumerationArgumentDefault + * TRIANGLE + * } + * + * and a command line option -shape, the EnumerationArgumentDefault would allow you to say: + * -shape + * or + * -shape TRIANGLE + * + * would get -shape set to TRIANGLE, where: + * + * -shape SQUARE + * + * would set shape to SQUARE + * + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface EnumerationArgumentDefault { +} diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/ParsingEngine.java b/java/src/org/broadinstitute/sting/commandline/ParsingEngine.java similarity index 94% rename from java/src/org/broadinstitute/sting/utils/cmdLine/ParsingEngine.java rename to java/src/org/broadinstitute/sting/commandline/ParsingEngine.java index 83408f8aa..efd87fd91 100755 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/ParsingEngine.java +++ b/java/src/org/broadinstitute/sting/commandline/ParsingEngine.java @@ -1,8 +1,31 @@ -package org.broadinstitute.sting.utils.cmdLine; +/* + * 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.commandline; import org.broadinstitute.sting.utils.StingException; -import org.broadinstitute.sting.utils.Pair; -import org.broadinstitute.sting.utils.JVMUtils; +import org.broadinstitute.sting.utils.collections.Pair; +import org.broadinstitute.sting.utils.classloader.JVMUtils; import org.broadinstitute.sting.utils.Utils; import org.broadinstitute.sting.utils.help.ApplicationDetails; import org.broadinstitute.sting.utils.help.HelpFormatter; @@ -11,20 +34,6 @@ import org.apache.log4j.Logger; import java.lang.reflect.*; import java.util.*; -/** - * Created by IntelliJ IDEA. - * User: mhanna - * Date: May 3, 2009 - * Time: 4:35:25 PM - * BROAD INSTITUTE SOFTWARE COPYRIGHT NOTICE AND AGREEMENT - * Software and documentation are copyright 2005 by the Broad Institute. - * All rights are reserved. - * - * Users acknowledge that this software is supplied without any warranty or support. - * The Broad Institute is not responsible for its use, misuse, or - * functionality. - */ - /** * A parser for Sting command-line arguments. */ diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/ParsingMethod.java b/java/src/org/broadinstitute/sting/commandline/ParsingMethod.java similarity index 72% rename from java/src/org/broadinstitute/sting/utils/cmdLine/ParsingMethod.java rename to java/src/org/broadinstitute/sting/commandline/ParsingMethod.java index 9d4a0b882..1ca0447d0 100755 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/ParsingMethod.java +++ b/java/src/org/broadinstitute/sting/commandline/ParsingMethod.java @@ -1,4 +1,27 @@ -package org.broadinstitute.sting.utils.cmdLine; +/* + * 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.commandline; import java.util.regex.Pattern; import java.util.regex.Matcher; diff --git a/java/src/org/broadinstitute/sting/commandline/package-info.java b/java/src/org/broadinstitute/sting/commandline/package-info.java new file mode 100644 index 000000000..befd8748f --- /dev/null +++ b/java/src/org/broadinstitute/sting/commandline/package-info.java @@ -0,0 +1,27 @@ +/* + * 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. + */ + +/** + * Parses a wide variety of command-line arguments in single-pass and multipass strategies. + */ +package org.broadinstitute.sting.commandline; \ No newline at end of file diff --git a/java/src/org/broadinstitute/sting/gatk/CommandLineExecutable.java b/java/src/org/broadinstitute/sting/gatk/CommandLineExecutable.java index 19de5dd48..8d9ba831b 100644 --- a/java/src/org/broadinstitute/sting/gatk/CommandLineExecutable.java +++ b/java/src/org/broadinstitute/sting/gatk/CommandLineExecutable.java @@ -1,10 +1,33 @@ +/* + * 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; import org.broadinstitute.sting.gatk.arguments.GATKArgumentCollection; -import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram; -import org.broadinstitute.sting.utils.cmdLine.ArgumentTypeDescriptor; +import org.broadinstitute.sting.commandline.CommandLineProgram; +import org.broadinstitute.sting.commandline.ArgumentTypeDescriptor; import org.broadinstitute.sting.utils.StingException; -import org.broadinstitute.sting.utils.xReadLines; +import org.broadinstitute.sting.utils.text.XReadLines; import org.broadinstitute.sting.gatk.walkers.Walker; import org.broadinstitute.sting.gatk.io.stubs.OutputStreamArgumentTypeDescriptor; import org.broadinstitute.sting.gatk.io.stubs.SAMFileWriterArgumentTypeDescriptor; @@ -17,31 +40,6 @@ import java.util.*; import net.sf.picard.filter.SamRecordFilter; -/* - * 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. - */ - /** * @author aaron */ @@ -164,7 +162,7 @@ public abstract class CommandLineExecutable extends CommandLineProgram { for( File inputFile: inputFiles ) { if (inputFile.getName().endsWith(".list") ) { try { - for( String fileName : new xReadLines(inputFile) ) + for( String fileName : new XReadLines(inputFile) ) unpackedReads.add( new File(fileName) ); } catch( FileNotFoundException ex ) { diff --git a/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java b/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java index f535fe0d1..148f2b93d 100755 --- a/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java +++ b/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java @@ -1,32 +1,38 @@ +/* + * 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; import org.broadinstitute.sting.gatk.arguments.GATKArgumentCollection; -import org.broadinstitute.sting.utils.GATKErrorReport; -import org.broadinstitute.sting.utils.TextFormattingUtils; +import org.broadinstitute.sting.gatk.GATKErrorReport; +import org.broadinstitute.sting.utils.text.TextFormattingUtils; import org.broadinstitute.sting.utils.help.ApplicationDetails; -import org.broadinstitute.sting.utils.cmdLine.*; +import org.broadinstitute.sting.commandline.*; import org.broadinstitute.sting.gatk.walkers.Walker; import java.io.PrintStream; import java.util.*; -/** - * - * User: aaron - * Date: May 8, 2009 - * Time: 10:50:58 AM - * - * The Broad Institute - * SOFTWARE COPYRIGHT NOTICE AGREEMENT - * This software and its documentation are copyright 2009 by the - * Broad Institute/Massachusetts Institute of Technology. All rights are reserved. - * - * This software is supplied without any warranty or guaranteed support whatsoever. Neither - * the Broad Institute nor MIT can be responsible for its use, misuse, or functionality. - * - */ - - /** * @author aaron * @version 1.0 diff --git a/java/src/org/broadinstitute/sting/utils/GATKErrorReport.java b/java/src/org/broadinstitute/sting/gatk/GATKErrorReport.java similarity index 68% rename from java/src/org/broadinstitute/sting/utils/GATKErrorReport.java rename to java/src/org/broadinstitute/sting/gatk/GATKErrorReport.java index 8689d9bca..8a3f59db1 100644 --- a/java/src/org/broadinstitute/sting/utils/GATKErrorReport.java +++ b/java/src/org/broadinstitute/sting/gatk/GATKErrorReport.java @@ -1,7 +1,31 @@ -package org.broadinstitute.sting.utils; +/* + * 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; import org.broadinstitute.sting.gatk.CommandLineGATK; import org.broadinstitute.sting.gatk.arguments.GATKArgumentCollection; +import org.broadinstitute.sting.utils.StingException; import org.simpleframework.xml.Element; import org.simpleframework. xml.ElementList; import org.simpleframework.xml.Serializer; diff --git a/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java b/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java index 955c1c8df..287fc0fd4 100755 --- a/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java @@ -1,26 +1,24 @@ /* - * Copyright (c) 2009 The Broad Institute - * + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package org.broadinstitute.sting.gatk; @@ -50,8 +48,8 @@ import org.broadinstitute.sting.gatk.refdata.utils.RMDIntervalGenerator; import org.broadinstitute.sting.gatk.refdata.rodDbSNP; import org.broadinstitute.sting.gatk.walkers.*; import org.broadinstitute.sting.utils.*; -import org.broadinstitute.sting.utils.cmdLine.ArgumentException; -import org.broadinstitute.sting.utils.cmdLine.ArgumentSource; +import org.broadinstitute.sting.commandline.ArgumentException; +import org.broadinstitute.sting.commandline.ArgumentSource; import org.broadinstitute.sting.utils.fasta.IndexedFastaSequenceFile; import java.io.File; diff --git a/java/src/org/broadinstitute/sting/gatk/WalkerManager.java b/java/src/org/broadinstitute/sting/gatk/WalkerManager.java index 3f1161bfd..1be637c5c 100755 --- a/java/src/org/broadinstitute/sting/gatk/WalkerManager.java +++ b/java/src/org/broadinstitute/sting/gatk/WalkerManager.java @@ -1,26 +1,24 @@ /* - * Copyright (c) 2009 The Broad Institute - * + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package org.broadinstitute.sting.gatk; @@ -30,9 +28,9 @@ import org.apache.log4j.Logger; import org.broadinstitute.sting.gatk.filters.FilterManager; import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrack; import org.broadinstitute.sting.gatk.walkers.*; -import org.broadinstitute.sting.utils.PluginManager; +import org.broadinstitute.sting.utils.classloader.PluginManager; import org.broadinstitute.sting.utils.StingException; -import org.broadinstitute.sting.utils.TextFormattingUtils; +import org.broadinstitute.sting.utils.text.TextFormattingUtils; import org.broadinstitute.sting.utils.help.DescriptionTaglet; import org.broadinstitute.sting.utils.help.DisplayNameTaglet; import org.broadinstitute.sting.utils.help.SummaryTaglet; diff --git a/java/src/org/broadinstitute/sting/gatk/arguments/GATKArgumentCollection.java b/java/src/org/broadinstitute/sting/gatk/arguments/GATKArgumentCollection.java index d0932499d..3e293e6f5 100755 --- a/java/src/org/broadinstitute/sting/gatk/arguments/GATKArgumentCollection.java +++ b/java/src/org/broadinstitute/sting/gatk/arguments/GATKArgumentCollection.java @@ -1,9 +1,32 @@ +/* + * 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.arguments; import net.sf.samtools.SAMFileReader; import org.broadinstitute.sting.utils.StingException; import org.broadinstitute.sting.utils.interval.IntervalMergingRule; -import org.broadinstitute.sting.utils.cmdLine.Argument; +import org.broadinstitute.sting.commandline.Argument; import org.simpleframework.xml.*; import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.stream.Format; @@ -17,23 +40,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -/** - * - * User: aaron - * Date: May 7, 2009 - * Time: 11:46:21 AM - * - * The Broad Institute - * SOFTWARE COPYRIGHT NOTICE AGREEMENT - * This software and its documentation are copyright 2009 by the - * Broad Institute/Massachusetts Institute of Technology. All rights are reserved. - * - * This software is supplied without any warranty or guaranteed support whatsoever. Neither - * the Broad Institute nor MIT can be responsible for its use, misuse, or functionality. - * - */ - - /** * @author aaron * @version 1.0 diff --git a/java/src/org/broadinstitute/sting/gatk/arguments/ValidationExclusion.java b/java/src/org/broadinstitute/sting/gatk/arguments/ValidationExclusion.java index 774081b5c..22f2e9abd 100644 --- a/java/src/org/broadinstitute/sting/gatk/arguments/ValidationExclusion.java +++ b/java/src/org/broadinstitute/sting/gatk/arguments/ValidationExclusion.java @@ -1,27 +1,34 @@ +/* + * 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.arguments; -import org.broadinstitute.sting.utils.cmdLine.EnumerationArgumentDefault; +import org.broadinstitute.sting.commandline.EnumerationArgumentDefault; import java.util.ArrayList; import java.util.List; -/** - * The Broad Institute - * SOFTWARE COPYRIGHT NOTICE AGREEMENT - * This software and its documentation are copyright 2009 by the - * Broad Institute/Massachusetts Institute of Technology. All rights are reserved. - *

- * This software is supplied without any warranty or guaranteed support whatsoever. Neither - * the Broad Institute nor MIT can be responsible for its use, misuse, or functionality. - * - * @author aaron - * - * Class ValidationExclusion - * - * a class for containing the exclusions from validation that the user - * wants. - */ public class ValidationExclusion { // our validation options diff --git a/java/src/org/broadinstitute/sting/gatk/datasources/BAMFileStat.java b/java/src/org/broadinstitute/sting/gatk/datasources/BAMFileStat.java index 59f4208fa..8c0e61a12 100644 --- a/java/src/org/broadinstitute/sting/gatk/datasources/BAMFileStat.java +++ b/java/src/org/broadinstitute/sting/gatk/datasources/BAMFileStat.java @@ -1,15 +1,34 @@ +/* + * 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.datasources; -import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram; -import org.broadinstitute.sting.utils.cmdLine.Argument; +import org.broadinstitute.sting.commandline.CommandLineProgram; +import org.broadinstitute.sting.commandline.Argument; import org.broadinstitute.sting.utils.StingException; import java.io.File; -import java.io.IOException; -import java.io.FileInputStream; import java.io.PrintStream; -import java.nio.channels.FileChannel; -import java.util.List; import net.sf.samtools.*; diff --git a/java/src/org/broadinstitute/sting/gatk/datasources/providers/RODMetaDataContainer.java b/java/src/org/broadinstitute/sting/gatk/datasources/providers/RODMetaDataContainer.java index d3b881b3a..0d7fd2577 100644 --- a/java/src/org/broadinstitute/sting/gatk/datasources/providers/RODMetaDataContainer.java +++ b/java/src/org/broadinstitute/sting/gatk/datasources/providers/RODMetaDataContainer.java @@ -1,7 +1,30 @@ +/* + * 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.datasources.providers; import org.broadinstitute.sting.gatk.refdata.utils.GATKFeature; -import org.broadinstitute.sting.utils.Pair; +import org.broadinstitute.sting.utils.collections.Pair; import java.util.*; diff --git a/java/src/org/broadinstitute/sting/gatk/datasources/providers/RodLocusView.java b/java/src/org/broadinstitute/sting/gatk/datasources/providers/RodLocusView.java index 4549b83e1..21f1d4f6d 100644 --- a/java/src/org/broadinstitute/sting/gatk/datasources/providers/RodLocusView.java +++ b/java/src/org/broadinstitute/sting/gatk/datasources/providers/RodLocusView.java @@ -1,3 +1,26 @@ +/* + * 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.datasources.providers; import org.broadinstitute.sting.gatk.refdata.*; @@ -6,26 +29,13 @@ import org.broadinstitute.sting.gatk.contexts.AlignmentContext; import org.broadinstitute.sting.gatk.refdata.utils.LocationAwareSeekableRODIterator; import org.broadinstitute.sting.gatk.refdata.utils.RODRecordList; import org.broadinstitute.sting.utils.GenomeLoc; -import org.broadinstitute.sting.utils.MergingIterator; +import org.broadinstitute.sting.utils.collections.MergingIterator; import org.broadinstitute.sting.utils.GenomeLocParser; import org.broadinstitute.sting.utils.pileup.ReadBackedPileup; import org.broadinstitute.sting.gatk.iterators.LocusOverflowTracker; import java.util.*; -/** - * User: hanna - * Date: May 21, 2009 - * Time: 2:49:17 PM - * BROAD INSTITUTE SOFTWARE COPYRIGHT NOTICE AND AGREEMENT - * Software and documentation are copyright 2005 by the Broad Institute. - * All rights are reserved. - * - * Users acknowledge that this software is supplied without any warranty or support. - * The Broad Institute is not responsible for its use, misuse, or - * functionality. - */ - /** * A view into the reference-ordered data in the provider. */ diff --git a/java/src/org/broadinstitute/sting/gatk/datasources/shards/IntervalSharder.java b/java/src/org/broadinstitute/sting/gatk/datasources/shards/IntervalSharder.java index 16b6934da..57dd6598c 100644 --- a/java/src/org/broadinstitute/sting/gatk/datasources/shards/IntervalSharder.java +++ b/java/src/org/broadinstitute/sting/gatk/datasources/shards/IntervalSharder.java @@ -1,6 +1,30 @@ +/* + * 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.datasources.shards; import org.broadinstitute.sting.utils.*; +import org.broadinstitute.sting.utils.collections.Pair; import org.broadinstitute.sting.gatk.datasources.simpleDataSources.BlockDrivenSAMDataSource; import org.broadinstitute.sting.gatk.datasources.simpleDataSources.SAMReaderID; diff --git a/java/src/org/broadinstitute/sting/gatk/executive/Accumulator.java b/java/src/org/broadinstitute/sting/gatk/executive/Accumulator.java index 03d7a0140..a440f5fe5 100755 --- a/java/src/org/broadinstitute/sting/gatk/executive/Accumulator.java +++ b/java/src/org/broadinstitute/sting/gatk/executive/Accumulator.java @@ -1,31 +1,40 @@ +/* + * 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.executive; import org.broadinstitute.sting.gatk.walkers.Walker; -import org.broadinstitute.sting.gatk.datasources.shards.Shard; import org.broadinstitute.sting.gatk.datasources.providers.ShardDataProvider; import org.broadinstitute.sting.gatk.datasources.providers.LocusShardDataProvider; import org.broadinstitute.sting.gatk.GenomeAnalysisEngine; import org.broadinstitute.sting.utils.GenomeLoc; -import org.broadinstitute.sting.utils.Pair; +import org.broadinstitute.sting.utils.collections.Pair; import org.broadinstitute.sting.utils.GenomeLocSortedSet; import org.broadinstitute.sting.utils.StingException; import java.util.ArrayList; import java.util.List; import java.util.Iterator; -/** - * User: hanna - * Date: May 18, 2009 - * Time: 2:27:17 PM - * BROAD INSTITUTE SOFTWARE COPYRIGHT NOTICE AND AGREEMENT - * Software and documentation are copyright 2005 by the Broad Institute. - * All rights are reserved. - * - * Users acknowledge that this software is supplied without any warranty or support. - * The Broad Institute is not responsible for its use, misuse, or - * functionality. - */ - /** * Manages the */ diff --git a/java/src/org/broadinstitute/sting/gatk/filters/FilterManager.java b/java/src/org/broadinstitute/sting/gatk/filters/FilterManager.java index 956868548..9fd35f6de 100644 --- a/java/src/org/broadinstitute/sting/gatk/filters/FilterManager.java +++ b/java/src/org/broadinstitute/sting/gatk/filters/FilterManager.java @@ -1,7 +1,30 @@ +/* + * 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.filters; import org.apache.log4j.Logger; -import org.broadinstitute.sting.utils.PluginManager; +import org.broadinstitute.sting.utils.classloader.PluginManager; import net.sf.picard.filter.SamRecordFilter; diff --git a/java/src/org/broadinstitute/sting/gatk/filters/MappingQualityReadFilter.java b/java/src/org/broadinstitute/sting/gatk/filters/MappingQualityReadFilter.java index 77e4ebb30..5f499eada 100755 --- a/java/src/org/broadinstitute/sting/gatk/filters/MappingQualityReadFilter.java +++ b/java/src/org/broadinstitute/sting/gatk/filters/MappingQualityReadFilter.java @@ -1,32 +1,31 @@ /* - * Copyright (c) 2009 The Broad Institute + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package org.broadinstitute.sting.gatk.filters; import net.sf.picard.filter.SamRecordFilter; import net.sf.samtools.SAMRecord; -import org.broadinstitute.sting.utils.cmdLine.Argument; +import org.broadinstitute.sting.commandline.Argument; /** * Filter out reads with low mapping qualities. diff --git a/java/src/org/broadinstitute/sting/gatk/filters/MaxReadLengthFilter.java b/java/src/org/broadinstitute/sting/gatk/filters/MaxReadLengthFilter.java index 598794d82..f4d9f1f4c 100644 --- a/java/src/org/broadinstitute/sting/gatk/filters/MaxReadLengthFilter.java +++ b/java/src/org/broadinstitute/sting/gatk/filters/MaxReadLengthFilter.java @@ -1,8 +1,31 @@ +/* + * 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.filters; import net.sf.picard.filter.SamRecordFilter; import net.sf.samtools.SAMRecord; -import org.broadinstitute.sting.utils.cmdLine.Argument; +import org.broadinstitute.sting.commandline.Argument; /** * Filters out reads whose length is >= some value. diff --git a/java/src/org/broadinstitute/sting/gatk/filters/Platform454Filter.java b/java/src/org/broadinstitute/sting/gatk/filters/Platform454Filter.java index e5b78e8a6..1c0a264fd 100755 --- a/java/src/org/broadinstitute/sting/gatk/filters/Platform454Filter.java +++ b/java/src/org/broadinstitute/sting/gatk/filters/Platform454Filter.java @@ -1,25 +1,24 @@ /* - * Copyright (c) 2009 The Broad Institute + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package org.broadinstitute.sting.gatk.filters; @@ -27,7 +26,7 @@ package org.broadinstitute.sting.gatk.filters; import net.sf.picard.filter.SamRecordFilter; import net.sf.samtools.SAMRecord; -import org.broadinstitute.sting.utils.Utils; +import org.broadinstitute.sting.utils.sam.ReadUtils; /** * Filter out 454 reads. @@ -38,6 +37,6 @@ import org.broadinstitute.sting.utils.Utils; public class Platform454Filter implements SamRecordFilter { public boolean filterOut(SAMRecord rec) { - return (Utils.is454Read(rec)); + return (ReadUtils.is454Read(rec)); } } \ No newline at end of file diff --git a/java/src/org/broadinstitute/sting/gatk/filters/PlatformFilter.java b/java/src/org/broadinstitute/sting/gatk/filters/PlatformFilter.java index d4dff6b68..c6ba6582d 100755 --- a/java/src/org/broadinstitute/sting/gatk/filters/PlatformFilter.java +++ b/java/src/org/broadinstitute/sting/gatk/filters/PlatformFilter.java @@ -1,25 +1,24 @@ /* - * Copyright (c) 2009 The Broad Institute + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package org.broadinstitute.sting.gatk.filters; @@ -27,8 +26,8 @@ package org.broadinstitute.sting.gatk.filters; import net.sf.picard.filter.SamRecordFilter; import net.sf.samtools.SAMRecord; -import org.broadinstitute.sting.utils.Utils; -import org.broadinstitute.sting.utils.cmdLine.Argument; +import org.broadinstitute.sting.utils.sam.ReadUtils; +import org.broadinstitute.sting.commandline.Argument; /** * Filter out PL matching reads. @@ -42,7 +41,7 @@ public class PlatformFilter implements SamRecordFilter { public boolean filterOut(SAMRecord rec) { for ( String name : PLFilterNames ) - if ( Utils.isPlatformRead(rec, name.toUpperCase() )) + if ( ReadUtils.isPlatformRead(rec, name.toUpperCase() )) return true; return false; } diff --git a/java/src/org/broadinstitute/sting/gatk/filters/PlatformUnitFilterHelper.java b/java/src/org/broadinstitute/sting/gatk/filters/PlatformUnitFilterHelper.java index 922d0fa4e..a610d94f4 100644 --- a/java/src/org/broadinstitute/sting/gatk/filters/PlatformUnitFilterHelper.java +++ b/java/src/org/broadinstitute/sting/gatk/filters/PlatformUnitFilterHelper.java @@ -1,6 +1,29 @@ +/* + * 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.filters; -import org.broadinstitute.sting.utils.xReadLines; +import org.broadinstitute.sting.utils.text.XReadLines; import org.broadinstitute.sting.utils.StingException; import java.io.File; @@ -46,7 +69,7 @@ public class PlatformUnitFilterHelper { if ( f.exists() ) { try { - xReadLines reader = new xReadLines(f); + XReadLines reader = new XReadLines(f); for ( String line : reader ) { if ( EMPTYLINE_PATTERN.matcher(line).matches() ) continue; // skip empty lines PlatformUnitFilter.addBlackListedLane(line); // PlatformUnitFilter will trim the line as needed diff --git a/java/src/org/broadinstitute/sting/gatk/filters/ReadGroupBlackListFilter.java b/java/src/org/broadinstitute/sting/gatk/filters/ReadGroupBlackListFilter.java index 28102852c..76fac437d 100644 --- a/java/src/org/broadinstitute/sting/gatk/filters/ReadGroupBlackListFilter.java +++ b/java/src/org/broadinstitute/sting/gatk/filters/ReadGroupBlackListFilter.java @@ -1,3 +1,26 @@ +/* + * 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.filters; import java.util.*; @@ -9,7 +32,7 @@ import net.sf.picard.filter.SamRecordFilter; import net.sf.samtools.SAMRecord; import net.sf.samtools.SAMReadGroupRecord; import org.broadinstitute.sting.utils.StingException; -import org.broadinstitute.sting.utils.xReadLines; +import org.broadinstitute.sting.utils.text.XReadLines; /** * Removes records matching the read group tag and match string. @@ -57,7 +80,7 @@ public class ReadGroupBlackListFilter implements SamRecordFilter { File file = new File(filter); try { int lineNum = 0; - xReadLines lines = new xReadLines(file); + XReadLines lines = new XReadLines(file); for (String line : lines) { lineNum++; diff --git a/java/src/org/broadinstitute/sting/gatk/filters/SampleFilter.java b/java/src/org/broadinstitute/sting/gatk/filters/SampleFilter.java index ee6a56f28..cdca1692f 100755 --- a/java/src/org/broadinstitute/sting/gatk/filters/SampleFilter.java +++ b/java/src/org/broadinstitute/sting/gatk/filters/SampleFilter.java @@ -1,9 +1,32 @@ +/* + * 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.filters; import net.sf.picard.filter.SamRecordFilter; import net.sf.samtools.SAMRecord; import net.sf.samtools.SAMReadGroupRecord; -import org.broadinstitute.sting.utils.cmdLine.Argument; +import org.broadinstitute.sting.commandline.Argument; public class SampleFilter implements SamRecordFilter { @Argument(fullName = "sample_to_keep", shortName = "goodSM", doc="The name of the sample to keep, filtering out all others", required=true) diff --git a/java/src/org/broadinstitute/sting/gatk/filters/SingleReadGroupFilter.java b/java/src/org/broadinstitute/sting/gatk/filters/SingleReadGroupFilter.java index 56d054b3a..2559386f2 100755 --- a/java/src/org/broadinstitute/sting/gatk/filters/SingleReadGroupFilter.java +++ b/java/src/org/broadinstitute/sting/gatk/filters/SingleReadGroupFilter.java @@ -1,35 +1,33 @@ -package org.broadinstitute.sting.gatk.filters; - -import net.sf.samtools.SAMRecord; -import net.sf.samtools.SAMReadGroupRecord; -import net.sf.picard.filter.SamRecordFilter; -import org.broadinstitute.sting.utils.cmdLine.Argument; - /* - * Copyright (c) 2009 The Broad Institute - * + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +package org.broadinstitute.sting.gatk.filters; + +import net.sf.samtools.SAMRecord; +import net.sf.samtools.SAMReadGroupRecord; +import net.sf.picard.filter.SamRecordFilter; +import org.broadinstitute.sting.commandline.Argument; + /** * Created by IntelliJ IDEA. * User: rpoplin diff --git a/java/src/org/broadinstitute/sting/gatk/io/OutputTracker.java b/java/src/org/broadinstitute/sting/gatk/io/OutputTracker.java index a79c02261..64c0723d4 100755 --- a/java/src/org/broadinstitute/sting/gatk/io/OutputTracker.java +++ b/java/src/org/broadinstitute/sting/gatk/io/OutputTracker.java @@ -1,8 +1,31 @@ +/* + * 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.io; -import org.broadinstitute.sting.utils.JVMUtils; +import org.broadinstitute.sting.utils.classloader.JVMUtils; import org.broadinstitute.sting.utils.StingException; -import org.broadinstitute.sting.utils.cmdLine.ArgumentSource; +import org.broadinstitute.sting.commandline.ArgumentSource; import org.broadinstitute.sting.utils.sam.SAMFileReaderBuilder; import org.broadinstitute.sting.gatk.walkers.Walker; import org.broadinstitute.sting.gatk.GenomeAnalysisEngine; @@ -17,19 +40,6 @@ import java.lang.reflect.Field; import java.util.Map; import java.util.HashMap; -/** - * User: hanna - * Date: Apr 30, 2009 - * Time: 9:40:09 AM - * BROAD INSTITUTE SOFTWARE COPYRIGHT NOTICE AND AGREEMENT - * Software and documentation are copyright 2005 by the Broad Institute. - * All rights are reserved. - * - * Users acknowledge that this software is supplied without any warranty or support. - * The Broad Institute is not responsible for its use, misuse, or - * functionality. - */ - /** * Manages the output and err streams that are created specifically for walker * output. diff --git a/java/src/org/broadinstitute/sting/gatk/io/stubs/GenotypeWriterArgumentTypeDescriptor.java b/java/src/org/broadinstitute/sting/gatk/io/stubs/GenotypeWriterArgumentTypeDescriptor.java index 67c15dec5..4a0e976ee 100644 --- a/java/src/org/broadinstitute/sting/gatk/io/stubs/GenotypeWriterArgumentTypeDescriptor.java +++ b/java/src/org/broadinstitute/sting/gatk/io/stubs/GenotypeWriterArgumentTypeDescriptor.java @@ -1,10 +1,33 @@ +/* + * 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.io.stubs; -import org.broadinstitute.sting.utils.cmdLine.ArgumentTypeDescriptor; -import org.broadinstitute.sting.utils.cmdLine.ArgumentSource; -import org.broadinstitute.sting.utils.cmdLine.ArgumentMatches; -import org.broadinstitute.sting.utils.cmdLine.ArgumentDefinition; -import org.broadinstitute.sting.utils.cmdLine.Argument; +import org.broadinstitute.sting.commandline.ArgumentTypeDescriptor; +import org.broadinstitute.sting.commandline.ArgumentSource; +import org.broadinstitute.sting.commandline.ArgumentMatches; +import org.broadinstitute.sting.commandline.ArgumentDefinition; +import org.broadinstitute.sting.commandline.Argument; import org.broadinstitute.sting.utils.StingException; import org.broadinstitute.sting.utils.genotype.GenotypeWriter; import org.broadinstitute.sting.utils.genotype.GenotypeWriterFactory; @@ -14,8 +37,6 @@ import java.io.File; import java.util.List; import java.util.Arrays; -import net.sf.samtools.SAMFileReader; - /** * Injects new command-line arguments into the system providing support for the genotype writer. * diff --git a/java/src/org/broadinstitute/sting/gatk/io/stubs/OutputStreamArgumentTypeDescriptor.java b/java/src/org/broadinstitute/sting/gatk/io/stubs/OutputStreamArgumentTypeDescriptor.java index 1e6a8fec5..4fe703420 100644 --- a/java/src/org/broadinstitute/sting/gatk/io/stubs/OutputStreamArgumentTypeDescriptor.java +++ b/java/src/org/broadinstitute/sting/gatk/io/stubs/OutputStreamArgumentTypeDescriptor.java @@ -1,31 +1,29 @@ /* - * Copyright (c) 2009 The Broad Institute - * + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package org.broadinstitute.sting.gatk.io.stubs; -import org.broadinstitute.sting.utils.cmdLine.*; +import org.broadinstitute.sting.commandline.*; import org.broadinstitute.sting.utils.StingException; import org.broadinstitute.sting.gatk.GenomeAnalysisEngine; diff --git a/java/src/org/broadinstitute/sting/gatk/io/stubs/SAMFileReaderArgumentTypeDescriptor.java b/java/src/org/broadinstitute/sting/gatk/io/stubs/SAMFileReaderArgumentTypeDescriptor.java index 41bf96c4d..d28aec2af 100644 --- a/java/src/org/broadinstitute/sting/gatk/io/stubs/SAMFileReaderArgumentTypeDescriptor.java +++ b/java/src/org/broadinstitute/sting/gatk/io/stubs/SAMFileReaderArgumentTypeDescriptor.java @@ -1,33 +1,31 @@ /* - * Copyright (c) 2009 The Broad Institute - * + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package org.broadinstitute.sting.gatk.io.stubs; -import org.broadinstitute.sting.utils.cmdLine.ArgumentTypeDescriptor; -import org.broadinstitute.sting.utils.cmdLine.ArgumentSource; -import org.broadinstitute.sting.utils.cmdLine.ArgumentMatches; +import org.broadinstitute.sting.commandline.ArgumentTypeDescriptor; +import org.broadinstitute.sting.commandline.ArgumentSource; +import org.broadinstitute.sting.commandline.ArgumentMatches; import org.broadinstitute.sting.utils.sam.SAMFileReaderBuilder; import org.broadinstitute.sting.utils.StingException; import org.broadinstitute.sting.gatk.GenomeAnalysisEngine; diff --git a/java/src/org/broadinstitute/sting/gatk/io/stubs/SAMFileWriterArgumentTypeDescriptor.java b/java/src/org/broadinstitute/sting/gatk/io/stubs/SAMFileWriterArgumentTypeDescriptor.java index d3baeed6f..209ed66e0 100644 --- a/java/src/org/broadinstitute/sting/gatk/io/stubs/SAMFileWriterArgumentTypeDescriptor.java +++ b/java/src/org/broadinstitute/sting/gatk/io/stubs/SAMFileWriterArgumentTypeDescriptor.java @@ -1,31 +1,29 @@ /* - * Copyright (c) 2009 The Broad Institute - * + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package org.broadinstitute.sting.gatk.io.stubs; -import org.broadinstitute.sting.utils.cmdLine.*; +import org.broadinstitute.sting.commandline.*; import org.broadinstitute.sting.utils.StingException; import org.broadinstitute.sting.gatk.GenomeAnalysisEngine; import org.broadinstitute.sting.gatk.io.StingSAMFileWriter; diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/AnnotatorROD.java b/java/src/org/broadinstitute/sting/gatk/refdata/AnnotatorROD.java index cdb75fade..0d8313b34 100755 --- a/java/src/org/broadinstitute/sting/gatk/refdata/AnnotatorROD.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/AnnotatorROD.java @@ -1,3 +1,26 @@ +/* + * 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.refdata; import java.io.File; @@ -8,7 +31,7 @@ import java.util.Arrays; import org.apache.log4j.Logger; import org.broadinstitute.sting.utils.Utils; -import org.broadinstitute.sting.utils.xReadLines; +import org.broadinstitute.sting.utils.text.XReadLines; /** *

@@ -71,7 +94,7 @@ public class AnnotatorROD extends TabularROD {
      */
     public static ArrayList readHeader(final File source) throws FileNotFoundException {
         ArrayList header = null;
-        xReadLines reader = new xReadLines(source);
+        XReadLines reader = new XReadLines(source);
 
         //find the 1st line that's non-empty and not a comment
         for ( String line : reader ) {
diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/BeagleROD.java b/java/src/org/broadinstitute/sting/gatk/refdata/BeagleROD.java
index 60dcc1f36..8ff90401f 100755
--- a/java/src/org/broadinstitute/sting/gatk/refdata/BeagleROD.java
+++ b/java/src/org/broadinstitute/sting/gatk/refdata/BeagleROD.java
@@ -1,8 +1,31 @@
+/*
+ * 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.refdata;
 
 import org.broadinstitute.sting.utils.GenomeLoc;
 import org.broadinstitute.sting.utils.GenomeLocParser;
-import org.broadinstitute.sting.utils.xReadLines;
+import org.broadinstitute.sting.utils.text.XReadLines;
 
 import java.util.*;
 import java.util.regex.Matcher;
@@ -39,7 +62,7 @@ public class BeagleROD extends BasicReferenceOrderedDatum {
     }
 
     public Object initialize(final File source) throws FileNotFoundException {
-        String firstLine = new xReadLines(source).next();
+        String firstLine = new XReadLines(source).next();
         String[] parts = firstLine.split(" ");
         if ( parts[0].equals("I") ) {
             // I id NA12891 NA12891 NA12892 NA12892
diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/RODRecordIterator.java b/java/src/org/broadinstitute/sting/gatk/refdata/RODRecordIterator.java
index ba7867b24..c4f10ba6f 100644
--- a/java/src/org/broadinstitute/sting/gatk/refdata/RODRecordIterator.java
+++ b/java/src/org/broadinstitute/sting/gatk/refdata/RODRecordIterator.java
@@ -1,8 +1,30 @@
+/*
+ * 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.refdata;
 
-import org.broadinstitute.sting.utils.xReadLines;
+import org.broadinstitute.sting.utils.text.XReadLines;
 import org.broadinstitute.sting.utils.Utils;
-import org.broadinstitute.sting.utils.MalformedGenomeLocException;
 import org.broadinstitute.sting.utils.StingException;
 import org.broadinstitute.sting.gatk.iterators.PushbackIterator;
 
@@ -10,7 +32,6 @@ import java.util.Iterator;
 import java.util.regex.Pattern;
 import java.io.FileNotFoundException;
 import java.io.File;
-import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Constructor;
 
@@ -89,7 +110,7 @@ public class RODRecordIterator implements Ite
 
     public RODRecordIterator(File file, String name, Class type) {
         try {
-            reader = new PushbackIterator(new xReadLines(file));
+            reader = new PushbackIterator(new XReadLines(file));
         } catch (FileNotFoundException e) {
             Utils.scareUser("Couldn't open file: " + file);
         }
diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/RodGLF.java b/java/src/org/broadinstitute/sting/gatk/refdata/RodGLF.java
index 2bd5f09d1..e5b2026db 100644
--- a/java/src/org/broadinstitute/sting/gatk/refdata/RodGLF.java
+++ b/java/src/org/broadinstitute/sting/gatk/refdata/RodGLF.java
@@ -1,9 +1,29 @@
+/*
+ * 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.refdata;
 
-import org.broadinstitute.sting.utils.GenomeLoc;
-import org.broadinstitute.sting.utils.GenomeLocParser;
-import org.broadinstitute.sting.utils.StingException;
-import org.broadinstitute.sting.utils.Utils;
+import org.broadinstitute.sting.utils.*;
 import org.broadinstitute.sting.utils.genotype.LikelihoodObject;
 import org.broadinstitute.sting.utils.genotype.glf.GLFReader;
 import org.broadinstitute.sting.utils.genotype.glf.GLFRecord;
@@ -208,7 +228,7 @@ public class RodGLF implements VariationRod, Iterator {
      * @return a GENOTYPE object representing the nth best genotype
      */
     public LikelihoodObject.GENOTYPE getBestGenotype(int nthBest) {
-        Integer[] sorted = Utils.SortPermutation(((GLFSingleCall) mRecord).getLikelihoods());
+        Integer[] sorted = MathUtils.sortPermutation(((GLFSingleCall) mRecord).getLikelihoods());
         return LikelihoodObject.GENOTYPE.values()[sorted[nthBest - 1]];
     }
 
@@ -221,7 +241,7 @@ public class RodGLF implements VariationRod, Iterator {
      * @return a GENOTYPE object representing the nth best genotype
      */
     public double getBestGenotypeValue(int nthBest) {
-        Integer[] sorted = Utils.SortPermutation(((GLFSingleCall) mRecord).getLikelihoods());
+        Integer[] sorted = MathUtils.sortPermutation(((GLFSingleCall) mRecord).getLikelihoods());
         return (((GLFSingleCall) mRecord).getLikelihoods())[sorted[nthBest - 1]];
     }
 
diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/SAMPileupRecord.java b/java/src/org/broadinstitute/sting/gatk/refdata/SAMPileupRecord.java
index 6bc7ae95b..52ac72928 100644
--- a/java/src/org/broadinstitute/sting/gatk/refdata/SAMPileupRecord.java
+++ b/java/src/org/broadinstitute/sting/gatk/refdata/SAMPileupRecord.java
@@ -1,3 +1,26 @@
+/*
+ * 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.refdata;
 
 
@@ -7,6 +30,7 @@ import java.util.regex.Pattern;
 import java.util.regex.Matcher;
 
 import org.broadinstitute.sting.utils.*;
+import org.broadinstitute.sting.utils.text.XReadLines;
 
 import net.sf.picard.reference.ReferenceSequenceFileWalker;
 import net.sf.samtools.util.StringUtil;
@@ -567,7 +591,7 @@ public class SAMPileupRecord {
 	protected static class pileupFileIterator implements Iterator {
 //		private String fieldDelimiter = new String("\t");
 		private String rodName = null;
-		private xReadLines parser = null;
+		private XReadLines parser = null;
 		private String lastProcessedLine = null;
 		
 //		private long z = 0;
@@ -575,7 +599,7 @@ public class SAMPileupRecord {
 		
 		pileupFileIterator(String name, java.io.File f) {
 			try {
-				parser = new xReadLines(f);
+				parser = new XReadLines(f);
 			} catch ( FileNotFoundException e ) {
 				Utils.scareUser("Couldn't open file: " + f);
 			}
diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/TabularROD.java b/java/src/org/broadinstitute/sting/gatk/refdata/TabularROD.java
index 28224b017..cdadd3967 100755
--- a/java/src/org/broadinstitute/sting/gatk/refdata/TabularROD.java
+++ b/java/src/org/broadinstitute/sting/gatk/refdata/TabularROD.java
@@ -1,3 +1,26 @@
+/*
+ * 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.refdata;
 
 import java.util.*;
@@ -9,7 +32,7 @@ import java.io.IOException;
 
 import org.broadinstitute.sting.utils.GenomeLoc;
 import org.broadinstitute.sting.utils.Utils;
-import org.broadinstitute.sting.utils.xReadLines;
+import org.broadinstitute.sting.utils.text.XReadLines;
 import org.broadinstitute.sting.utils.GenomeLocParser;
 import org.apache.log4j.Logger;
 
@@ -176,7 +199,7 @@ public class TabularROD extends BasicReferenceOrderedDatum implements Map readHeader(final File source) throws FileNotFoundException {
         ArrayList header = null;
         int linesLookedAt = 0;
-        xReadLines reader = new xReadLines(source);
+        XReadLines reader = new XReadLines(source);
 
         for ( String line : reader ) {
             Matcher m = HEADER_PATTERN.matcher(line);
@@ -198,7 +221,7 @@ public class TabularROD extends BasicReferenceOrderedDatum implements Map();
             int tokens = reader.next().split(DELIMITER_REGEX).length;
             for ( int i = 0; i < tokens; i++)
diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackManager.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackManager.java
index 4e32a6ce4..eb4f83003 100644
--- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackManager.java
+++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/RMDTrackManager.java
@@ -1,31 +1,31 @@
 /*
- * Copyright (c) 2010.  The Broad Institute
+ * 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
+ * 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,
+ *
+ * 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.
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
 package org.broadinstitute.sting.gatk.refdata.tracks;
 
 import org.broadinstitute.sting.gatk.refdata.tracks.builders.RMDTrackBuilder;
 import org.broadinstitute.sting.gatk.refdata.utils.RMDTriplet;
-import org.broadinstitute.sting.utils.PluginManager;
+import org.broadinstitute.sting.utils.classloader.PluginManager;
 import org.broadinstitute.sting.utils.StingException;
 
 import java.io.File;
diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java
index 494dfb87e..84877d283 100644
--- a/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java
+++ b/java/src/org/broadinstitute/sting/gatk/refdata/tracks/builders/TribbleRMDTrackBuilder.java
@@ -1,24 +1,24 @@
 /*
- * Copyright (c) 2010.  The Broad Institute
+ * 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
+ * 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,
+ *
+ * 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.
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
 package org.broadinstitute.sting.gatk.refdata.tracks.builders;
@@ -31,7 +31,7 @@ import org.broad.tribble.index.LinearIndexCreator;
 import org.broadinstitute.sting.gatk.refdata.tracks.FeatureReaderTrack;
 import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrack;
 import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrackCreationException;
-import org.broadinstitute.sting.utils.PluginManager;
+import org.broadinstitute.sting.utils.classloader.PluginManager;
 import org.broadinstitute.sting.utils.StingException;
 
 import java.io.File;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/ClipReadsWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/ClipReadsWalker.java
index 46c37bfee..fa986fb66 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/ClipReadsWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/ClipReadsWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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;
 
 import net.sf.samtools.*;
@@ -5,8 +28,9 @@ import net.sf.picard.reference.ReferenceSequenceFileFactory;
 import net.sf.picard.reference.ReferenceSequenceFile;
 import net.sf.picard.reference.ReferenceSequence;
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.*;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.gatk.io.StingSAMFileWriter;
 
 import java.util.*;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/FixBAMSortOrderTag.java b/java/src/org/broadinstitute/sting/gatk/walkers/FixBAMSortOrderTag.java
index 77edb62ee..3fdacf91c 100644
--- a/java/src/org/broadinstitute/sting/gatk/walkers/FixBAMSortOrderTag.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/FixBAMSortOrderTag.java
@@ -1,3 +1,26 @@
+/*
+ * 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;
 
 /*  Motivation: BAM files created by samtools which are sorted often don't
@@ -14,7 +37,7 @@ package org.broadinstitute.sting.gatk.walkers;
 
 import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import net.sf.samtools.SAMFileWriter;
 import net.sf.samtools.SAMRecord;
 import net.sf.samtools.SAMFileHeader;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/PileupWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/PileupWalker.java
index f0c47edb8..f0937454b 100644
--- a/java/src/org/broadinstitute/sting/gatk/walkers/PileupWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/PileupWalker.java
@@ -1,25 +1,24 @@
 /*
- * Copyright (c) 2009 The Broad Institute
+ * 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
+ * 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,
+ * 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.
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
 package org.broadinstitute.sting.gatk.walkers;
@@ -30,9 +29,9 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.refdata.ReferenceOrderedDatum;
 import org.broadinstitute.sting.gatk.refdata.rodDbSNP;
 import org.broadinstitute.sting.gatk.refdata.utils.GATKFeature;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.Utils;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.pileup.ReadBackedExtendedEventPileup;
 import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
 
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/PrintReadsWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/PrintReadsWalker.java
index 54b50e20b..84dbc3ccb 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/PrintReadsWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/PrintReadsWalker.java
@@ -1,35 +1,33 @@
+/*
+ * 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;
 
 import net.sf.samtools.SAMFileWriter;
 import net.sf.samtools.SAMReadGroupRecord;
 import net.sf.samtools.SAMRecord;
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-
-/*
- * 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.commandline.Argument;
 
 /**
  * Renders, in SAM/BAM format, all reads from the input data set in the order in which they appear
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/SplitSamFileWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/SplitSamFileWalker.java
index 12da6a695..0c15b34c8 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/SplitSamFileWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/SplitSamFileWalker.java
@@ -1,34 +1,32 @@
 /*
- * Copyright (c) 2009 The Broad Institute
- *
+ * 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
+ * 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,
+ * 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.
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
 package org.broadinstitute.sting.gatk.walkers;
 
 import net.sf.samtools.*;
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-import org.broadinstitute.sting.utils.*;
+import org.broadinstitute.sting.commandline.Argument;
+import org.broadinstitute.sting.utils.sam.ReadUtils;
 import org.apache.log4j.Logger;
 
 import java.util.*;
@@ -73,7 +71,7 @@ public class SplitSamFileWalker extends ReadWalker readGroups = new ArrayList();
                 header.setReadGroups(readGroups);
@@ -91,7 +89,7 @@ public class SplitSamFileWalker extends ReadWalker bases on the reference, or on the subset of the reference
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageWalker.java
index d591abaaa..20d670404 100644
--- a/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/coverage/DepthOfCoverageWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.coverage;
 
 import net.sf.samtools.SAMReadGroupRecord;
@@ -17,9 +40,9 @@ import org.broadinstitute.sting.gatk.walkers.LocusWalker;
 import org.broadinstitute.sting.gatk.walkers.TreeReducible;
 import org.broadinstitute.sting.utils.BaseUtils;
 import org.broadinstitute.sting.utils.GenomeLoc;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.StingException;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.io.File;
 import java.io.IOException;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/fasta/BamToFastqWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/fasta/BamToFastqWalker.java
index 55252c543..d040afd5c 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/fasta/BamToFastqWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/fasta/BamToFastqWalker.java
@@ -1,10 +1,33 @@
+/*
+ * 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.fasta;
 
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.ReadWalker;
 import org.broadinstitute.sting.gatk.walkers.WalkerName;
 import org.broadinstitute.sting.utils.BaseUtils;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import net.sf.samtools.SAMRecord;
 
 import java.io.*;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaAlternateReferenceWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaAlternateReferenceWalker.java
index 3a90c6ad6..001226302 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaAlternateReferenceWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaAlternateReferenceWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.fasta;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -6,7 +29,7 @@ import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContext;
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.*;
 import org.broadinstitute.sting.utils.GenomeLoc;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 
 
 /**
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaReferenceWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaReferenceWalker.java
index 3024cf4fe..472b02a2f 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaReferenceWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/fasta/FastaReferenceWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.fasta;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -7,8 +30,8 @@ import org.broadinstitute.sting.gatk.walkers.RefWalker;
 import org.broadinstitute.sting.gatk.walkers.WalkerName;
 import org.broadinstitute.sting.utils.GenomeLoc;
 import org.broadinstitute.sting.utils.GenomeLocParser;
-import org.broadinstitute.sting.utils.Pair;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.utils.collections.Pair;
+import org.broadinstitute.sting.commandline.Argument;
 
 /**
  * Renders a new reference in FASTA format consisting of only those loci provided in the input data set.  Has optional
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java
index 3064ddd55..2cd80e133 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.filters;
 
 import org.apache.commons.jexl.Expression;
@@ -13,7 +36,7 @@ import org.broadinstitute.sting.gatk.refdata.VariantContextAdaptors;
 import org.broadinstitute.sting.gatk.walkers.RMD;
 import org.broadinstitute.sting.gatk.walkers.Requires;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
 import java.util.*;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidGenotypeCalculationModel.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidGenotypeCalculationModel.java
index 50c18498d..1d9ef03ad 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidGenotypeCalculationModel.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidGenotypeCalculationModel.java
@@ -1,6 +1,30 @@
+/*
+ * 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.genotyper;
 
 import org.broadinstitute.sting.utils.*;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.genotype.DiploidGenotype;
 import org.broadinstitute.sting.utils.genotype.CalledGenotype;
 import org.broadinstitute.sting.utils.genotype.vcf.VCFGenotypeRecord;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidGenotypePriors.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidGenotypePriors.java
index be8ca8316..644a6c6ac 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidGenotypePriors.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/DiploidGenotypePriors.java
@@ -1,3 +1,26 @@
+/*
+ * 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.genotyper;
 
 import org.broadinstitute.sting.utils.Utils;
@@ -260,7 +283,7 @@ public class DiploidGenotypePriors {
         double[] priors = new double[DiploidGenotype.values().length];
 
         for ( DiploidGenotype g : DiploidGenotype.values() ) {
-            int nRefBases = Utils.countOccurrences(ref, g.toString());
+            int nRefBases = MathUtils.countOccurrences(ref, g.toString());
             double log10POfG = 0.0;
 
             switch ( nRefBases ) {
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java
index a322b06b3..4f1d7c004 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedArgumentCollection.java
@@ -1,31 +1,29 @@
 /*
- * Copyright (c) 2009 The Broad Institute
- *
+ * 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
+ * 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,
+ * 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.
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
 package org.broadinstitute.sting.gatk.walkers.genotyper;
 
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 
 public class UnifiedArgumentCollection {
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java
index 85cf55286..45770f5fa 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java
@@ -1,26 +1,24 @@
 /*
- * Copyright (c) 2009 The Broad Institute
- *
+ * 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
+ * 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,
+ * 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.
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
 package org.broadinstitute.sting.gatk.walkers.genotyper;
@@ -31,7 +29,7 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.*;
 import org.broadinstitute.sting.gatk.walkers.annotator.VariantAnnotatorEngine;
 import org.broadinstitute.sting.utils.*;
-import org.broadinstitute.sting.utils.cmdLine.*;
+import org.broadinstitute.sting.commandline.*;
 import org.broadinstitute.sting.utils.genotype.*;
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java
index b475608be..c76917cd5 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyperEngine.java
@@ -1,26 +1,24 @@
 /*
- * Copyright (c) 2009 The Broad Institute
- *
+ * 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
+ * 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,
+ * 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.
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
 package org.broadinstitute.sting.gatk.walkers.genotyper;
@@ -36,7 +34,7 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.refdata.rodDbSNP;
 import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrack;
 import org.broadinstitute.sting.gatk.walkers.annotator.VariantAnnotatorEngine;
-import org.broadinstitute.sting.utils.AlignmentUtils;
+import org.broadinstitute.sting.utils.sam.AlignmentUtils;
 import org.broadinstitute.sting.utils.BaseUtils;
 import org.broadinstitute.sting.utils.SampleUtils;
 import org.broadinstitute.sting.utils.StingException;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelGenotyperV2Walker.java b/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelGenotyperV2Walker.java
index e71cd4d0f..45188ca71 100644
--- a/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelGenotyperV2Walker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelGenotyperV2Walker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.indels;
 
 import net.sf.samtools.Cigar;
@@ -15,7 +38,10 @@ import org.broadinstitute.sting.gatk.refdata.utils.RODRecordList;
 import org.broadinstitute.sting.gatk.walkers.ReadFilters;
 import org.broadinstitute.sting.gatk.walkers.ReadWalker;
 import org.broadinstitute.sting.utils.*;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.utils.sam.AlignmentUtils;
+import org.broadinstitute.sting.utils.collections.CircularArray;
+import org.broadinstitute.sting.utils.collections.PrimitivePair;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.io.IOException;
 import java.util.*;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java b/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java
index 7bedaf894..c15348275 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java
@@ -1,8 +1,30 @@
+/*
+ * 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.indels;
 
 import net.sf.samtools.*;
 import net.sf.samtools.util.StringUtil;
-import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
 import org.broadinstitute.sting.utils.interval.IntervalMergingRule;
 import org.broadinstitute.sting.utils.interval.IntervalUtils;
 import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContext;
@@ -12,7 +34,10 @@ import org.broadinstitute.sting.gatk.refdata.VariantContextAdaptors;
 import org.broadinstitute.sting.gatk.refdata.utils.GATKFeature;
 import org.broadinstitute.sting.gatk.walkers.ReadWalker;
 import org.broadinstitute.sting.utils.*;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.utils.sam.AlignmentUtils;
+import org.broadinstitute.sting.utils.sam.ReadUtils;
+import org.broadinstitute.sting.utils.collections.Pair;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.io.File;
 import java.io.FileWriter;
@@ -251,7 +276,7 @@ public class IndelRealigner extends ReadWalker {
         if ( readLoc.getStop() == 0 )
             readLoc = GenomeLocParser.createGenomeLoc(readLoc.getContig(), readLoc.getStart(), readLoc.getStart());
 
-        if ( readLoc.isBefore(currentInterval) || Utils.is454Read(read) ) {
+        if ( readLoc.isBefore(currentInterval) || ReadUtils.is454Read(read) ) {
             // TODO -- it would be nice if we could use indels from 454 reads as alternate consenses
             emit(read);
             return 0;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/indels/RealignerTargetCreator.java b/java/src/org/broadinstitute/sting/gatk/walkers/indels/RealignerTargetCreator.java
index 88634e8d2..eea429962 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/indels/RealignerTargetCreator.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/indels/RealignerTargetCreator.java
@@ -1,3 +1,26 @@
+/*
+ * 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.indels;
 
 import net.sf.samtools.SAMRecord;
@@ -12,7 +35,7 @@ import org.broadinstitute.sting.gatk.walkers.ReadFilters;
 import org.broadinstitute.sting.utils.GenomeLoc;
 import org.broadinstitute.sting.utils.GenomeLocParser;
 import org.broadinstitute.sting.utils.StingException;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.pileup.ExtendedEventPileupElement;
 import org.broadinstitute.sting.utils.pileup.PileupElement;
 import org.broadinstitute.sting.utils.pileup.ReadBackedExtendedEventPileup;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/qc/CountRodByRefWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/qc/CountRodByRefWalker.java
index d0018d0ed..c29858fbf 100644
--- a/java/src/org/broadinstitute/sting/gatk/walkers/qc/CountRodByRefWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/qc/CountRodByRefWalker.java
@@ -1,14 +1,36 @@
+/*
+ * 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.qc;
 
 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.RefWalker;
-import org.broadinstitute.sting.utils.*;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-
-import java.util.ArrayList;
-import java.util.List;
+import org.broadinstitute.sting.utils.classloader.JVMUtils;
+import org.broadinstitute.sting.utils.collections.ExpandingArrayList;
+import org.broadinstitute.sting.utils.collections.Pair;
+import org.broadinstitute.sting.commandline.Argument;
 
 /**
  * Prints out counts of the number of reference ordered data objects are
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/qc/CountRodWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/qc/CountRodWalker.java
index 7ba31f3a8..67aa0463b 100644
--- a/java/src/org/broadinstitute/sting/gatk/walkers/qc/CountRodWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/qc/CountRodWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.qc;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -6,7 +29,9 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.refdata.utils.RODRecordList;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
 import org.broadinstitute.sting.utils.*;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.utils.collections.ExpandingArrayList;
+import org.broadinstitute.sting.utils.collections.Pair;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/qc/ValidatingPileupWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/qc/ValidatingPileupWalker.java
index f48082b0a..617291160 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/qc/ValidatingPileupWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/qc/ValidatingPileupWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.qc;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -8,7 +31,7 @@ import org.broadinstitute.sting.gatk.refdata.rodSAMPileup;
 import org.broadinstitute.sting.gatk.walkers.*;
 import org.broadinstitute.sting.utils.StingException;
 import org.broadinstitute.sting.utils.Utils;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
 
 import java.util.Arrays;
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/CovariateCounterWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/CovariateCounterWalker.java
index 90d9ec7cc..5993a2af1 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/CovariateCounterWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/CovariateCounterWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.recalibration;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -8,8 +31,11 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.refdata.utils.GATKFeature;
 import org.broadinstitute.sting.gatk.walkers.*;
 import org.broadinstitute.sting.utils.*;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-import org.broadinstitute.sting.utils.cmdLine.ArgumentCollection;
+import org.broadinstitute.sting.utils.classloader.PackageUtils;
+import org.broadinstitute.sting.utils.collections.NestedHashMap;
+import org.broadinstitute.sting.utils.collections.Pair;
+import org.broadinstitute.sting.commandline.Argument;
+import org.broadinstitute.sting.commandline.ArgumentCollection;
 import org.broadinstitute.sting.utils.genotype.Variation;
 import org.broadinstitute.sting.utils.pileup.PileupElement;
 import org.broadinstitute.sting.utils.sam.GATKSAMRecord;
@@ -21,31 +47,6 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
-/*
- * 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.
- */
-
 /**
  * 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.
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalDataManager.java b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalDataManager.java
index b71824051..01b5dd7d4 100644
--- a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalDataManager.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalDataManager.java
@@ -1,38 +1,38 @@
-package org.broadinstitute.sting.gatk.walkers.recalibration;
-
-import org.broadinstitute.sting.utils.sam.GATKSAMRecord;
-import org.broadinstitute.sting.utils.*;
-
-import java.util.*;
-
-import net.sf.samtools.SAMRecord;
-import net.sf.samtools.SAMReadGroupRecord;
-
 /*
- * Copyright (c) 2009 The Broad Institute
- *
+ * 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
+ * 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,
+ * 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.
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+package org.broadinstitute.sting.gatk.walkers.recalibration;
+
+import org.broadinstitute.sting.utils.sam.GATKSAMRecord;
+import org.broadinstitute.sting.utils.sam.AlignmentUtils;
+import org.broadinstitute.sting.utils.*;
+import org.broadinstitute.sting.utils.collections.NestedHashMap;
+
+import java.util.*;
+
+import net.sf.samtools.SAMRecord;
+import net.sf.samtools.SAMReadGroupRecord;
+
 /**
  * Created by IntelliJ IDEA.
  * User: rpoplin
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalibrationArgumentCollection.java b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalibrationArgumentCollection.java
index 16ba62bb9..aad23c492 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalibrationArgumentCollection.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/RecalibrationArgumentCollection.java
@@ -1,32 +1,30 @@
-package org.broadinstitute.sting.gatk.walkers.recalibration;
-
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-
 /*
- * Copyright (c) 2009 The Broad Institute
- *
+ * 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
+ * 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,
+ * 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.
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+package org.broadinstitute.sting.gatk.walkers.recalibration;
+
+import org.broadinstitute.sting.commandline.Argument;
+
 /**
  * Created by IntelliJ IDEA.
  * User: rpoplin
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/TableRecalibrationWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/TableRecalibrationWalker.java
index 8a7d7cbaf..7e9089526 100644
--- a/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/TableRecalibrationWalker.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/recalibration/TableRecalibrationWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.recalibration;
 
 import java.io.File;
@@ -24,46 +47,21 @@ 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.JVMUtils;
-import org.broadinstitute.sting.utils.NestedHashMap;
-import org.broadinstitute.sting.utils.PackageUtils;
+import org.broadinstitute.sting.utils.classloader.JVMUtils;
+import org.broadinstitute.sting.utils.classloader.PackageUtils;
+import org.broadinstitute.sting.utils.collections.NestedHashMap;
 import org.broadinstitute.sting.utils.QualityUtils;
 import org.broadinstitute.sting.utils.StingException;
-import org.broadinstitute.sting.utils.TextFormattingUtils;
+import org.broadinstitute.sting.utils.text.TextFormattingUtils;
 import org.broadinstitute.sting.utils.Utils;
-import org.broadinstitute.sting.utils.xReadLines;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-import org.broadinstitute.sting.utils.cmdLine.ArgumentCollection;
-import org.broadinstitute.sting.utils.cmdLine.ArgumentDefinition;
-import org.broadinstitute.sting.utils.cmdLine.ArgumentSource;
-import org.broadinstitute.sting.utils.cmdLine.ArgumentTypeDescriptor;
+import org.broadinstitute.sting.utils.text.XReadLines;
+import org.broadinstitute.sting.commandline.Argument;
+import org.broadinstitute.sting.commandline.ArgumentCollection;
+import org.broadinstitute.sting.commandline.ArgumentDefinition;
+import org.broadinstitute.sting.commandline.ArgumentSource;
+import org.broadinstitute.sting.commandline.ArgumentTypeDescriptor;
 import org.broadinstitute.sting.utils.sam.GATKSAMRecord;
 
-/*
- * 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.
- */
-
 /**
  * This walker is designed to work as the second pass in a two-pass processing step, doing a by-read traversal.
 
@@ -165,7 +163,7 @@ public class TableRecalibrationWalker extends ReadWalker {
 
         int n = 1;
         try {
-            for ( String line : new xReadLines(rsIDFile) ) {
+            for ( String line : new XReadLines(rsIDFile) ) {
                 String parts[] = line.split(" ");
                 if ( parts.length != 2 )
                     throw new StingException("Invalid rsID / build pair at " + n + " line = " + line );
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantQualityScore.java b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantQualityScore.java
index 895a1c115..f46004fe4 100755
--- a/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantQualityScore.java
+++ b/java/src/org/broadinstitute/sting/gatk/walkers/varianteval/VariantQualityScore.java
@@ -1,3 +1,26 @@
+/*
+ * 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.varianteval;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -8,36 +31,11 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.playground.utils.report.tags.Analysis;
 import org.broadinstitute.sting.playground.utils.report.tags.DataPoint;
 import org.broadinstitute.sting.playground.utils.report.utils.TableType;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 
-/*
- * 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.
- */
-
 /**
  * @author rpoplin
  * @since Apr 6, 2010
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/multisamplecaller/ClassicGenotypeLikelihoods.java b/java/src/org/broadinstitute/sting/oneoffprojects/multisamplecaller/ClassicGenotypeLikelihoods.java
index b69f3b62c..58758a108 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/multisamplecaller/ClassicGenotypeLikelihoods.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/multisamplecaller/ClassicGenotypeLikelihoods.java
@@ -1,6 +1,29 @@
+/*
+ * 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.oneoffprojects.multisamplecaller;
 
-import org.broadinstitute.sting.utils.Utils;
+import org.broadinstitute.sting.utils.MathUtils;
 
 import static java.lang.Math.log10;
 import static java.lang.Math.pow;
@@ -309,15 +332,15 @@ public class ClassicGenotypeLikelihoods implements Cloneable {
     }
 
     public void sort() {
-        Integer[] permutation = Utils.SortPermutation(likelihoods);
+        Integer[] permutation = MathUtils.sortPermutation(likelihoods);
 
         Integer[] reverse_permutation = new Integer[permutation.length];
         for (int i = 0; i < reverse_permutation.length; i++) {
             reverse_permutation[i] = permutation[(permutation.length - 1) - i];
         }
 
-        sorted_genotypes = Utils.PermuteArray(genotypes, reverse_permutation);
-        sorted_likelihoods = Utils.PermuteArray(likelihoods, reverse_permutation);
+        sorted_genotypes = MathUtils.permuteArray(genotypes, reverse_permutation);
+        sorted_likelihoods = MathUtils.permuteArray(likelihoods, reverse_permutation);
     }
 
     public String toString(char ref) {
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/multisamplecaller/MultiSampleCaller.java b/java/src/org/broadinstitute/sting/oneoffprojects/multisamplecaller/MultiSampleCaller.java
index 24dd143a8..de5264ffb 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/multisamplecaller/MultiSampleCaller.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/multisamplecaller/MultiSampleCaller.java
@@ -1,4 +1,27 @@
 
+/*
+ * 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.oneoffprojects.multisamplecaller;
 
 import net.sf.samtools.SAMFileHeader;
@@ -10,11 +33,8 @@ import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.refdata.rodDbSNP;
 import org.broadinstitute.sting.gatk.walkers.LocusWalker;
-import org.broadinstitute.sting.utils.BaseUtils;
-import org.broadinstitute.sting.utils.GenomeLoc;
-import org.broadinstitute.sting.utils.GenomeLocParser;
-import org.broadinstitute.sting.utils.Utils;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.utils.*;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -818,7 +838,7 @@ public class MultiSampleCaller extends LocusWalker perm = new ArrayList(); 
 	            for (int i = 0; i < reads[j].size(); i++) { perm.add(i); }
-	            perm = Utils.RandomSubset(perm, downsample);
+	            perm = MathUtils.randomSubset(perm, downsample);
 	           
 	            ArrayList downsampled_reads = new ArrayList();
 	            ArrayList downsampled_offsets = new ArrayList();
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/BaseTransitionTableCalculatorJavaWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/BaseTransitionTableCalculatorJavaWalker.java
index 2a8abb0ce..a51fefefb 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/BaseTransitionTableCalculatorJavaWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/BaseTransitionTableCalculatorJavaWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.oneoffprojects.walkers;
 
 import org.broadinstitute.sting.gatk.walkers.*;
@@ -5,10 +28,9 @@ import org.broadinstitute.sting.gatk.walkers.genotyper.*;
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.*;
 import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
-import org.broadinstitute.sting.utils.genotype.*;
 
 import java.util.*;
 import java.io.PrintStream;
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/DSBWalkerV3.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/DSBWalkerV3.java
index c244ace73..3d32f566e 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/DSBWalkerV3.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/DSBWalkerV3.java
@@ -1,9 +1,33 @@
+/*
+ * 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.oneoffprojects.walkers;
 
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.ReadWalker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.*;
+import org.broadinstitute.sting.utils.sam.AlignmentUtils;
 import net.sf.samtools.SAMRecord;
 
 import java.util.*;
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/IOCrusherWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/IOCrusherWalker.java
index 95085ab68..baa84c7be 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/IOCrusherWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/IOCrusherWalker.java
@@ -1,9 +1,32 @@
+/*
+ * 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.oneoffprojects.walkers;
 
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.ReadWalker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-import org.broadinstitute.sting.utils.Utils;
+import org.broadinstitute.sting.commandline.Argument;
+import org.broadinstitute.sting.utils.sam.ReadUtils;
 import net.sf.samtools.SAMRecord;
 import net.sf.samtools.SAMFileWriter;
 import net.sf.samtools.SAMFileHeader;
@@ -50,7 +73,7 @@ public class IOCrusherWalker extends ReadWalker outputs = new ArrayList(nWaysOut);
         for ( int i = 0; i < nWaysOut; i++ ) {
             SAMFileHeader header = this.getToolkit().getSAMFileHeader();
-            outputs.add(Utils.createSAMFileWriterWithCompression(header, true, outputBase + "." + i + ".bam", BAMcompression));
+            outputs.add(ReadUtils.createSAMFileWriterWithCompression(header, true, outputBase + "." + i + ".bam", BAMcompression));
         }
         return outputs;
     }
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/IndelErrorRateWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/IndelErrorRateWalker.java
index b1d7b58bd..6b8464f87 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/IndelErrorRateWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/IndelErrorRateWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.oneoffprojects.walkers;
 
 import org.broadinstitute.sting.gatk.walkers.LocusWalker;
@@ -8,13 +31,11 @@ import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
 import org.broadinstitute.sting.utils.GenomeLoc;
 import org.broadinstitute.sting.utils.GenomeLocParser;
-import org.broadinstitute.sting.utils.CircularArray;
+import org.broadinstitute.sting.utils.collections.CircularArray;
 import org.broadinstitute.sting.utils.pileup.ExtendedEventPileupElement;
-import org.broadinstitute.sting.utils.pileup.PileupElement;
 import org.broadinstitute.sting.utils.pileup.ReadBackedExtendedEventPileup;
 import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-import net.sf.samtools.SAMRecord;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.List;
 import java.util.LinkedList;
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/PairedQualityScoreCountsWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/PairedQualityScoreCountsWalker.java
index d44cfbb31..c437d247a 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/PairedQualityScoreCountsWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/PairedQualityScoreCountsWalker.java
@@ -1,11 +1,34 @@
+/*
+ * 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.oneoffprojects.walkers;
 
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.ReadWalker;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.QualityUtils;
 import org.broadinstitute.sting.utils.BaseUtils;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import net.sf.samtools.SAMRecord;
 
 /**
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/QualityScoreByStrandWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/QualityScoreByStrandWalker.java
index ab930afd1..d65a8a1cc 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/QualityScoreByStrandWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/QualityScoreByStrandWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.oneoffprojects.walkers;
 
 import java.io.IOException;
@@ -5,14 +28,12 @@ import org.broadinstitute.sting.utils.QualityUtils;
 import org.broadinstitute.sting.utils.StingException;
 import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
 import org.broadinstitute.sting.utils.pileup.PileupElement;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.gatk.walkers.LocusWalker;
 import org.broadinstitute.sting.gatk.walkers.ReadFilters;
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
-import org.broadinstitute.sting.gatk.filters.Platform454Filter;
-import org.broadinstitute.sting.gatk.filters.ZeroMappingQualityReadFilter;
 import org.broadinstitute.sting.gatk.filters.PlatformUnitFilter;
 import org.broadinstitute.sting.gatk.filters.PlatformUnitFilterHelper;
 import net.sf.samtools.SAMRecord;
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ReadErrorRateWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ReadErrorRateWalker.java
index 3313a1c46..2abf11746 100755
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ReadErrorRateWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ReadErrorRateWalker.java
@@ -1,13 +1,35 @@
+/*
+ * 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.oneoffprojects.walkers;
 
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.ReadWalker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.QualityUtils;
 import org.broadinstitute.sting.utils.BaseUtils;
 import net.sf.samtools.SAMRecord;
 
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Random;
 
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ReadQualityScoreWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ReadQualityScoreWalker.java
index 0b5267e50..53a6e5353 100755
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ReadQualityScoreWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ReadQualityScoreWalker.java
@@ -1,8 +1,31 @@
+/*
+ * 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.oneoffprojects.walkers;
 
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.ReadWalker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.GenomeLoc;
 import org.broadinstitute.sting.utils.GenomeLocParser;
 import org.broadinstitute.sting.utils.StingException;
@@ -14,31 +37,6 @@ import java.io.BufferedReader;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 
-/*
- * 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.
- */
-
 /**
  * Created by IntelliJ IDEA.
  * User: rpoplin
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ReplaceQuals.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ReplaceQuals.java
index c2197a3f1..de361aaf5 100755
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ReplaceQuals.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ReplaceQuals.java
@@ -1,9 +1,32 @@
+/*
+ * 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.oneoffprojects.walkers;
 
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.ReadWalker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.commandline.Argument;
+import org.broadinstitute.sting.utils.collections.Pair;
 import net.sf.samtools.*;
 
 import java.util.HashMap;
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestReadFishingWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestReadFishingWalker.java
index f73f2fee4..284137cc5 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestReadFishingWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestReadFishingWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.oneoffprojects.walkers;
 
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
@@ -6,13 +29,12 @@ import org.broadinstitute.sting.alignment.bwa.BWAAligner;
 import org.broadinstitute.sting.alignment.bwa.BWAConfiguration;
 import org.broadinstitute.sting.alignment.bwa.c.BWACAligner;
 import org.broadinstitute.sting.alignment.Alignment;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.StingException;
 import org.broadinstitute.sting.utils.GenomeLoc;
 import org.broadinstitute.sting.utils.GenomeLocParser;
 import org.broadinstitute.sting.utils.fasta.IndexedFastaSequenceFile;
 import net.sf.samtools.SAMRecord;
-import net.sf.samtools.SAMSequenceRecord;
 import net.sf.samtools.util.StringUtil;
 import net.sf.picard.reference.ReferenceSequence;
 
@@ -20,7 +42,6 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.util.Scanner;
-import java.util.SortedSet;
 import java.util.TreeMap;
 import java.util.SortedMap;
 
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestVariantContextWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestVariantContextWalker.java
index 839381aa1..52b611764 100755
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestVariantContextWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/TestVariantContextWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.oneoffprojects.walkers;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -6,7 +29,7 @@ import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContext;
 import org.broadinstitute.sting.gatk.refdata.*;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
 import org.broadinstitute.sting.utils.genotype.vcf.*;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.EnumSet;
 import java.io.File;
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ValidateDbSNPConversion.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ValidateDbSNPConversion.java
index dbcf79649..e03c5fba7 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ValidateDbSNPConversion.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/ValidateDbSNPConversion.java
@@ -1,3 +1,26 @@
+/*
+ * 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.oneoffprojects.walkers;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -5,7 +28,7 @@ import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.refdata.rodDbSNP;
 import org.broadinstitute.sting.gatk.walkers.RefWalker;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 
 import java.io.PrintStream;
 
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/annotator/ProportionOfNonrefBasesSupportingSNP.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/annotator/ProportionOfNonrefBasesSupportingSNP.java
index dbb7b0a88..2100a08e7 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/annotator/ProportionOfNonrefBasesSupportingSNP.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/annotator/ProportionOfNonrefBasesSupportingSNP.java
@@ -1,9 +1,32 @@
+/*
+ * 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.oneoffprojects.walkers.annotator;
 
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.annotator.interfaces.InfoFieldAnnotation;
 import org.broadinstitute.sting.utils.genotype.vcf.VCFInfoHeaderLine;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.BaseUtils;
 import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
 import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/annotator/ProportionOfRefSecondBasesSupportingSNP.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/annotator/ProportionOfRefSecondBasesSupportingSNP.java
index 97e74d0b6..4b7c397e9 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/annotator/ProportionOfRefSecondBasesSupportingSNP.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/annotator/ProportionOfRefSecondBasesSupportingSNP.java
@@ -1,9 +1,32 @@
+/*
+ * 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.oneoffprojects.walkers.annotator;
 
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.annotator.interfaces.InfoFieldAnnotation;
 import org.broadinstitute.sting.utils.BaseUtils;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.genotype.vcf.VCFInfoHeaderLine;
 import org.broadinstitute.sting.utils.pileup.PileupElement;
 import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/annotator/ProportionOfSNPSecondBasesSupportingRef.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/annotator/ProportionOfSNPSecondBasesSupportingRef.java
index 097098770..f83fd4780 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/annotator/ProportionOfSNPSecondBasesSupportingRef.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/annotator/ProportionOfSNPSecondBasesSupportingRef.java
@@ -1,3 +1,26 @@
+/*
+ * 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.oneoffprojects.walkers.annotator;
 
 import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
@@ -6,7 +29,7 @@ import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContext;
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.annotator.interfaces.InfoFieldAnnotation;
 import org.broadinstitute.sting.utils.genotype.vcf.VCFInfoHeaderLine;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.BaseUtils;
 import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
 import org.broadinstitute.sting.utils.pileup.PileupElement;
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/varianteval/multisample/MultiSampleConcordanceWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/varianteval/multisample/MultiSampleConcordanceWalker.java
index 567125b95..4b2d9da7f 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/varianteval/multisample/MultiSampleConcordanceWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/varianteval/multisample/MultiSampleConcordanceWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.oneoffprojects.walkers.varianteval.multisample;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -8,7 +31,7 @@ import org.broadinstitute.sting.gatk.walkers.DataSource;
 import org.broadinstitute.sting.gatk.walkers.RMD;
 import org.broadinstitute.sting.gatk.walkers.Requires;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 /*
  * Calculates per-sample concordance metrics across two multi-sample VCF files; outputs simple counts of concordant
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/BeagleTrioToVCFWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/BeagleTrioToVCFWalker.java
index 167ae98ad..c0b4eb49e 100755
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/BeagleTrioToVCFWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/BeagleTrioToVCFWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.oneoffprojects.walkers.vcftools;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -11,7 +34,7 @@ import org.broadinstitute.sting.gatk.walkers.RMD;
 import org.broadinstitute.sting.gatk.walkers.Requires;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
 import org.broadinstitute.sting.gatk.walkers.varianteval.MendelianViolationEvaluator;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.genotype.vcf.VCFWriter;
 
 import java.util.Arrays;
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/SimpleVCFIntersectWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/SimpleVCFIntersectWalker.java
index baddab129..00de5613e 100644
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/SimpleVCFIntersectWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/SimpleVCFIntersectWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.oneoffprojects.walkers.vcftools;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -5,7 +28,7 @@ import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.refdata.RodVCF;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
 import java.util.*;
diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/VCFToBeagleWalker.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/VCFToBeagleWalker.java
index 3ef4f52eb..18dad83ac 100755
--- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/VCFToBeagleWalker.java
+++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/VCFToBeagleWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.oneoffprojects.walkers.vcftools;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -11,7 +34,7 @@ import org.broadinstitute.sting.gatk.walkers.Requires;
 import org.broadinstitute.sting.gatk.walkers.DataSource;
 import org.broadinstitute.sting.gatk.walkers.RMD;
 import org.broadinstitute.sting.utils.*;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.gatk.walkers.varianteval.MendelianViolationEvaluator;
 
 import java.util.EnumSet;
diff --git a/java/src/org/broadinstitute/sting/playground/analyzeconcordance/AnalyzeConcordance.java b/java/src/org/broadinstitute/sting/playground/analyzeconcordance/AnalyzeConcordance.java
index 7692f174e..7671bb5b7 100644
--- a/java/src/org/broadinstitute/sting/playground/analyzeconcordance/AnalyzeConcordance.java
+++ b/java/src/org/broadinstitute/sting/playground/analyzeconcordance/AnalyzeConcordance.java
@@ -1,8 +1,31 @@
+/*
+ * 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.playground.analyzeconcordance;
 
-import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-import org.broadinstitute.sting.utils.xReadLines;
+import org.broadinstitute.sting.commandline.CommandLineProgram;
+import org.broadinstitute.sting.commandline.Argument;
+import org.broadinstitute.sting.utils.text.XReadLines;
 import org.broadinstitute.sting.utils.StingException;
 import org.broadinstitute.sting.utils.Utils;
 import org.broadinstitute.sting.utils.PathUtils;
@@ -111,7 +134,7 @@ public class AnalyzeConcordance extends CommandLineProgram {
     }
 
     private void addEvalListFile(EvalFilterType filterType, File evalListFile) throws FileNotFoundException {
-        for (String line : new xReadLines(evalListFile)) {
+        for (String line : new XReadLines(evalListFile)) {
             String[] parts = line.split("\t");
             addEvalFile(parts[0], filterType, new File(parts[1]));
         }
@@ -120,7 +143,7 @@ public class AnalyzeConcordance extends CommandLineProgram {
     private void addEvalFile(String evalID, EvalFilterType filterType, File evalFile) throws FileNotFoundException {
         SortedMap fieldValues = new TreeMap();
 
-        for (String line : new xReadLines(evalFile)) {
+        for (String line : new XReadLines(evalFile)) {
             for (AnalyzeConcordanceField field : ANALYZE_CONCORDANCE_FIELDS) {
                 String value = field.parseLine(line);
                 if (value != null) {
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CalculateAlleleLikelihoodsWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CalculateAlleleLikelihoodsWalker.java
index e426ca7e2..b7b511f62 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CalculateAlleleLikelihoodsWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CalculateAlleleLikelihoodsWalker.java
@@ -1,9 +1,32 @@
+/*
+ * 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.playground.gatk.walkers.HLAcaller;
 
 import net.sf.samtools.SAMRecord;
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.*;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.ArrayList;
 import java.util.Hashtable;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CalculateBaseLikelihoodsWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CalculateBaseLikelihoodsWalker.java
index 48439fe39..e5259572d 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CalculateBaseLikelihoodsWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CalculateBaseLikelihoodsWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.HLAcaller;
 
 import net.sf.samtools.SAMRecord;
@@ -7,9 +30,9 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.LocusWalker;
 import org.broadinstitute.sting.gatk.walkers.genotyper.*;
 import org.broadinstitute.sting.utils.BaseUtils;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.genotype.DiploidGenotype;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.ArrayList;
 import java.util.Hashtable;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CalculatePhaseLikelihoodsWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CalculatePhaseLikelihoodsWalker.java
index 6715deb19..0b1fd1ac1 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CalculatePhaseLikelihoodsWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CalculatePhaseLikelihoodsWalker.java
@@ -1,10 +1,33 @@
+/*
+ * 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.playground.gatk.walkers.HLAcaller;
 
 import net.sf.samtools.SAMRecord;
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.*;
 import org.broadinstitute.sting.gatk.arguments.GATKArgumentCollection;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.ArrayList;
 import java.util.Hashtable;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CallHLAWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CallHLAWalker.java
index 73be9cf7e..54fcc6e68 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CallHLAWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CallHLAWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.HLAcaller;
 
 import net.sf.samtools.SAMRecord;
@@ -8,10 +31,10 @@ import org.broadinstitute.sting.gatk.walkers.LocusWalker;
 import org.broadinstitute.sting.gatk.walkers.genotyper.*;
 import org.broadinstitute.sting.utils.BaseUtils;
 import org.broadinstitute.sting.utils.GenomeLoc;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
 import org.broadinstitute.sting.utils.genotype.DiploidGenotype;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.io.BufferedReader;
 import java.io.DataInputStream;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CreatePedFileWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CreatePedFileWalker.java
index a60edc63c..043de686f 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CreatePedFileWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/CreatePedFileWalker.java
@@ -1,9 +1,32 @@
+/*
+ * 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.playground.gatk.walkers.HLAcaller;
 
 import net.sf.samtools.SAMRecord;
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.*;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.ArrayList;
 import java.util.Hashtable;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/FindClosestAlleleWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/FindClosestAlleleWalker.java
index 481a3acef..d5f6a76bd 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/FindClosestAlleleWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/HLAcaller/FindClosestAlleleWalker.java
@@ -1,9 +1,32 @@
+/*
+ * 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.playground.gatk.walkers.HLAcaller;
 
 import net.sf.samtools.SAMRecord;
 import org.broadinstitute.sting.gatk.refdata.ReadMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.*;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.ArrayList;
 import java.util.Hashtable;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/LocusMismatchWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/LocusMismatchWalker.java
index 79b52085d..a408a7240 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/LocusMismatchWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/LocusMismatchWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -16,7 +39,7 @@ import org.broadinstitute.sting.gatk.walkers.genotyper.UnifiedGenotyperEngine;
 import org.broadinstitute.sting.gatk.walkers.genotyper.VariantCallContext;
 import org.broadinstitute.sting.utils.BaseUtils;
 import org.broadinstitute.sting.utils.StingException;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.pileup.PileupElement;
 import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
 
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/SnpCallRateByCoverageWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/SnpCallRateByCoverageWalker.java
index 39a40c093..3eef65888 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/SnpCallRateByCoverageWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/SnpCallRateByCoverageWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers;
 
 import net.sf.samtools.SAMRecord;
@@ -11,8 +34,8 @@ import org.broadinstitute.sting.gatk.walkers.genotyper.VariantCallContext;
 import org.broadinstitute.sting.gatk.walkers.genotyper.UnifiedArgumentCollection;
 import org.broadinstitute.sting.gatk.walkers.genotyper.UnifiedGenotyperEngine;
 import org.broadinstitute.sting.utils.BaseUtils;
-import org.broadinstitute.sting.utils.ListUtils;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.utils.MathUtils;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -80,9 +103,9 @@ public class SnpCallRateByCoverageWalker extends LocusWalker, Strin
                     int goodIterations = 0;
 
                     for (int r=0; r < downsampling_repeats; r++) {
-                        List subset_indices = ListUtils.sampleIndicesWithReplacement(coverage_available, usableCoverage);
-                        List sub_reads = ListUtils.sliceListByIndices(subset_indices, reads);
-                        List sub_offsets = ListUtils.sliceListByIndices(subset_indices, offsets);
+                        List subset_indices = MathUtils.sampleIndicesWithReplacement(coverage_available, usableCoverage);
+                        List sub_reads = MathUtils.sliceListByIndices(subset_indices, reads);
+                        List sub_offsets = MathUtils.sliceListByIndices(subset_indices, offsets);
 
                         AlignmentContext subContext = new AlignmentContext(context.getLocation(), sub_reads, sub_offsets);
 
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/TrioGenotyperWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/TrioGenotyperWalker.java
index db40bf912..d6686f418 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/TrioGenotyperWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/TrioGenotyperWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -12,8 +35,8 @@ import org.broadinstitute.sting.gatk.walkers.*;
 import org.broadinstitute.sting.gatk.walkers.genotyper.VariantCallContext;
 import org.broadinstitute.sting.gatk.walkers.genotyper.UnifiedGenotyperEngine;
 import org.broadinstitute.sting.gatk.walkers.genotyper.UnifiedArgumentCollection;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-import org.broadinstitute.sting.utils.cmdLine.ArgumentCollection;
+import org.broadinstitute.sting.commandline.Argument;
+import org.broadinstitute.sting.commandline.ArgumentCollection;
 import org.broadinstitute.sting.utils.StingException;
 import org.broadinstitute.sting.utils.QualityUtils;
 import org.broadinstitute.sting.utils.MathUtils;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/annotator/GenomicAnnotator.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/annotator/GenomicAnnotator.java
index 02afb4939..5f86c0381 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/annotator/GenomicAnnotator.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/annotator/GenomicAnnotator.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.annotator;
 
 import java.io.File;
@@ -25,9 +48,9 @@ import org.broadinstitute.sting.gatk.walkers.RodWalker;
 import org.broadinstitute.sting.gatk.walkers.Window;
 import org.broadinstitute.sting.gatk.walkers.annotator.VariantAnnotatorEngine;
 import org.broadinstitute.sting.utils.BaseUtils;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.SampleUtils;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.genotype.vcf.VCFHeader;
 import org.broadinstitute.sting.utils.genotype.vcf.VCFHeaderLine;
 import org.broadinstitute.sting.utils.genotype.vcf.VCFUtils;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/contamination/FindContaminatingReadGroupsWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/contamination/FindContaminatingReadGroupsWalker.java
index d2dc204c7..ba7197f3a 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/contamination/FindContaminatingReadGroupsWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/contamination/FindContaminatingReadGroupsWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.contamination;
 
 import org.broadinstitute.sting.gatk.walkers.LocusWalker;
@@ -7,7 +30,7 @@ import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
 import org.broadinstitute.sting.utils.BaseUtils;
 import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.playground.utils.NamedTable;
 import net.sf.samtools.SAMRecord;
 import net.sf.samtools.SAMReadGroupRecord;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/diagnostics/ComputeConfusionMatrix.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/diagnostics/ComputeConfusionMatrix.java
index d46566150..961d3ba9a 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/diagnostics/ComputeConfusionMatrix.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/diagnostics/ComputeConfusionMatrix.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.diagnostics;
 
 import org.broadinstitute.sting.gatk.walkers.LocusWalker;
@@ -6,7 +29,7 @@ import org.broadinstitute.sting.gatk.walkers.Window;
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.BaseUtils;
 import net.sf.samtools.SAMRecord;
 
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/diagnostics/SNPDensity.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/diagnostics/SNPDensity.java
index 12c23d02b..5653aceff 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/diagnostics/SNPDensity.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/diagnostics/SNPDensity.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.diagnostics;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -8,8 +31,8 @@ import org.broadinstitute.sting.gatk.refdata.RodVCF;
 import org.broadinstitute.sting.gatk.refdata.VariantContextAdaptors;
 import org.broadinstitute.sting.gatk.walkers.*;
 import org.broadinstitute.sting.utils.GenomeLoc;
-import org.broadinstitute.sting.utils.Pair;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.utils.collections.Pair;
+import org.broadinstitute.sting.commandline.Argument;
 
 /**
  * Computes the density of SNPs passing and failing filters in intervals on the genome and emits a table for display
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/duplicates/CombineDuplicatesWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/duplicates/CombineDuplicatesWalker.java
index b7aa049a9..73c210b67 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/duplicates/CombineDuplicatesWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/duplicates/CombineDuplicatesWalker.java
@@ -1,10 +1,33 @@
+/*
+ * 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.playground.gatk.walkers.duplicates;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
 import org.broadinstitute.sting.gatk.walkers.DuplicateWalker;
 import org.broadinstitute.sting.utils.GenomeLoc;
 import org.broadinstitute.sting.utils.duplicates.DupUtils;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.List;
 import java.util.Set;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/duplicates/CountDuplicatesWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/duplicates/CountDuplicatesWalker.java
index 28d0e1ae1..c36df2e9d 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/duplicates/CountDuplicatesWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/duplicates/CountDuplicatesWalker.java
@@ -1,26 +1,24 @@
 /*
- * Copyright (c) 2009 The Broad Institute
- *
+ * 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
+ * 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,
+ * 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.
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
 package org.broadinstitute.sting.playground.gatk.walkers.duplicates;
@@ -30,7 +28,7 @@ import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
 import org.broadinstitute.sting.gatk.walkers.DuplicateWalker;
 import org.broadinstitute.sting.utils.GenomeLoc;
 import org.broadinstitute.sting.utils.Utils;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.List;
 import java.util.Set;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/graphalign/GraphReferenceAssessor.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/graphalign/GraphReferenceAssessor.java
index ec2db0d7c..03182946d 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/graphalign/GraphReferenceAssessor.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/graphalign/GraphReferenceAssessor.java
@@ -1,28 +1,36 @@
+/*
+ * 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.playground.gatk.walkers.graphalign;
 
-import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
-import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
 import org.broadinstitute.sting.gatk.refdata.*;
 import org.broadinstitute.sting.gatk.walkers.*;
-import org.broadinstitute.sting.gatk.walkers.fasta.FastaReferenceWalker;
 import org.broadinstitute.sting.utils.*;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-import org.broadinstitute.sting.utils.genotype.Variation;
-import org.jgrapht.Graph;
-import org.jgrapht.graph.DefaultEdge;
-import org.jgrapht.graph.SimpleGraph;
-import org.jgrapht.graph.SimpleDirectedGraph;
-import org.apache.log4j.Logger;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.*;
 import java.io.*;
 
-import net.sf.picard.reference.ReferenceSequence;
-import net.sf.picard.reference.ReferenceSequenceFile;
-import net.sf.picard.reference.ReferenceSequenceFileFactory;
-import net.sf.samtools.util.StringUtil;
-import net.sf.samtools.SAMFileWriter;
-import net.sf.samtools.SAMFileHeader;
 import net.sf.samtools.SAMRecord;
 
 /**
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/graphalign/GraphReferenceBuilder.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/graphalign/GraphReferenceBuilder.java
index c546da133..9daa39415 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/graphalign/GraphReferenceBuilder.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/graphalign/GraphReferenceBuilder.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.graphalign;
 
 import net.sf.picard.reference.ReferenceSequence;
@@ -13,7 +36,7 @@ import org.broadinstitute.sting.gatk.walkers.Requires;
 import org.broadinstitute.sting.gatk.walkers.WalkerName;
 import org.broadinstitute.sting.utils.GenomeLoc;
 import org.broadinstitute.sting.utils.StingException;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.genotype.Variation;
 
 import java.io.FileNotFoundException;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/hybridselection/CoverageAcrossBaitsWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/hybridselection/CoverageAcrossBaitsWalker.java
index 09f284d86..5521457a9 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/hybridselection/CoverageAcrossBaitsWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/hybridselection/CoverageAcrossBaitsWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.hybridselection;
 
 import net.sf.samtools.SAMRecord;
@@ -9,9 +32,9 @@ import org.broadinstitute.sting.gatk.walkers.By;
 import org.broadinstitute.sting.gatk.walkers.DataSource;
 import org.broadinstitute.sting.gatk.walkers.LocusWalker;
 import org.broadinstitute.sting.utils.GenomeLoc;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.StingException;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.ArrayList;
 import java.util.Arrays;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/hybridselection/HybSelPerformanceWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/hybridselection/HybSelPerformanceWalker.java
index e2439d838..b24d89166 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/hybridselection/HybSelPerformanceWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/hybridselection/HybSelPerformanceWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.hybridselection;
 
 import net.sf.picard.reference.ReferenceSequence;
@@ -21,8 +44,8 @@ import org.broadinstitute.sting.gatk.walkers.DataSource;
 import org.broadinstitute.sting.gatk.walkers.LocusWalker;
 import org.broadinstitute.sting.gatk.walkers.TreeReducible;
 import org.broadinstitute.sting.utils.GenomeLoc;
-import org.broadinstitute.sting.utils.Pair;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.utils.collections.Pair;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.fasta.IndexedFastaSequenceFile;
 
 import java.io.File;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/papergenotyper/GATKPaperGenotyper.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/papergenotyper/GATKPaperGenotyper.java
index ac40f4616..ec4533cdd 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/papergenotyper/GATKPaperGenotyper.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/papergenotyper/GATKPaperGenotyper.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.papergenotyper;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -6,8 +29,8 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.LocusWalker;
 import org.broadinstitute.sting.gatk.walkers.TreeReducible;
 import org.broadinstitute.sting.gatk.walkers.genotyper.DiploidGenotypePriors;
-import org.broadinstitute.sting.utils.Utils;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.utils.MathUtils;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
 
 import java.io.PrintStream;
@@ -65,7 +88,7 @@ public class GATKPaperGenotyper extends LocusWalker impleme
                 }
             }
 
-        Integer sortedList[] = Utils.SortPermutation(likelihoods);
+        Integer sortedList[] = MathUtils.sortPermutation(likelihoods);
 
         // create call using the best genotype (GENOTYPE.values()[sortedList[9]].toString())
         // and calculate the LOD score from best - next best (9 and 8 in the sorted list, since the best likelihoods are closest to zero)
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/poolseq/PowerBelowFrequencyWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/poolseq/PowerBelowFrequencyWalker.java
index 3a6ba3e11..94efd3866 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/poolseq/PowerBelowFrequencyWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/poolseq/PowerBelowFrequencyWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.poolseq;
 
 import org.broadinstitute.sting.gatk.walkers.LocusWalker;
@@ -6,11 +29,10 @@ import org.broadinstitute.sting.gatk.walkers.By;
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.commandline.Argument;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.QualityUtils;
 import org.broadinstitute.sting.utils.MathUtils;
-import org.broadinstitute.sting.utils.ListUtils;
 import org.broadinstitute.sting.utils.StingException;
 import org.broadinstitute.sting.playground.utils.PoolUtils;
 import net.sf.samtools.SAMRecord;
@@ -123,7 +145,7 @@ public class PowerBelowFrequencyWalker extends LocusWalker {
         if ( useMean ) {
             meanQ = QualityUtils.probToQual(expectedMatchRate(context));
         } else {
-            meanQ = ListUtils.getQScoreMedian(context.getReads(),context.getOffsets());
+            meanQ = MathUtils.getQScoreMedian(context.getReads(),context.getOffsets());
         }
 
         return meanQ;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/poolseq/Quad.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/poolseq/Quad.java
index 8ed3b4c30..2c5158a16 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/poolseq/Quad.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/poolseq/Quad.java
@@ -1,6 +1,29 @@
+/*
+ * 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.playground.gatk.walkers.poolseq;
 
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 
 /**
  * Created by IntelliJ IDEA.
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/poolseq/ReadOffsetQuad.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/poolseq/ReadOffsetQuad.java
index d554683b9..aa921d243 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/poolseq/ReadOffsetQuad.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/poolseq/ReadOffsetQuad.java
@@ -1,8 +1,31 @@
+/*
+ * 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.playground.gatk.walkers.poolseq;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
 import org.broadinstitute.sting.utils.GenomeLoc;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import net.sf.samtools.SAMRecord;
 import java.util.List;
 import java.util.ArrayList;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/qc/CountPairsWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/qc/CountPairsWalker.java
index 580660c46..bd246f5bf 100644
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/qc/CountPairsWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/qc/CountPairsWalker.java
@@ -1,7 +1,30 @@
+/*
+ * 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.playground.gatk.walkers.qc;
 
 import org.broadinstitute.sting.gatk.walkers.ReadPairWalker;
-import org.broadinstitute.sting.utils.ExpandingArrayList;
+import org.broadinstitute.sting.utils.collections.ExpandingArrayList;
 import net.sf.samtools.SAMRecord;
 
 import java.util.Collection;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/AnalyzeAnnotationsWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/AnalyzeAnnotationsWalker.java
index 0dbbfafb8..2da0ab071 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/AnalyzeAnnotationsWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/AnalyzeAnnotationsWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.variantoptimizer;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -5,36 +28,11 @@ import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
 import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContext;
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.HashMap;
 import java.util.Collection;
 
-/*
- * 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.
- */
-
 /**
  * Takes variant calls as .vcf files and creates plots of truth metrics as a function of the various annotations found in the INFO field.
  *
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/ApplyVariantClustersWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/ApplyVariantClustersWalker.java
index fb7c8be56..7a4aa4bc5 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/ApplyVariantClustersWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/ApplyVariantClustersWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.variantoptimizer;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -9,38 +32,14 @@ import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrack;
 import org.broadinstitute.sting.gatk.refdata.utils.GATKFeature;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
 import org.broadinstitute.sting.utils.*;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.utils.collections.ExpandingArrayList;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
 import java.io.File;
 import java.io.IOException;
 import java.util.*;
 
-/*
- * 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.
- */
-
 /**
  * Applies calibrated variant cluster parameters to variant calls to produce an accurate and informative variant quality score
  *
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantConcordanceROCCurveWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantConcordanceROCCurveWalker.java
index 90b309963..6db5b80a5 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantConcordanceROCCurveWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantConcordanceROCCurveWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.variantoptimizer;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -7,40 +30,15 @@ import org.broadinstitute.sting.gatk.datasources.simpleDataSources.ReferenceOrde
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.refdata.RodVCF;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
-import org.broadinstitute.sting.utils.ExpandingArrayList;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.ExpandingArrayList;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.StingException;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.io.IOException;
 import java.io.PrintStream;
 import java.util.HashMap;
 
-/*
- * 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.
- */
-
 /**
  * Calculates variant concordance with the given truth sets and plots ROC curves for each input call set.
  * 
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantDataManager.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantDataManager.java
index 775d9a521..139b96ed6 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantDataManager.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantDataManager.java
@@ -1,35 +1,33 @@
-package org.broadinstitute.sting.playground.gatk.walkers.variantoptimizer;
-
-import org.broadinstitute.sting.utils.ExpandingArrayList;
-import org.broadinstitute.sting.utils.StingException;
-
-import java.io.PrintStream;
-
 /*
  * 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
+ * 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,
+ * 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.
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+package org.broadinstitute.sting.playground.gatk.walkers.variantoptimizer;
+
+import org.broadinstitute.sting.utils.collections.ExpandingArrayList;
+import org.broadinstitute.sting.utils.StingException;
+
+import java.io.PrintStream;
+
 /**
  * Created by IntelliJ IDEA.
  * User: rpoplin
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantGaussianMixtureModel.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantGaussianMixtureModel.java
index c272f9118..31f6fa47c 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantGaussianMixtureModel.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantGaussianMixtureModel.java
@@ -1,8 +1,31 @@
+/*
+ * 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.playground.gatk.walkers.variantoptimizer;
 
-import org.broadinstitute.sting.utils.ExpandingArrayList;
+import org.broadinstitute.sting.utils.collections.ExpandingArrayList;
 import org.broadinstitute.sting.utils.StingException;
-import org.broadinstitute.sting.utils.xReadLines;
+import org.broadinstitute.sting.utils.text.XReadLines;
 
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -11,31 +34,6 @@ import java.util.Map;
 import java.util.Random;
 import java.util.regex.Pattern;
 
-/*
- * 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.
- */
-
 /**
  * Created by IntelliJ IDEA.
  * User: rpoplin
@@ -91,7 +89,7 @@ public final class VariantGaussianMixtureModel extends VariantOptimizationModel
         final ExpandingArrayList clusterLines = new ExpandingArrayList();
 
         try {
-            for ( String line : new xReadLines(new File( clusterFileName )) ) {
+            for ( String line : new XReadLines(new File( clusterFileName )) ) {
                 if( ANNOTATION_PATTERN.matcher(line).matches() ) {
                     annotationLines.add(line);
                 } else if( CLUSTER_PATTERN.matcher(line).matches() ) {
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantOptimizer.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantOptimizer.java
index c740f1419..68d234cae 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantOptimizer.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/variantoptimizer/VariantOptimizer.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.variantoptimizer;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -6,39 +29,14 @@ import org.broadinstitute.sting.gatk.contexts.variantcontext.VariantContext;
 import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
 import org.broadinstitute.sting.utils.BaseUtils;
-import org.broadinstitute.sting.utils.ExpandingArrayList;
+import org.broadinstitute.sting.utils.collections.ExpandingArrayList;
 import org.broadinstitute.sting.utils.StingException;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 
 import java.util.Arrays;
 import java.util.Set;
 import java.util.TreeSet;
 
-/*
- * 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.
- */
-
 /**
  * Takes variant calls as .vcf files, learns a Gaussian mixture model over the variant annotations producing calibrated variant cluster parameters which can be applied to other datasets
  *
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VCFCombine.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VCFCombine.java
index 862d399fc..a8bbdc136 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VCFCombine.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VCFCombine.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.vcftools;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -8,10 +31,10 @@ import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrack;
 import org.broadinstitute.sting.gatk.refdata.utils.GATKFeature;
 import org.broadinstitute.sting.gatk.walkers.Requires;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.utils.SampleUtils;
 import org.broadinstitute.sting.utils.StingException;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
 import java.io.File;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VCFSelectWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VCFSelectWalker.java
index d40cf8d34..4889b0013 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VCFSelectWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VCFSelectWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.vcftools;
 
 import org.apache.commons.jexl.Expression;
@@ -12,7 +35,7 @@ import org.broadinstitute.sting.gatk.walkers.RMD;
 import org.broadinstitute.sting.gatk.walkers.Requires;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
 import org.broadinstitute.sting.utils.StingException;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
 import java.util.*;
diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VCFSubsetWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VCFSubsetWalker.java
index b38f7647c..cff983b65 100755
--- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VCFSubsetWalker.java
+++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/vcftools/VCFSubsetWalker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.gatk.walkers.vcftools;
 
 import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
@@ -6,7 +29,7 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
 import org.broadinstitute.sting.gatk.refdata.RodVCF;
 import org.broadinstitute.sting.gatk.refdata.utils.GATKFeature;
 import org.broadinstitute.sting.gatk.walkers.RodWalker;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.Argument;
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
 import java.io.File;
diff --git a/java/src/org/broadinstitute/sting/playground/tools/PairMaker.java b/java/src/org/broadinstitute/sting/playground/tools/PairMaker.java
index 59518276e..8d827aaac 100644
--- a/java/src/org/broadinstitute/sting/playground/tools/PairMaker.java
+++ b/java/src/org/broadinstitute/sting/playground/tools/PairMaker.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.tools;
 
 import net.sf.picard.cmdline.CommandLineProgram;
@@ -9,8 +32,8 @@ import java.io.File;
 import java.util.List;
 import java.util.ArrayList;
 
-import org.broadinstitute.sting.utils.Pair;
-import org.broadinstitute.sting.utils.AlignmentUtils;
+import org.broadinstitute.sting.utils.collections.Pair;
+import org.broadinstitute.sting.utils.sam.AlignmentUtils;
 import org.broadinstitute.sting.playground.utils.ParallelSAMIterator;
 
 /**
diff --git a/java/src/org/broadinstitute/sting/playground/tools/RemapAlignments.java b/java/src/org/broadinstitute/sting/playground/tools/RemapAlignments.java
index 9051bc382..424f01731 100644
--- a/java/src/org/broadinstitute/sting/playground/tools/RemapAlignments.java
+++ b/java/src/org/broadinstitute/sting/playground/tools/RemapAlignments.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.tools;
 
 import java.io.File;
@@ -8,7 +31,7 @@ import java.util.Map.Entry;
 
 import org.broadinstitute.sting.playground.utils.GenomicMap;
 import org.broadinstitute.sting.utils.GenomeLocParser;
-import org.broadinstitute.sting.utils.AlignmentUtils;
+import org.broadinstitute.sting.utils.sam.AlignmentUtils;
 
 import net.sf.picard.cmdline.CommandLineProgram;
 import net.sf.picard.cmdline.Option;
diff --git a/java/src/org/broadinstitute/sting/playground/tools/vcf/GenotypeConcordance.java b/java/src/org/broadinstitute/sting/playground/tools/vcf/GenotypeConcordance.java
index 0d9c7463a..6ba6ebeb3 100644
--- a/java/src/org/broadinstitute/sting/playground/tools/vcf/GenotypeConcordance.java
+++ b/java/src/org/broadinstitute/sting/playground/tools/vcf/GenotypeConcordance.java
@@ -1,19 +1,27 @@
+/*
+ * 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.playground.tools.vcf;
-import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-
-import org.broadinstitute.sting.utils.genotype.vcf.*;
-
-import java.io.*;
-import java.util.*;
-
-import net.sf.picard.PicardException;
-import net.sf.picard.io.IoUtil;
-import net.sf.picard.reference.ReferenceSequence;
-import net.sf.picard.reference.ReferenceSequenceFile;
-import net.sf.picard.reference.ReferenceSequenceFileWalker;
-import net.sf.samtools.SAMSequenceDictionary;
-import net.sf.samtools.SAMSequenceRecord;
 
 class GenotypeConcordance
 		{
diff --git a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFApplyCuts.java b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFApplyCuts.java
index 2fe2977a4..303f77646 100644
--- a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFApplyCuts.java
+++ b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFApplyCuts.java
@@ -1,28 +1,39 @@
+/*
+ * 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.playground.tools.vcf;
 
 //import org.broadinstitute.sting.playground.tools.vcf.VCFOptimize.Cut;
 
-import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.CommandLineProgram;
+import org.broadinstitute.sting.commandline.Argument;
 
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
-import org.broadinstitute.sting.utils.GenomeLoc;
-import org.broadinstitute.sting.utils.GenomeLocParser;
-import org.broadinstitute.sting.utils.Utils;
-
 
 import java.io.*;
 import java.util.*;
 
-import net.sf.picard.PicardException;
-import net.sf.picard.io.IoUtil;
-import net.sf.picard.reference.ReferenceSequence;
-import net.sf.picard.reference.ReferenceSequenceFile;
-import net.sf.picard.reference.ReferenceSequenceFileWalker;
-import net.sf.samtools.SAMSequenceDictionary;
-import net.sf.samtools.SAMSequenceRecord;
-
 //import org.apache.commons.math.optimization.*;
 //import org.apache.commons.math.optimization.direct.*;
 //import org.apache.commons.math.analysis.MultivariateRealFunction;
diff --git a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFCallRates.java b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFCallRates.java
index 1233b0b6b..e845e435b 100644
--- a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFCallRates.java
+++ b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFCallRates.java
@@ -1,24 +1,39 @@
+/*
+ * 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.playground.tools.vcf;
-import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.CommandLineProgram;
+import org.broadinstitute.sting.commandline.Argument;
 
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
 import java.io.*;
 import java.util.*;
 
-import net.sf.picard.PicardException;
 import net.sf.picard.util.Interval;
-import net.sf.picard.io.IoUtil;
-import net.sf.picard.reference.ReferenceSequence;
-import net.sf.picard.reference.ReferenceSequenceFile;
-import net.sf.picard.reference.ReferenceSequenceFileWalker;
-import net.sf.samtools.SAMSequenceDictionary;
-import net.sf.samtools.SAMSequenceRecord;
 
 
-
-class VCFCallRates extends CommandLineProgram 
+class VCFCallRates extends CommandLineProgram
 {
 		@Argument(fullName = "vcf", shortName = "vcf", doc = "file to open", required = true) public String filename;
 		@Argument(fullName = "out", shortName = "out", doc = "file to write results to", required = true) public String output_filename;
diff --git a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFHomogenizer.java b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFHomogenizer.java
index 2878cc8e5..b26d45777 100644
--- a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFHomogenizer.java
+++ b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFHomogenizer.java
@@ -1,11 +1,29 @@
+/*
+ * 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.playground.tools.vcf;
-import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
-            
-import org.broadinstitute.sting.utils.genotype.vcf.*;
-        
+
 import java.io.*;
-import java.util.*;
 import java.util.zip.*;
 
 // Edit a VCF on the fly to be on-spec.
diff --git a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFMerge.java b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFMerge.java
index 7ef3063b6..76dbcf670 100644
--- a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFMerge.java
+++ b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFMerge.java
@@ -1,25 +1,36 @@
+/*
+ * 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.playground.tools.vcf;
-import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.CommandLineProgram;
+import org.broadinstitute.sting.commandline.Argument;
 
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
-import org.broadinstitute.sting.utils.GenomeLoc;
-import org.broadinstitute.sting.utils.GenomeLocParser;
-import org.broadinstitute.sting.utils.Utils;
-
 
 import java.io.*;
-import java.util.*;
 
-import net.sf.picard.PicardException;
 import net.sf.picard.util.Interval;
-import net.sf.picard.io.IoUtil;
-import net.sf.picard.reference.ReferenceSequence;
-import net.sf.picard.reference.ReferenceSequenceFile;
-import net.sf.picard.reference.ReferenceSequenceFileWalker;
-import net.sf.samtools.SAMSequenceDictionary;
-import net.sf.samtools.SAMSequenceRecord;
 
 //import org.apache.commons.math.optimization.*;
 //import org.apache.commons.math.optimization.direct.*;
diff --git a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFOptimize.java b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFOptimize.java
index 993fa2ea3..47811020d 100644
--- a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFOptimize.java
+++ b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFOptimize.java
@@ -1,25 +1,36 @@
+/*
+ * 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.playground.tools.vcf;
-import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.CommandLineProgram;
+import org.broadinstitute.sting.commandline.Argument;
 
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
-import org.broadinstitute.sting.utils.GenomeLoc;
-import org.broadinstitute.sting.utils.GenomeLocParser;
-import org.broadinstitute.sting.utils.Utils;
-
 
 import java.io.*;
 import java.util.*;
 
-import net.sf.picard.PicardException;
-import net.sf.picard.io.IoUtil;
-import net.sf.picard.reference.ReferenceSequence;
-import net.sf.picard.reference.ReferenceSequenceFile;
-import net.sf.picard.reference.ReferenceSequenceFileWalker;
-import net.sf.samtools.SAMSequenceDictionary;
-import net.sf.samtools.SAMSequenceRecord;
-
 //import org.apache.commons.math.optimization.*;
 //import org.apache.commons.math.optimization.direct.*;
 //import org.apache.commons.math.analysis.MultivariateRealFunction;
diff --git a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFSequenomAnalysis.java b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFSequenomAnalysis.java
index 05acba408..695048a52 100644
--- a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFSequenomAnalysis.java
+++ b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFSequenomAnalysis.java
@@ -1,20 +1,35 @@
+/*
+ * 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.playground.tools.vcf;
-import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.CommandLineProgram;
+import org.broadinstitute.sting.commandline.Argument;
 
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
 import java.io.*;
-import java.util.*;
 
-import net.sf.picard.PicardException;
 import net.sf.picard.util.Interval;
-import net.sf.picard.io.IoUtil;
-import net.sf.picard.reference.ReferenceSequence;
-import net.sf.picard.reference.ReferenceSequenceFile;
-import net.sf.picard.reference.ReferenceSequenceFileWalker;
-import net.sf.samtools.SAMSequenceDictionary;
-import net.sf.samtools.SAMSequenceRecord;
 
 
 class VCFSequenomAnalysis extends CommandLineProgram 
diff --git a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFSequenomAnalysis2.java b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFSequenomAnalysis2.java
index 26d2877f2..0f0a14e4a 100644
--- a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFSequenomAnalysis2.java
+++ b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFSequenomAnalysis2.java
@@ -1,6 +1,29 @@
+/*
+ * 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.playground.tools.vcf;
-import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.CommandLineProgram;
+import org.broadinstitute.sting.commandline.Argument;
 
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
@@ -8,14 +31,7 @@ import java.io.*;
 import java.util.*;
 import java.lang.*;
 
-import net.sf.picard.PicardException;
 import net.sf.picard.util.Interval;
-import net.sf.picard.io.IoUtil;
-import net.sf.picard.reference.ReferenceSequence;
-import net.sf.picard.reference.ReferenceSequenceFile;
-import net.sf.picard.reference.ReferenceSequenceFileWalker;
-import net.sf.samtools.SAMSequenceDictionary;
-import net.sf.samtools.SAMSequenceRecord;
 
 
 class VCFSequenomAnalysis2 extends CommandLineProgram 
diff --git a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFTool.java b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFTool.java
index 4f25da9f0..6d56644ad 100644
--- a/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFTool.java
+++ b/java/src/org/broadinstitute/sting/playground/tools/vcf/VCFTool.java
@@ -1,10 +1,32 @@
+/*
+ * 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.playground.tools.vcf;
-import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram;
-import org.broadinstitute.sting.utils.cmdLine.Argument;
+import org.broadinstitute.sting.commandline.CommandLineProgram;
+import org.broadinstitute.sting.commandline.Argument;
 
 import org.broadinstitute.sting.utils.genotype.vcf.*;
 
-import org.broadinstitute.sting.utils.GenomeLoc;
 import org.broadinstitute.sting.utils.GenomeLocParser;
 
 
@@ -12,11 +34,7 @@ import java.io.*;
 import java.util.*;
 import java.util.zip.*;
 
-import net.sf.picard.PicardException;
 import net.sf.picard.util.Interval;
-import net.sf.picard.io.IoUtil;
-import net.sf.picard.reference.ReferenceSequence;
-import net.sf.picard.reference.ReferenceSequenceFile;
 import net.sf.picard.reference.ReferenceSequenceFileWalker;
 import net.sf.samtools.SAMSequenceDictionary;
 import net.sf.samtools.SAMSequenceRecord;
diff --git a/java/src/org/broadinstitute/sting/playground/utils/GenomicMap.java b/java/src/org/broadinstitute/sting/playground/utils/GenomicMap.java
index 71cb1d1ac..f253e8bf9 100644
--- a/java/src/org/broadinstitute/sting/playground/utils/GenomicMap.java
+++ b/java/src/org/broadinstitute/sting/playground/utils/GenomicMap.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.utils;
 
 import java.io.BufferedReader;
@@ -21,10 +44,11 @@ import net.sf.samtools.CigarOperator;
 import net.sf.samtools.SAMFileHeader;
 import net.sf.samtools.SAMFileReader;
 import net.sf.samtools.SAMRecord;
-import net.sf.samtools.SAMSequenceDictionary;
 
 import org.broadinstitute.sting.gatk.iterators.PushbackIterator;
 import org.broadinstitute.sting.utils.*;
+import org.broadinstitute.sting.utils.sam.AlignmentUtils;
+import org.broadinstitute.sting.utils.collections.Pair;
 
 public class GenomicMap implements Iterable > >{
 	
diff --git a/java/src/org/broadinstitute/sting/playground/utils/ParallelSAMIterator.java b/java/src/org/broadinstitute/sting/playground/utils/ParallelSAMIterator.java
index ff15a7d30..acf8564eb 100644
--- a/java/src/org/broadinstitute/sting/playground/utils/ParallelSAMIterator.java
+++ b/java/src/org/broadinstitute/sting/playground/utils/ParallelSAMIterator.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.utils;
 
 import net.sf.samtools.SAMRecord;
@@ -7,7 +30,7 @@ import net.sf.samtools.util.CloseableIterator;
 import java.util.List;
 import java.util.ArrayList;
 
-import org.broadinstitute.sting.utils.Pair;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.gatk.iterators.PushbackIterator;
 
 /**
diff --git a/java/src/org/broadinstitute/sting/playground/utils/PoolUtils.java b/java/src/org/broadinstitute/sting/playground/utils/PoolUtils.java
index 5269d35ff..a53a832fc 100755
--- a/java/src/org/broadinstitute/sting/playground/utils/PoolUtils.java
+++ b/java/src/org/broadinstitute/sting/playground/utils/PoolUtils.java
@@ -1,3 +1,26 @@
+/*
+ * 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.playground.utils;
 
 import net.sf.samtools.SAMRecord;
@@ -5,9 +28,7 @@ import net.sf.samtools.SAMRecord;
 import java.util.List;
 import java.util.ArrayList;
 
-import org.broadinstitute.sting.utils.Pair;
-import org.broadinstitute.sting.utils.QualityUtils;
-import org.broadinstitute.sting.utils.BaseUtils;
+import org.broadinstitute.sting.utils.collections.Pair;
 import org.broadinstitute.sting.playground.gatk.walkers.poolseq.ReadOffsetQuad;
 
 /**
diff --git a/java/src/org/broadinstitute/sting/playground/utils/ProcessUtils.java b/java/src/org/broadinstitute/sting/playground/utils/ProcessUtils.java
index bb2e19c19..65a047155 100644
--- a/java/src/org/broadinstitute/sting/playground/utils/ProcessUtils.java
+++ b/java/src/org/broadinstitute/sting/playground/utils/ProcessUtils.java
@@ -1,6 +1,29 @@
+/*
+ * 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.playground.utils;
 
-import org.broadinstitute.sting.utils.xReadLines;
+import org.broadinstitute.sting.utils.text.XReadLines;
 import org.broadinstitute.sting.utils.StingException;
 import org.apache.log4j.Logger;
 
@@ -23,10 +46,10 @@ public class ProcessUtils {
 			int result = p.waitFor();
 
 			if (logger.isDebugEnabled()) {
-				for (String line : new xReadLines(p.getInputStream())) {
+				for (String line : new XReadLines(p.getInputStream())) {
 					logger.debug("command: " + line);
 				}
-				for (String line : new xReadLines(p.getErrorStream())) {
+				for (String line : new XReadLines(p.getErrorStream())) {
 					logger.error("command: " + line);
 				}
 			}
diff --git a/java/src/org/broadinstitute/sting/playground/utils/report/templates/TableFormat.java b/java/src/org/broadinstitute/sting/playground/utils/report/templates/TableFormat.java
index 195608310..546ee4248 100644
--- a/java/src/org/broadinstitute/sting/playground/utils/report/templates/TableFormat.java
+++ b/java/src/org/broadinstitute/sting/playground/utils/report/templates/TableFormat.java
@@ -1,11 +1,28 @@
+/*
+ * 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.playground.utils.report.templates;
 
-import org.broadinstitute.sting.playground.utils.report.utils.Node;
-import org.broadinstitute.sting.utils.Pair;
-
-import java.io.*;
-import java.util.*;
-
 
 /**
  * 
diff --git a/java/src/org/broadinstitute/sting/utils/GenomeLocParser.java b/java/src/org/broadinstitute/sting/utils/GenomeLocParser.java
index 542572786..8b60ac3fe 100644
--- a/java/src/org/broadinstitute/sting/utils/GenomeLocParser.java
+++ b/java/src/org/broadinstitute/sting/utils/GenomeLocParser.java
@@ -1,3 +1,26 @@
+/*
+ * 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;
 
 import net.sf.picard.util.IntervalList;
@@ -11,6 +34,7 @@ import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
 import org.broadinstitute.sting.utils.interval.IntervalMergingRule;
 import org.broadinstitute.sting.gatk.arguments.ValidationExclusion;
 import org.broadinstitute.sting.utils.bed.BedParser;
+import org.broadinstitute.sting.utils.text.XReadLines;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -19,31 +43,6 @@ import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-/*
- * 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.
- */
-
 /**
  * Created by IntelliJ IDEA.
  * User: aaron
@@ -340,7 +339,7 @@ public class GenomeLocParser {
         catch (Exception e) {
             try {
                 List ret = new ArrayList();
-                xReadLines reader = new xReadLines(new File(file_name));
+                XReadLines reader = new XReadLines(new File(file_name));
                 for(String line: reader) {
                     try {
                         ret.add(parseGenomeInterval(line));
diff --git a/java/src/org/broadinstitute/sting/utils/ListUtils.java b/java/src/org/broadinstitute/sting/utils/ListUtils.java
deleted file mode 100644
index 022fde37e..000000000
--- a/java/src/org/broadinstitute/sting/utils/ListUtils.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package org.broadinstitute.sting.utils;
-
-import java.util.*;
-
-import net.sf.samtools.SAMRecord;
-
-/**
- * Created by IntelliJ IDEA.
- * User: andrew
- * Date: Jul 2, 2009
- * Time: 3:12:57 PM
- * To change this template use File | Settings | File Templates.
- */
-public class ListUtils {
-
-    static Random rand = new Random(12321); //System.currentTimeMillis());
-
-    /**
-     * Returns n random indices drawn with replacement from the range 0..(k-1)
-     *
-     * @param n the total number of indices sampled from
-     * @param k the number of random indices to draw (with replacement)
-     * @return a list of k random indices ranging from 0 to (n-1) with possible duplicates
-     */
-    static public ArrayList sampleIndicesWithReplacement(int n, int k) {
-
-        ArrayList chosen_balls = new ArrayList (k);
-        for (int i=0; i< k; i++) {
-            //Integer chosen_ball = balls[rand.nextInt(k)];
-            chosen_balls.add(rand.nextInt(n));
-            //balls.remove(chosen_ball);
-        }
-
-        return chosen_balls;
-    }
-
-    /**
-     * Returns n random indices drawn without replacement from the range 0..(k-1)
-     *
-     * @param n the total number of indices sampled from
-     * @param k the number of random indices to draw (without replacement)
-     * @return a list of k random indices ranging from 0 to (n-1) without duplicates
-     */
-    static public ArrayList sampleIndicesWithoutReplacement(int n, int k) {
-        ArrayList chosen_balls = new ArrayList(k);
-
-        for (int i = 0; i < n; i++) {
-            chosen_balls.add(i);
-        }
-
-        Collections.shuffle(chosen_balls, rand);
-
-        //return (ArrayList) chosen_balls.subList(0, k);
-        return new ArrayList(chosen_balls.subList(0, k));
-    }
-
-    /**
-     * Given a list of indices into a list, return those elements of the list with the possibility of drawing list elements multiple times
-
-     * @param indices  the list of indices for elements to extract
-     * @param list     the list from which the elements should be extracted
-     * @param       the template type of the ArrayList
-     * @return         a new ArrayList consisting of the elements at the specified indices
-     */
-    static public  ArrayList sliceListByIndices(List indices, List list) {
-        ArrayList subset = new ArrayList();
-
-        for (int i : indices) {
-            subset.add(list.get(i));
-        }
-
-        return subset;
-    }
-
-    public static Comparable orderStatisticSearch(int orderStat, List list) {
-        // this finds the order statistic of the list (kth largest element)
-        // the list is assumed *not* to be sorted
-
-        final Comparable x = list.get(orderStat);
-        ListIterator iterator = list.listIterator();
-        ArrayList lessThanX = new ArrayList();
-        ArrayList equalToX = new ArrayList();
-        ArrayList greaterThanX = new ArrayList();
-
-        for(Comparable y : list) {
-            if(x.compareTo(y) > 0) {
-                lessThanX.add(y);
-            } else if(x.compareTo(y) < 0) {
-                greaterThanX.add(y);
-            } else
-                equalToX.add(y);
-        }
-
-        if(lessThanX.size() > orderStat)
-            return orderStatisticSearch(orderStat, lessThanX);
-        else if(lessThanX.size() + equalToX.size() >= orderStat)
-            return orderStat;
-        else
-            return orderStatisticSearch(orderStat - lessThanX.size() - equalToX.size(), greaterThanX);
-
-    }
-
-
-    public static Object getMedian(List list) {
-        return orderStatisticSearch((int) Math.ceil(list.size()/2), list);
-    }
-
-    public static byte getQScoreOrderStatistic(List reads, List offsets, int k) {
-        // version of the order statistic calculator for SAMRecord/Integer lists, where the
-        // list index maps to a q-score only through the offset index
-        // returns the kth-largest q-score.
-
-        if( reads.size() == 0) {
-            return 0;
-        }
-        
-        ArrayList lessThanQReads = new ArrayList();
-        ArrayList equalToQReads = new ArrayList();
-        ArrayList greaterThanQReads = new ArrayList();
-        ArrayList lessThanQOffsets = new ArrayList();
-        ArrayList greaterThanQOffsets = new ArrayList();
-
-        final byte qk = reads.get(k).getBaseQualities()[offsets.get(k)];
-
-        for(int iter = 0; iter < reads.size(); iter ++) {
-            SAMRecord read = reads.get(iter);
-            int offset = offsets.get(iter);
-            byte quality = read.getBaseQualities()[offset];
-
-            if(quality < qk) {
-                lessThanQReads.add(read);
-                lessThanQOffsets.add(offset);
-            } else if(quality > qk) {
-                greaterThanQReads.add(read);
-                greaterThanQOffsets.add(offset);
-            } else {
-                equalToQReads.add(reads.get(iter));
-            }
-        }
-
-        if(lessThanQReads.size() > k)
-            return getQScoreOrderStatistic(lessThanQReads, lessThanQOffsets, k);
-        else if(equalToQReads.size() + lessThanQReads.size() >= k)
-            return qk;
-        else
-            return getQScoreOrderStatistic(greaterThanQReads, greaterThanQOffsets, k - lessThanQReads.size() - equalToQReads.size());
-
-    }
-
-
-    public static byte getQScoreMedian(List reads, List offsets) {
-        return getQScoreOrderStatistic(reads, offsets, (int)Math.floor(reads.size()/2.));
-    }
-
-}
diff --git a/java/src/org/broadinstitute/sting/utils/MathUtils.java b/java/src/org/broadinstitute/sting/utils/MathUtils.java
index 9c3b70daf..a8f1680b4 100755
--- a/java/src/org/broadinstitute/sting/utils/MathUtils.java
+++ b/java/src/org/broadinstitute/sting/utils/MathUtils.java
@@ -1,8 +1,34 @@
+/*
+ * 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;
 
 import cern.jet.math.Arithmetic;
 
 import java.math.BigDecimal;
+import java.util.*;
+
+import net.sf.samtools.SAMRecord;
 
 /**
  * MathUtils is a static class (no instantiation allowed!) with some useful math methods.
@@ -340,4 +366,351 @@ public class MathUtils {
 
         return minI;
     }
+
+    public static double average(List vals, int maxI) {
+        long sum = 0L;
+
+        int i = 0;
+        for (long x : vals) {
+            if (i > maxI)
+                break;
+            sum += x;
+            i++;
+            //System.out.printf(" %d/%d", sum, i);
+        }
+
+        //System.out.printf("Sum = %d, n = %d, maxI = %d, avg = %f%n", sum, i, maxI, (1.0 * sum) / i);
+
+        return (1.0 * sum) / i;
+    }
+
+    public static double averageDouble(List vals, int maxI) {
+        double sum = 0.0;
+
+        int i = 0;
+        for (double x : vals) {
+            if (i > maxI)
+                break;
+            sum += x;
+            i++;
+        }
+        return (1.0 * sum) / i;
+    }
+
+    public static double average(List vals) {
+        return average(vals, vals.size());
+    }
+
+    public static double averageDouble(List vals) {
+        return averageDouble(vals, vals.size());
+    }
+
+    // Java Generics can't do primitive types, so I had to do this the simplistic way
+
+    public static Integer[] sortPermutation(final int[] A) {
+        class comparator implements Comparator {
+            public int compare(Integer a, Integer b) {
+                if (A[a.intValue()] < A[b.intValue()]) {
+                    return -1;
+                }
+                if (A[a.intValue()] == A[b.intValue()]) {
+                    return 0;
+                }
+                if (A[a.intValue()] > A[b.intValue()]) {
+                    return 1;
+                }
+                return 0;
+            }
+        }
+        Integer[] permutation = new Integer[A.length];
+        for (int i = 0; i < A.length; i++) {
+            permutation[i] = i;
+        }
+        Arrays.sort(permutation, new comparator());
+        return permutation;
+    }
+
+    public static Integer[] sortPermutation(final double[] A) {
+        class comparator implements Comparator {
+            public int compare(Integer a, Integer b) {
+                if (A[a.intValue()] < A[b.intValue()]) {
+                    return -1;
+                }
+                if (A[a.intValue()] == A[b.intValue()]) {
+                    return 0;
+                }
+                if (A[a.intValue()] > A[b.intValue()]) {
+                    return 1;
+                }
+                return 0;
+            }
+        }
+        Integer[] permutation = new Integer[A.length];
+        for (int i = 0; i < A.length; i++) {
+            permutation[i] = i;
+        }
+        Arrays.sort(permutation, new comparator());
+        return permutation;
+    }
+
+    public static  Integer[] sortPermutation(List A) {
+        final Object[] data = A.toArray();
+
+        class comparator implements Comparator {
+            public int compare(Integer a, Integer b) {
+                return ((T) data[a]).compareTo(data[b]);
+            }
+        }
+        Integer[] permutation = new Integer[A.size()];
+        for (int i = 0; i < A.size(); i++) {
+            permutation[i] = i;
+        }
+        Arrays.sort(permutation, new comparator());
+        return permutation;
+    }
+
+
+    public static int[] permuteArray(int[] array, Integer[] permutation) {
+        int[] output = new int[array.length];
+        for (int i = 0; i < output.length; i++) {
+            output[i] = array[permutation[i]];
+        }
+        return output;
+    }
+
+    public static double[] permuteArray(double[] array, Integer[] permutation) {
+        double[] output = new double[array.length];
+        for (int i = 0; i < output.length; i++) {
+            output[i] = array[permutation[i]];
+        }
+        return output;
+    }
+
+    public static Object[] permuteArray(Object[] array, Integer[] permutation) {
+        Object[] output = new Object[array.length];
+        for (int i = 0; i < output.length; i++) {
+            output[i] = array[permutation[i]];
+        }
+        return output;
+    }
+
+    public static String[] permuteArray(String[] array, Integer[] permutation) {
+        String[] output = new String[array.length];
+        for (int i = 0; i < output.length; i++) {
+            output[i] = array[permutation[i]];
+        }
+        return output;
+    }
+
+    public static  List permuteList(List list, Integer[] permutation) {
+        List output = new ArrayList();
+        for (int i = 0; i < permutation.length; i++) {
+            output.add(list.get(permutation[i]));
+        }
+        return output;
+    }
+
+
+    /** Draw N random elements from list. */
+    public static  List randomSubset(List list, int N) {
+        if (list.size() <= N) {
+            return list;
+        }
+
+        java.util.Random random = new java.util.Random();
+
+        int idx[] = new int[list.size()];
+        for (int i = 0; i < list.size(); i++) {
+            idx[i] = random.nextInt();
+        }
+
+        Integer[] perm = sortPermutation(idx);
+
+        List ans = new ArrayList();
+        for (int i = 0; i < N; i++) {
+            ans.add(list.get(perm[i]));
+        }
+
+        return ans;
+    }
+
+    // lifted from the internet
+    // http://www.cs.princeton.edu/introcs/91float/Gamma.java.html
+    public static double logGamma(double x) {
+        double tmp = (x - 0.5) * Math.log(x + 4.5) - (x + 4.5);
+        double ser = 1.0 + 76.18009173 / (x + 0) - 86.50532033 / (x + 1)
+                + 24.01409822 / (x + 2) - 1.231739516 / (x + 3)
+                + 0.00120858003 / (x + 4) - 0.00000536382 / (x + 5);
+        return tmp + Math.log(ser * Math.sqrt(2 * Math.PI));
+    }
+
+    public static double percentage(double x, double base) {
+        return (base > 0 ? (x / base) * 100.0 : 0);
+    }
+
+    public static double percentage(int x, int base) {
+        return (base > 0 ? ((double) x / (double) base) * 100.0 : 0);
+    }
+
+    public static double percentage(long x, long base) {
+        return (base > 0 ? ((double) x / (double) base) * 100.0 : 0);
+    }
+
+    public static int countOccurrences(char c, String s) {
+        int count = 0;
+        for (int i = 0; i < s.length(); i++) {
+            count += s.charAt(i) == c ? 1 : 0;
+        }
+        return count;
+    }
+
+    public static  int countOccurrences(T x, List l) {
+        int count = 0;
+        for (T y : l) {
+            if (x.equals(y)) count++;
+        }
+
+        return count;
+    }
+
+
+    static Random rand = new Random(12321); //System.currentTimeMillis());
+
+    /**
+     * Returns n random indices drawn with replacement from the range 0..(k-1)
+     *
+     * @param n the total number of indices sampled from
+     * @param k the number of random indices to draw (with replacement)
+     * @return a list of k random indices ranging from 0 to (n-1) with possible duplicates
+     */
+    static public ArrayList sampleIndicesWithReplacement(int n, int k) {
+
+        ArrayList chosen_balls = new ArrayList (k);
+        for (int i=0; i< k; i++) {
+            //Integer chosen_ball = balls[rand.nextInt(k)];
+            chosen_balls.add(rand.nextInt(n));
+            //balls.remove(chosen_ball);
+        }
+
+        return chosen_balls;
+    }
+
+    /**
+     * Returns n random indices drawn without replacement from the range 0..(k-1)
+     *
+     * @param n the total number of indices sampled from
+     * @param k the number of random indices to draw (without replacement)
+     * @return a list of k random indices ranging from 0 to (n-1) without duplicates
+     */
+    static public ArrayList sampleIndicesWithoutReplacement(int n, int k) {
+        ArrayList chosen_balls = new ArrayList(k);
+
+        for (int i = 0; i < n; i++) {
+            chosen_balls.add(i);
+        }
+
+        Collections.shuffle(chosen_balls, rand);
+
+        //return (ArrayList) chosen_balls.subList(0, k);
+        return new ArrayList(chosen_balls.subList(0, k));
+    }
+
+    /**
+     * Given a list of indices into a list, return those elements of the list with the possibility of drawing list elements multiple times
+
+     * @param indices  the list of indices for elements to extract
+     * @param list     the list from which the elements should be extracted
+     * @param       the template type of the ArrayList
+     * @return         a new ArrayList consisting of the elements at the specified indices
+     */
+    static public  ArrayList sliceListByIndices(List indices, List list) {
+        ArrayList subset = new ArrayList();
+
+        for (int i : indices) {
+            subset.add(list.get(i));
+        }
+
+        return subset;
+    }
+
+    public static Comparable orderStatisticSearch(int orderStat, List list) {
+        // this finds the order statistic of the list (kth largest element)
+        // the list is assumed *not* to be sorted
+
+        final Comparable x = list.get(orderStat);
+        ListIterator iterator = list.listIterator();
+        ArrayList lessThanX = new ArrayList();
+        ArrayList equalToX = new ArrayList();
+        ArrayList greaterThanX = new ArrayList();
+
+        for(Comparable y : list) {
+            if(x.compareTo(y) > 0) {
+                lessThanX.add(y);
+            } else if(x.compareTo(y) < 0) {
+                greaterThanX.add(y);
+            } else
+                equalToX.add(y);
+        }
+
+        if(lessThanX.size() > orderStat)
+            return orderStatisticSearch(orderStat, lessThanX);
+        else if(lessThanX.size() + equalToX.size() >= orderStat)
+            return orderStat;
+        else
+            return orderStatisticSearch(orderStat - lessThanX.size() - equalToX.size(), greaterThanX);
+
+    }
+
+
+    public static Object getMedian(List list) {
+        return orderStatisticSearch((int) Math.ceil(list.size()/2), list);
+    }
+
+    public static byte getQScoreOrderStatistic(List reads, List offsets, int k) {
+        // version of the order statistic calculator for SAMRecord/Integer lists, where the
+        // list index maps to a q-score only through the offset index
+        // returns the kth-largest q-score.
+
+        if( reads.size() == 0) {
+            return 0;
+        }
+
+        ArrayList lessThanQReads = new ArrayList();
+        ArrayList equalToQReads = new ArrayList();
+        ArrayList greaterThanQReads = new ArrayList();
+        ArrayList lessThanQOffsets = new ArrayList();
+        ArrayList greaterThanQOffsets = new ArrayList();
+
+        final byte qk = reads.get(k).getBaseQualities()[offsets.get(k)];
+
+        for(int iter = 0; iter < reads.size(); iter ++) {
+            SAMRecord read = reads.get(iter);
+            int offset = offsets.get(iter);
+            byte quality = read.getBaseQualities()[offset];
+
+            if(quality < qk) {
+                lessThanQReads.add(read);
+                lessThanQOffsets.add(offset);
+            } else if(quality > qk) {
+                greaterThanQReads.add(read);
+                greaterThanQOffsets.add(offset);
+            } else {
+                equalToQReads.add(reads.get(iter));
+            }
+        }
+
+        if(lessThanQReads.size() > k)
+            return getQScoreOrderStatistic(lessThanQReads, lessThanQOffsets, k);
+        else if(equalToQReads.size() + lessThanQReads.size() >= k)
+            return qk;
+        else
+            return getQScoreOrderStatistic(greaterThanQReads, greaterThanQOffsets, k - lessThanQReads.size() - equalToQReads.size());
+
+    }
+
+
+    public static byte getQScoreMedian(List reads, List offsets) {
+        return getQScoreOrderStatistic(reads, offsets, (int)Math.floor(reads.size()/2.));
+    }
+    
 }
diff --git a/java/src/org/broadinstitute/sting/utils/SWPairwiseAlignment.java b/java/src/org/broadinstitute/sting/utils/SWPairwiseAlignment.java
index 04e4fc209..54277023f 100755
--- a/java/src/org/broadinstitute/sting/utils/SWPairwiseAlignment.java
+++ b/java/src/org/broadinstitute/sting/utils/SWPairwiseAlignment.java
@@ -1,3 +1,26 @@
+/*
+ * 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;
 
 import net.sf.samtools.CigarElement;
@@ -8,6 +31,8 @@ import java.util.List;
 import java.util.ArrayList;
 import java.util.Collections;
 
+import org.broadinstitute.sting.utils.collections.PrimitivePair;
+
 /**
  * Created by IntelliJ IDEA.
  * User: asivache
diff --git a/java/src/org/broadinstitute/sting/utils/SampleUtils.java b/java/src/org/broadinstitute/sting/utils/SampleUtils.java
index a2c6483be..30fd55a86 100755
--- a/java/src/org/broadinstitute/sting/utils/SampleUtils.java
+++ b/java/src/org/broadinstitute/sting/utils/SampleUtils.java
@@ -1,3 +1,26 @@
+/*
+ * 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;
 
 import net.sf.samtools.SAMFileHeader;
@@ -7,6 +30,7 @@ import org.broadinstitute.sting.gatk.datasources.simpleDataSources.ReferenceOrde
 import org.broadinstitute.sting.gatk.refdata.RodVCF;
 import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrack;
 import org.broadinstitute.sting.utils.genotype.vcf.VCFReader;
+import org.broadinstitute.sting.utils.collections.Pair;
 
 import java.util.*;
 
diff --git a/java/src/org/broadinstitute/sting/utils/Utils.java b/java/src/org/broadinstitute/sting/utils/Utils.java
index 3dc924511..56ed3d0df 100755
--- a/java/src/org/broadinstitute/sting/utils/Utils.java
+++ b/java/src/org/broadinstitute/sting/utils/Utils.java
@@ -1,10 +1,32 @@
+/*
+ * 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;
 
-import net.sf.samtools.*;
 import net.sf.samtools.util.StringUtil;
 import org.apache.log4j.Logger;
+import org.broadinstitute.sting.utils.collections.Pair;
 
-import java.io.File;
 import java.util.*;
 
 /**
@@ -73,27 +95,6 @@ public class Utils {
         logger.warn(String.format("* %s", builder));
     }
 
-    public static SAMFileHeader copySAMFileHeader(SAMFileHeader toCopy) {
-        SAMFileHeader copy = new SAMFileHeader();
-
-        copy.setSortOrder(toCopy.getSortOrder());
-        copy.setGroupOrder(toCopy.getGroupOrder());
-        copy.setProgramRecords(toCopy.getProgramRecords());
-        copy.setReadGroups(toCopy.getReadGroups());
-        copy.setSequenceDictionary(toCopy.getSequenceDictionary());
-
-        for (Map.Entry e : toCopy.getAttributes())
-            copy.setAttribute(e.getKey(), e.getValue());
-
-        return copy;
-    }
-
-    public static SAMFileWriter createSAMFileWriterWithCompression(SAMFileHeader header, boolean presorted, String file, int compression) {
-        if (file.endsWith(".bam"))
-            return new SAMFileWriterFactory().makeBAMWriter(header, presorted, new File(file), compression);
-        return new SAMFileWriterFactory().makeSAMOrBAMWriter(header, presorted, new File(file));
-    }
-
     public static ArrayList subseq(char[] fullArray) {
         byte[] fullByteArray = new byte[fullArray.length];
         StringUtil.charsToBytes(fullArray, 0, fullArray.length, fullByteArray, 0);
@@ -123,56 +124,6 @@ public class Utils {
         return new String(basesAsbytes);
     }
 
-    public static boolean isPlatformRead(SAMRecord read, String name) {
-        SAMReadGroupRecord readGroup = read.getReadGroup();
-        if (readGroup != null) {
-            Object readPlatformAttr = readGroup.getAttribute("PL");
-            if (readPlatformAttr != null)
-                return readPlatformAttr.toString().toUpperCase().contains(name);
-        }
-        return false;
-    }
-
-
-    public static boolean is454Read(SAMRecord read) {
-        return isPlatformRead(read, "454");
-    }
-
-    public static boolean isSOLiDRead(SAMRecord read) {
-        return isPlatformRead(read, "SOLID");
-    }
-
-    public static boolean isSLXRead(SAMRecord read) {
-        return isPlatformRead(read, "ILLUMINA");
-    }
-
-    private static final Map readFlagNames
-            = new HashMap();
-
-    static {
-        readFlagNames.put(0x1, "Paired");
-        readFlagNames.put(0x2, "Proper");
-        readFlagNames.put(0x4, "Unmapped");
-        readFlagNames.put(0x8, "MateUnmapped");
-        readFlagNames.put(0x10, "Forward");
-        //readFlagNames.put(0x20, "MateForward");
-        readFlagNames.put(0x4, "FirstOfPair");
-        readFlagNames.put(0x8, "SecondOfPair");
-        readFlagNames.put(0x100, "NotPrimary");
-        readFlagNames.put(0x200, "NON-PF");
-        readFlagNames.put(0x400, "Duplicate");
-    }
-
-    public static String readFlagsAsString(SAMRecord rec) {
-        String flags = "";
-        for (int flag : readFlagNames.keySet()) {
-            if ((rec.getFlags() & flag) != 0) {
-                flags += readFlagNames.get(flag) + " ";
-            }
-        }
-        return flags;
-    }
-
     /**
      * join the key value pairs of a map into one string, i.e. myMap = [A->1,B->2,C->3] with a call of:
      * joinMap("-","*",myMap) -> returns A-1*B-2*C-3
@@ -230,195 +181,6 @@ public class Utils {
         return join(separator, strs.toArray(new String[0]));
     }
 
-    public static double average(List vals, int maxI) {
-        long sum = 0L;
-
-        int i = 0;
-        for (long x : vals) {
-            if (i > maxI)
-                break;
-            sum += x;
-            i++;
-            //System.out.printf(" %d/%d", sum, i);
-        }
-
-        //System.out.printf("Sum = %d, n = %d, maxI = %d, avg = %f%n", sum, i, maxI, (1.0 * sum) / i);
-
-        return (1.0 * sum) / i;
-    }
-
-    public static double averageDouble(List vals, int maxI) {
-        double sum = 0.0;
-
-        int i = 0;
-        for (double x : vals) {
-            if (i > maxI)
-                break;
-            sum += x;
-            i++;
-        }
-        return (1.0 * sum) / i;
-    }
-
-    public static double average(List vals) {
-        return average(vals, vals.size());
-    }
-
-    public static double averageDouble(List vals) {
-        return averageDouble(vals, vals.size());
-    }
-
-    // Java Generics can't do primitive types, so I had to do this the simplistic way
-
-    public static Integer[] SortPermutation(final int[] A) {
-        class comparator implements Comparator {
-            public int compare(Integer a, Integer b) {
-                if (A[a.intValue()] < A[b.intValue()]) {
-                    return -1;
-                }
-                if (A[a.intValue()] == A[b.intValue()]) {
-                    return 0;
-                }
-                if (A[a.intValue()] > A[b.intValue()]) {
-                    return 1;
-                }
-                return 0;
-            }
-        }
-        Integer[] permutation = new Integer[A.length];
-        for (int i = 0; i < A.length; i++) {
-            permutation[i] = i;
-        }
-        Arrays.sort(permutation, new comparator());
-        return permutation;
-    }
-
-    public static Integer[] SortPermutation(final double[] A) {
-        class comparator implements Comparator {
-            public int compare(Integer a, Integer b) {
-                if (A[a.intValue()] < A[b.intValue()]) {
-                    return -1;
-                }
-                if (A[a.intValue()] == A[b.intValue()]) {
-                    return 0;
-                }
-                if (A[a.intValue()] > A[b.intValue()]) {
-                    return 1;
-                }
-                return 0;
-            }
-        }
-        Integer[] permutation = new Integer[A.length];
-        for (int i = 0; i < A.length; i++) {
-            permutation[i] = i;
-        }
-        Arrays.sort(permutation, new comparator());
-        return permutation;
-    }
-
-    public static  Integer[] SortPermutation(List A) {
-        final Object[] data = A.toArray();
-
-        class comparator implements Comparator {
-            public int compare(Integer a, Integer b) {
-                return ((T) data[a]).compareTo(data[b]);
-            }
-        }
-        Integer[] permutation = new Integer[A.size()];
-        for (int i = 0; i < A.size(); i++) {
-            permutation[i] = i;
-        }
-        Arrays.sort(permutation, new comparator());
-        return permutation;
-    }
-
-
-    public static int[] PermuteArray(int[] array, Integer[] permutation) {
-        int[] output = new int[array.length];
-        for (int i = 0; i < output.length; i++) {
-            output[i] = array[permutation[i]];
-        }
-        return output;
-    }
-
-    public static double[] PermuteArray(double[] array, Integer[] permutation) {
-        double[] output = new double[array.length];
-        for (int i = 0; i < output.length; i++) {
-            output[i] = array[permutation[i]];
-        }
-        return output;
-    }
-
-    public static Object[] PermuteArray(Object[] array, Integer[] permutation) {
-        Object[] output = new Object[array.length];
-        for (int i = 0; i < output.length; i++) {
-            output[i] = array[permutation[i]];
-        }
-        return output;
-    }
-
-    public static String[] PermuteArray(String[] array, Integer[] permutation) {
-        String[] output = new String[array.length];
-        for (int i = 0; i < output.length; i++) {
-            output[i] = array[permutation[i]];
-        }
-        return output;
-    }
-
-    public static  List PermuteList(List list, Integer[] permutation) {
-        List output = new ArrayList();
-        for (int i = 0; i < permutation.length; i++) {
-            output.add(list.get(permutation[i]));
-        }
-        return output;
-    }
-
-
-    /** Draw N random elements from list. */
-    public static  List RandomSubset(List list, int N) {
-        if (list.size() <= N) {
-            return list;
-        }
-
-        java.util.Random random = new java.util.Random();
-
-        int idx[] = new int[list.size()];
-        for (int i = 0; i < list.size(); i++) {
-            idx[i] = random.nextInt();
-        }
-
-        Integer[] perm = SortPermutation(idx);
-
-        List ans = new ArrayList();
-        for (int i = 0; i < N; i++) {
-            ans.add(list.get(perm[i]));
-        }
-
-        return ans;
-    }
-
-    // lifted from the internet 
-    // http://www.cs.princeton.edu/introcs/91float/Gamma.java.html
-    public static double logGamma(double x) {
-        double tmp = (x - 0.5) * Math.log(x + 4.5) - (x + 4.5);
-        double ser = 1.0 + 76.18009173 / (x + 0) - 86.50532033 / (x + 1)
-                + 24.01409822 / (x + 2) - 1.231739516 / (x + 3)
-                + 0.00120858003 / (x + 4) - 0.00000536382 / (x + 5);
-        return tmp + Math.log(ser * Math.sqrt(2 * Math.PI));
-    }
-
-    public static double percentage(double x, double base) {
-        return (base > 0 ? (x / base) * 100.0 : 0);
-    }
-
-    public static double percentage(int x, int base) {
-        return (base > 0 ? ((double) x / (double) base) * 100.0 : 0);
-    }
-
-    public static double percentage(long x, long base) {
-        return (base > 0 ? ((double) x / (double) base) * 100.0 : 0);
-    }
-
     public static String dupString(char c, int nCopies) {
         char[] chars = new char[nCopies];
         Arrays.fill(chars, c);
@@ -431,23 +193,6 @@ public class Utils {
         return bytes;
     }
 
-    public static int countOccurrences(char c, String s) {
-        int count = 0;
-        for (int i = 0; i < s.length(); i++) {
-            count += s.charAt(i) == c ? 1 : 0;
-        }
-        return count;
-    }
-
-    public static  int countOccurrences(T x, List l) {
-        int count = 0;
-        for (T y : l) {
-            if (x.equals(y)) count++;
-        }
-
-        return count;
-    }
-
     // trim a string for the given character (i.e. not just whitespace)
     public static String trim(String str, char ch) {
         char[] array = str.toCharArray();
diff --git a/java/src/org/broadinstitute/sting/utils/WilcoxonRankSum.java b/java/src/org/broadinstitute/sting/utils/WilcoxonRankSum.java
index 4a4fb22d7..5c1723f1d 100755
--- a/java/src/org/broadinstitute/sting/utils/WilcoxonRankSum.java
+++ b/java/src/org/broadinstitute/sting/utils/WilcoxonRankSum.java
@@ -1,9 +1,34 @@
+/*
+ * 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;
 
 import cern.jet.random.Normal;
 
 import java.util.*;
 
+import org.broadinstitute.sting.utils.collections.Pair;
+
 public class WilcoxonRankSum {
     static final String headerString = ("nA nB .005 .01 .025 .05 .10 .20");
     static final String header[] = headerString.split(" ");
diff --git a/java/src/org/broadinstitute/sting/utils/JVMUtils.java b/java/src/org/broadinstitute/sting/utils/classloader/JVMUtils.java
similarity index 78%
rename from java/src/org/broadinstitute/sting/utils/JVMUtils.java
rename to java/src/org/broadinstitute/sting/utils/classloader/JVMUtils.java
index da42ed60b..d9944b7c5 100755
--- a/java/src/org/broadinstitute/sting/utils/JVMUtils.java
+++ b/java/src/org/broadinstitute/sting/utils/classloader/JVMUtils.java
@@ -1,4 +1,29 @@
-package org.broadinstitute.sting.utils;
+/*
+ * 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.StingException;
 
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Field;
diff --git a/java/src/org/broadinstitute/sting/utils/PackageUtils.java b/java/src/org/broadinstitute/sting/utils/classloader/PackageUtils.java
similarity index 66%
rename from java/src/org/broadinstitute/sting/utils/PackageUtils.java
rename to java/src/org/broadinstitute/sting/utils/classloader/PackageUtils.java
index cb04ef725..b745391d0 100755
--- a/java/src/org/broadinstitute/sting/utils/PackageUtils.java
+++ b/java/src/org/broadinstitute/sting/utils/classloader/PackageUtils.java
@@ -1,9 +1,33 @@
-package org.broadinstitute.sting.utils;
+/*
+ * 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.reflections.Reflections;
 import org.reflections.scanners.SubTypesScanner;
 import org.reflections.util.AbstractConfiguration;
 import org.reflections.util.ClasspathHelper;
+import org.broadinstitute.sting.utils.classloader.JVMUtils;
 
 import java.util.Set;
 import java.util.ArrayList;
diff --git a/java/src/org/broadinstitute/sting/utils/PluginManager.java b/java/src/org/broadinstitute/sting/utils/classloader/PluginManager.java
similarity index 76%
rename from java/src/org/broadinstitute/sting/utils/PluginManager.java
rename to java/src/org/broadinstitute/sting/utils/classloader/PluginManager.java
index aea9c6736..399caea44 100644
--- a/java/src/org/broadinstitute/sting/utils/PluginManager.java
+++ b/java/src/org/broadinstitute/sting/utils/classloader/PluginManager.java
@@ -1,4 +1,30 @@
-package org.broadinstitute.sting.utils;
+/*
+ * 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.classloader.PackageUtils;
+import org.broadinstitute.sting.utils.StingException;
 
 import java.util.HashMap;
 import java.util.List;
diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentCollection.java b/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentCollection.java
deleted file mode 100755
index c14767a29..000000000
--- a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentCollection.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.broadinstitute.sting.utils.cmdLine;
-
-import java.lang.annotation.*;
-
-/**
- *
- * User: aaron
- * Date: May 8, 2009
- * Time: 7:12:06 PM
- *
- * The Broad Institute
- * SOFTWARE COPYRIGHT NOTICE AGREEMENT 
- * This software and its documentation are copyright 2009 by the
- * Broad Institute/Massachusetts Institute of Technology. All rights are reserved.
- *
- * This software is supplied without any warranty or guaranteed support whatsoever. Neither
- * the Broad Institute nor MIT can be responsible for its use, misuse, or functionality.
- *
- */
-
-
-/**
- * @author aaron
- * @version 1.0
- * @date May 8, 2009
- * 

- * @interface ArgumentCollection - *

- * This object represents an class, that is a collection of arguments. - */ -@Documented -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.FIELD}) -public @interface ArgumentCollection { - -} diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentException.java b/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentException.java deleted file mode 100755 index 54148e6f7..000000000 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/ArgumentException.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.broadinstitute.sting.utils.cmdLine; - -import org.broadinstitute.sting.utils.StingException; - -/** - * Generic class for handling misc parsing exceptions. - */ -public class ArgumentException extends StingException { - public ArgumentException( String message ) { - super( message ); - } -} - diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/EnumerationArgumentDefault.java b/java/src/org/broadinstitute/sting/utils/cmdLine/EnumerationArgumentDefault.java deleted file mode 100644 index 62e8d8b4b..000000000 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/EnumerationArgumentDefault.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.broadinstitute.sting.utils.cmdLine; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * @author aaron - *

- * Annotation EnumerationArgumentDefault - *

- * Allows the default argument value to be set for an enum; this allows us to treat enums as - * booleans on the command line. I.e. - * - * if we're using an enum Shape, - * - * enum shape { - * SQUARE, - * CIRCLE, - * @EnumerationArgumentDefault - * TRIANGLE - * } - * - * and a command line option -shape, the EnumerationArgumentDefault would allow you to say: - * -shape - * or - * -shape TRIANGLE - * - * would get -shape set to TRIANGLE, where: - * - * -shape SQUARE - * - * would set shape to SQUARE - * - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface EnumerationArgumentDefault { -} diff --git a/java/src/org/broadinstitute/sting/utils/cmdLine/package-info.java b/java/src/org/broadinstitute/sting/utils/cmdLine/package-info.java deleted file mode 100644 index 5afdbb1bb..000000000 --- a/java/src/org/broadinstitute/sting/utils/cmdLine/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Parses a wide variety of command-line arguments in single-pass and multipass strategies. - */ -package org.broadinstitute.sting.utils.cmdLine; \ No newline at end of file diff --git a/java/src/org/broadinstitute/sting/utils/CircularArray.java b/java/src/org/broadinstitute/sting/utils/collections/CircularArray.java similarity index 84% rename from java/src/org/broadinstitute/sting/utils/CircularArray.java rename to java/src/org/broadinstitute/sting/utils/collections/CircularArray.java index 2b3372657..119aa6818 100644 --- a/java/src/org/broadinstitute/sting/utils/CircularArray.java +++ b/java/src/org/broadinstitute/sting/utils/collections/CircularArray.java @@ -1,4 +1,29 @@ -package org.broadinstitute.sting.utils; +/* + * 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.collections; + +import org.broadinstitute.sting.utils.StingException; /** This class, closely resembling a deque (except that it is not dynamically grown), diff --git a/java/src/org/broadinstitute/sting/utils/ExpandingArrayList.java b/java/src/org/broadinstitute/sting/utils/collections/ExpandingArrayList.java similarity index 52% rename from java/src/org/broadinstitute/sting/utils/ExpandingArrayList.java rename to java/src/org/broadinstitute/sting/utils/collections/ExpandingArrayList.java index 2c32ceafc..18222a95a 100755 --- a/java/src/org/broadinstitute/sting/utils/ExpandingArrayList.java +++ b/java/src/org/broadinstitute/sting/utils/collections/ExpandingArrayList.java @@ -1,4 +1,27 @@ -package org.broadinstitute.sting.utils; +/* + * 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.collections; import java.util.ArrayList; import java.util.Collection; diff --git a/java/src/org/broadinstitute/sting/utils/MergingIterator.java b/java/src/org/broadinstitute/sting/utils/collections/MergingIterator.java similarity index 77% rename from java/src/org/broadinstitute/sting/utils/MergingIterator.java rename to java/src/org/broadinstitute/sting/utils/collections/MergingIterator.java index 7817052c5..a63529bdb 100644 --- a/java/src/org/broadinstitute/sting/utils/MergingIterator.java +++ b/java/src/org/broadinstitute/sting/utils/collections/MergingIterator.java @@ -1,7 +1,32 @@ -package org.broadinstitute.sting.utils; +/* + * 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.collections; import org.broadinstitute.sting.gatk.refdata.utils.LocationAwareSeekableRODIterator; import org.broadinstitute.sting.gatk.refdata.utils.RODRecordList; +import org.broadinstitute.sting.utils.GenomeLoc; +import org.broadinstitute.sting.utils.StingException; import java.util.*; diff --git a/java/src/org/broadinstitute/sting/utils/NestedHashMap.java b/java/src/org/broadinstitute/sting/utils/collections/NestedHashMap.java similarity index 86% rename from java/src/org/broadinstitute/sting/utils/NestedHashMap.java rename to java/src/org/broadinstitute/sting/utils/collections/NestedHashMap.java index 83239d90e..aa7f5a448 100755 --- a/java/src/org/broadinstitute/sting/utils/NestedHashMap.java +++ b/java/src/org/broadinstitute/sting/utils/collections/NestedHashMap.java @@ -1,32 +1,30 @@ -package org.broadinstitute.sting.utils; - -import java.util.*; - /* - * Copyright (c) 2009 The Broad Institute - * + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +package org.broadinstitute.sting.utils.collections; + +import java.util.*; + /** * Created by IntelliJ IDEA. * User: rpoplin diff --git a/java/src/org/broadinstitute/sting/utils/Pair.java b/java/src/org/broadinstitute/sting/utils/collections/Pair.java similarity index 63% rename from java/src/org/broadinstitute/sting/utils/Pair.java rename to java/src/org/broadinstitute/sting/utils/collections/Pair.java index 3f358a735..5015dcafc 100644 --- a/java/src/org/broadinstitute/sting/utils/Pair.java +++ b/java/src/org/broadinstitute/sting/utils/collections/Pair.java @@ -1,4 +1,27 @@ -package org.broadinstitute.sting.utils; +/* + * 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.collections; public class Pair { diff --git a/java/src/org/broadinstitute/sting/utils/PrimitivePair.java b/java/src/org/broadinstitute/sting/utils/collections/PrimitivePair.java similarity index 83% rename from java/src/org/broadinstitute/sting/utils/PrimitivePair.java rename to java/src/org/broadinstitute/sting/utils/collections/PrimitivePair.java index 8abb41414..29e14d184 100644 --- a/java/src/org/broadinstitute/sting/utils/PrimitivePair.java +++ b/java/src/org/broadinstitute/sting/utils/collections/PrimitivePair.java @@ -1,4 +1,27 @@ -package org.broadinstitute.sting.utils; +/* + * 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.collections; /** This class is used to group together multiple Pair classes for diff --git a/java/src/org/broadinstitute/sting/utils/duplicates/DupUtils.java b/java/src/org/broadinstitute/sting/utils/duplicates/DupUtils.java index 104b1a431..33ea57610 100644 --- a/java/src/org/broadinstitute/sting/utils/duplicates/DupUtils.java +++ b/java/src/org/broadinstitute/sting/utils/duplicates/DupUtils.java @@ -1,13 +1,35 @@ +/* + * 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.duplicates; import net.sf.samtools.SAMRecord; import org.broadinstitute.sting.utils.*; +import org.broadinstitute.sting.utils.collections.Pair; import org.broadinstitute.sting.utils.pileup.ReadBackedPileup; import org.broadinstitute.sting.utils.pileup.PileupElement; -import org.broadinstitute.sting.oneoffprojects.multisamplecaller.BasicPileup; import java.util.List; -import java.util.ArrayList; import java.util.Arrays; public class DupUtils { diff --git a/java/src/org/broadinstitute/sting/utils/genotype/DiploidGenotype.java b/java/src/org/broadinstitute/sting/utils/genotype/DiploidGenotype.java index 19117be2a..248e3809a 100755 --- a/java/src/org/broadinstitute/sting/utils/genotype/DiploidGenotype.java +++ b/java/src/org/broadinstitute/sting/utils/genotype/DiploidGenotype.java @@ -1,7 +1,30 @@ +/* + * 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.genotype; -import org.broadinstitute.sting.utils.Utils; import org.broadinstitute.sting.utils.BaseUtils; +import org.broadinstitute.sting.utils.MathUtils; /** * Created by IntelliJ IDEA. @@ -37,7 +60,7 @@ public enum DiploidGenotype { } public boolean isHetRef(char r) { - return Utils.countOccurrences(r, this.toString()) == 1; + return MathUtils.countOccurrences(r, this.toString()) == 1; } public boolean isHom() { diff --git a/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFUtils.java b/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFUtils.java index 171173258..1c44e000f 100755 --- a/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFUtils.java +++ b/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFUtils.java @@ -1,10 +1,33 @@ +/* + * 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.genotype.vcf; import org.broadinstitute.sting.gatk.GenomeAnalysisEngine; import org.broadinstitute.sting.gatk.datasources.simpleDataSources.ReferenceOrderedDataSource; import org.broadinstitute.sting.gatk.refdata.RodVCF; import org.broadinstitute.sting.gatk.refdata.tracks.RMDTrack; -import org.broadinstitute.sting.utils.Pair; +import org.broadinstitute.sting.utils.collections.Pair; import org.broadinstitute.sting.utils.Utils; import java.util.*; diff --git a/java/src/org/broadinstitute/sting/utils/help/ApplicationDetails.java b/java/src/org/broadinstitute/sting/utils/help/ApplicationDetails.java index 297ae1126..6fbc5e9c7 100644 --- a/java/src/org/broadinstitute/sting/utils/help/ApplicationDetails.java +++ b/java/src/org/broadinstitute/sting/utils/help/ApplicationDetails.java @@ -1,33 +1,31 @@ /* - * Copyright (c) 2009 The Broad Institute - * + * 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 + * 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, + * 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. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package org.broadinstitute.sting.utils.help; -import org.broadinstitute.sting.utils.JVMUtils; +import org.broadinstitute.sting.utils.classloader.JVMUtils; import org.broadinstitute.sting.utils.StingException; -import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram; +import org.broadinstitute.sting.commandline.CommandLineProgram; import java.util.List; import java.util.Collections; diff --git a/java/src/org/broadinstitute/sting/utils/help/HelpFormatter.java b/java/src/org/broadinstitute/sting/utils/help/HelpFormatter.java index a57c9afe5..f3674dafc 100755 --- a/java/src/org/broadinstitute/sting/utils/help/HelpFormatter.java +++ b/java/src/org/broadinstitute/sting/utils/help/HelpFormatter.java @@ -1,9 +1,32 @@ +/* + * 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.help; -import org.broadinstitute.sting.utils.cmdLine.ArgumentDefinition; -import org.broadinstitute.sting.utils.cmdLine.ArgumentDefinitionGroup; -import org.broadinstitute.sting.utils.cmdLine.ArgumentDefinitions; -import org.broadinstitute.sting.utils.TextFormattingUtils; +import org.broadinstitute.sting.commandline.ArgumentDefinition; +import org.broadinstitute.sting.commandline.ArgumentDefinitionGroup; +import org.broadinstitute.sting.commandline.ArgumentDefinitions; +import org.broadinstitute.sting.utils.text.TextFormattingUtils; import org.broadinstitute.sting.utils.Utils; import org.apache.log4j.Logger; @@ -16,19 +39,6 @@ import java.util.Collection; import java.util.Collections; import java.text.DateFormat; import java.text.SimpleDateFormat; -/** - * User: hanna - * Date: May 6, 2009 - * Time: 10:16:43 AM - * BROAD INSTITUTE SOFTWARE COPYRIGHT NOTICE AND AGREEMENT - * Software and documentation are copyright 2005 by the Broad Institute. - * All rights are reserved. - * - * Users acknowledge that this software is supplied without any warranty or support. - * The Broad Institute is not responsible for its use, misuse, or - * functionality. - */ - /** * Print out help for Sting command-line applications. */ diff --git a/java/src/org/broadinstitute/sting/utils/help/ResourceBundleExtractorDoclet.java b/java/src/org/broadinstitute/sting/utils/help/ResourceBundleExtractorDoclet.java index 507512608..9b0925985 100644 --- a/java/src/org/broadinstitute/sting/utils/help/ResourceBundleExtractorDoclet.java +++ b/java/src/org/broadinstitute/sting/utils/help/ResourceBundleExtractorDoclet.java @@ -1,3 +1,26 @@ +/* + * 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.help; import com.sun.javadoc.*; @@ -7,7 +30,7 @@ import java.io.PrintStream; import java.io.IOException; import org.broadinstitute.sting.utils.StingException; -import org.broadinstitute.sting.utils.JVMUtils; +import org.broadinstitute.sting.utils.classloader.JVMUtils; import org.broadinstitute.sting.utils.Utils; import org.broadinstitute.sting.gatk.walkers.Walker; diff --git a/java/src/org/broadinstitute/sting/utils/pileup/ReadBackedExtendedEventPileup.java b/java/src/org/broadinstitute/sting/utils/pileup/ReadBackedExtendedEventPileup.java index bbaca9af8..6c15dd4fe 100644 --- a/java/src/org/broadinstitute/sting/utils/pileup/ReadBackedExtendedEventPileup.java +++ b/java/src/org/broadinstitute/sting/utils/pileup/ReadBackedExtendedEventPileup.java @@ -1,8 +1,31 @@ +/* + * 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.pileup; import org.broadinstitute.sting.utils.GenomeLoc; import org.broadinstitute.sting.utils.StingException; -import org.broadinstitute.sting.utils.Pair; +import org.broadinstitute.sting.utils.collections.Pair; import java.util.*; diff --git a/java/src/org/broadinstitute/sting/utils/AlignmentUtils.java b/java/src/org/broadinstitute/sting/utils/sam/AlignmentUtils.java similarity index 90% rename from java/src/org/broadinstitute/sting/utils/AlignmentUtils.java rename to java/src/org/broadinstitute/sting/utils/sam/AlignmentUtils.java index 4475daf25..70caa03ed 100644 --- a/java/src/org/broadinstitute/sting/utils/AlignmentUtils.java +++ b/java/src/org/broadinstitute/sting/utils/sam/AlignmentUtils.java @@ -1,4 +1,27 @@ -package org.broadinstitute.sting.utils; +/* + * 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.sam; import net.sf.samtools.CigarOperator; import net.sf.samtools.SAMRecord; @@ -7,6 +30,8 @@ import net.sf.samtools.CigarElement; import net.sf.samtools.util.StringUtil; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; import org.broadinstitute.sting.utils.pileup.*; +import org.broadinstitute.sting.utils.StingException; +import org.broadinstitute.sting.utils.BaseUtils; public class AlignmentUtils { diff --git a/java/src/org/broadinstitute/sting/utils/ComparableSAMRecord.java b/java/src/org/broadinstitute/sting/utils/sam/ComparableSAMRecord.java similarity index 52% rename from java/src/org/broadinstitute/sting/utils/ComparableSAMRecord.java rename to java/src/org/broadinstitute/sting/utils/sam/ComparableSAMRecord.java index 01e5baba8..757db4123 100755 --- a/java/src/org/broadinstitute/sting/utils/ComparableSAMRecord.java +++ b/java/src/org/broadinstitute/sting/utils/sam/ComparableSAMRecord.java @@ -1,6 +1,31 @@ -package org.broadinstitute.sting.utils; +/* + * 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.sam; import net.sf.samtools.SAMRecord; +import org.broadinstitute.sting.utils.GenomeLoc; +import org.broadinstitute.sting.utils.GenomeLocParser; public class ComparableSAMRecord implements Comparable { @@ -9,7 +34,7 @@ public class ComparableSAMRecord implements Comparable { public ComparableSAMRecord(SAMRecord record) { this.record = record; - this.loc = new GenomeLoc(record); + this.loc = GenomeLocParser.createGenomeLoc(record); } public SAMRecord getRecord() { diff --git a/java/src/org/broadinstitute/sting/utils/sam/ReadUtils.java b/java/src/org/broadinstitute/sting/utils/sam/ReadUtils.java new file mode 100644 index 000000000..082db293d --- /dev/null +++ b/java/src/org/broadinstitute/sting/utils/sam/ReadUtils.java @@ -0,0 +1,112 @@ +/* + * 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.sam; + +import net.sf.samtools.*; + +import java.util.Map; +import java.util.HashMap; +import java.io.File; + +/** + * A miscellaneous collection of utilities for working with SAM files, headers, etc. + * Static methods only, please. + * + * @author mhanna + * @version 0.1 + */ +public class ReadUtils { + private ReadUtils() { } + + public static SAMFileHeader copySAMFileHeader(SAMFileHeader toCopy) { + SAMFileHeader copy = new SAMFileHeader(); + + copy.setSortOrder(toCopy.getSortOrder()); + copy.setGroupOrder(toCopy.getGroupOrder()); + copy.setProgramRecords(toCopy.getProgramRecords()); + copy.setReadGroups(toCopy.getReadGroups()); + copy.setSequenceDictionary(toCopy.getSequenceDictionary()); + + for (Map.Entry e : toCopy.getAttributes()) + copy.setAttribute(e.getKey(), e.getValue()); + + return copy; + } + + public static SAMFileWriter createSAMFileWriterWithCompression(SAMFileHeader header, boolean presorted, String file, int compression) { + if (file.endsWith(".bam")) + return new SAMFileWriterFactory().makeBAMWriter(header, presorted, new File(file), compression); + return new SAMFileWriterFactory().makeSAMOrBAMWriter(header, presorted, new File(file)); + } + + public static boolean isPlatformRead(SAMRecord read, String name) { + SAMReadGroupRecord readGroup = read.getReadGroup(); + if (readGroup != null) { + Object readPlatformAttr = readGroup.getAttribute("PL"); + if (readPlatformAttr != null) + return readPlatformAttr.toString().toUpperCase().contains(name); + } + return false; + } + + + public static boolean is454Read(SAMRecord read) { + return isPlatformRead(read, "454"); + } + + public static boolean isSOLiDRead(SAMRecord read) { + return isPlatformRead(read, "SOLID"); + } + + public static boolean isSLXRead(SAMRecord read) { + return isPlatformRead(read, "ILLUMINA"); + } + + private static final Map readFlagNames + = new HashMap(); + + static { + readFlagNames.put(0x1, "Paired"); + readFlagNames.put(0x2, "Proper"); + readFlagNames.put(0x4, "Unmapped"); + readFlagNames.put(0x8, "MateUnmapped"); + readFlagNames.put(0x10, "Forward"); + //readFlagNames.put(0x20, "MateForward"); + readFlagNames.put(0x4, "FirstOfPair"); + readFlagNames.put(0x8, "SecondOfPair"); + readFlagNames.put(0x100, "NotPrimary"); + readFlagNames.put(0x200, "NON-PF"); + readFlagNames.put(0x400, "Duplicate"); + } + + public static String readFlagsAsString(SAMRecord rec) { + String flags = ""; + for (int flag : readFlagNames.keySet()) { + if ((rec.getFlags() & flag) != 0) { + flags += readFlagNames.get(flag) + " "; + } + } + return flags; + } +} diff --git a/java/src/org/broadinstitute/sting/utils/TextFormattingUtils.java b/java/src/org/broadinstitute/sting/utils/text/TextFormattingUtils.java similarity index 73% rename from java/src/org/broadinstitute/sting/utils/TextFormattingUtils.java rename to java/src/org/broadinstitute/sting/utils/text/TextFormattingUtils.java index 458626cbc..f2de650b9 100644 --- a/java/src/org/broadinstitute/sting/utils/TextFormattingUtils.java +++ b/java/src/org/broadinstitute/sting/utils/text/TextFormattingUtils.java @@ -1,6 +1,30 @@ -package org.broadinstitute.sting.utils; +/* + * 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.text; import org.apache.log4j.Logger; +import org.broadinstitute.sting.utils.StingException; import java.util.*; import java.util.regex.Pattern; diff --git a/java/src/org/broadinstitute/sting/utils/xReadLines.java b/java/src/org/broadinstitute/sting/utils/text/XReadLines.java old mode 100755 new mode 100644 similarity index 69% rename from java/src/org/broadinstitute/sting/utils/xReadLines.java rename to java/src/org/broadinstitute/sting/utils/text/XReadLines.java index 723c321bb..7414d97fc --- a/java/src/org/broadinstitute/sting/utils/xReadLines.java +++ b/java/src/org/broadinstitute/sting/utils/text/XReadLines.java @@ -1,4 +1,27 @@ -package org.broadinstitute.sting.utils; +/* + * 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.text; import java.util.Iterator; import java.util.List; @@ -22,7 +45,7 @@ import java.io.*; * * For the love of god, please use this system for reading lines in a file. */ -public class xReadLines implements Iterator, Iterable { +public class XReadLines implements Iterator, Iterable { private BufferedReader in; // The stream we're reading from private String nextline = null; // Return value of next call to next() private boolean trimWhitespace = true; @@ -33,11 +56,11 @@ public class xReadLines implements Iterator, Iterable { * @param filename * @throws FileNotFoundException */ - public xReadLines(final File filename, final boolean trimWhitespace) throws FileNotFoundException { + public XReadLines(final File filename, final boolean trimWhitespace) throws FileNotFoundException { this(new FileReader(filename), trimWhitespace); } - public xReadLines(final File filename) throws FileNotFoundException { + public XReadLines(final File filename) throws FileNotFoundException { this(filename, true); } @@ -47,11 +70,11 @@ public class xReadLines implements Iterator, Iterable { * @param fileReader * @throws FileNotFoundException */ - public xReadLines(final FileReader fileReader, final boolean trimWhitespace) throws FileNotFoundException { + public XReadLines(final FileReader fileReader, final boolean trimWhitespace) throws FileNotFoundException { this(new BufferedReader(fileReader), trimWhitespace); } - public xReadLines(final FileReader fileReader) throws FileNotFoundException { + public XReadLines(final FileReader fileReader) throws FileNotFoundException { this(fileReader, true); } @@ -61,11 +84,11 @@ public class xReadLines implements Iterator, Iterable { * @param inputStream * @throws FileNotFoundException */ - public xReadLines(final InputStream inputStream, final boolean trimWhitespace) throws FileNotFoundException { + public XReadLines(final InputStream inputStream, final boolean trimWhitespace) throws FileNotFoundException { this(new BufferedReader(new InputStreamReader(inputStream)), trimWhitespace); } - public xReadLines(final InputStream inputStream) throws FileNotFoundException { + public XReadLines(final InputStream inputStream) throws FileNotFoundException { this(inputStream, true); } @@ -76,7 +99,7 @@ public class xReadLines implements Iterator, Iterable { * @param reader * @throws FileNotFoundException */ - public xReadLines(final BufferedReader reader, final boolean trimWhitespace) throws FileNotFoundException { + public XReadLines(final BufferedReader reader, final boolean trimWhitespace) throws FileNotFoundException { try { this.in = reader; nextline = readNextLine(); @@ -86,7 +109,7 @@ public class xReadLines implements Iterator, Iterable { } } - public xReadLines(final BufferedReader reader) throws FileNotFoundException { + public XReadLines(final BufferedReader reader) throws FileNotFoundException { this(reader, true); } diff --git a/java/test/org/broadinstitute/sting/WalkerTest.java b/java/test/org/broadinstitute/sting/WalkerTest.java index acb882c4b..2928f3919 100755 --- a/java/test/org/broadinstitute/sting/WalkerTest.java +++ b/java/test/org/broadinstitute/sting/WalkerTest.java @@ -1,9 +1,32 @@ +/* + * 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; import junit.framework.Assert; import org.broadinstitute.sting.gatk.CommandLineExecutable; import org.broadinstitute.sting.gatk.CommandLineGATK; -import org.broadinstitute.sting.utils.Pair; +import org.broadinstitute.sting.utils.collections.Pair; import org.broadinstitute.sting.utils.StingException; import org.broadinstitute.sting.utils.Utils; import org.junit.Test; diff --git a/java/test/org/broadinstitute/sting/utils/cmdLine/ParsingEngineUnitTest.java b/java/test/org/broadinstitute/sting/commandline/ParsingEngineUnitTest.java similarity index 94% rename from java/test/org/broadinstitute/sting/utils/cmdLine/ParsingEngineUnitTest.java rename to java/test/org/broadinstitute/sting/commandline/ParsingEngineUnitTest.java index d84a7b563..1a5187e7b 100755 --- a/java/test/org/broadinstitute/sting/utils/cmdLine/ParsingEngineUnitTest.java +++ b/java/test/org/broadinstitute/sting/commandline/ParsingEngineUnitTest.java @@ -1,4 +1,27 @@ -package org.broadinstitute.sting.utils.cmdLine; +/* + * 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.commandline; import org.broadinstitute.sting.BaseTest; import org.broadinstitute.sting.utils.StingException; @@ -8,20 +31,6 @@ import org.junit.Assert; import java.util.List; import java.util.EnumSet; -/** - * Created by IntelliJ IDEA. - * User: mhanna - * Date: May 3, 2009 - * Time: 6:05:33 PM - *

- * The Broad Institute - * SOFTWARE COPYRIGHT NOTICE AGREEMENT - * This software and its documentation are copyright 2009 by the - * Broad Institute/Massachusetts Institute of Technology. All rights are reserved. - *

- * This software is supplied without any warranty or guaranteed support whatsoever. Neither - * the Broad Institute nor MIT can be responsible for its use, misuse, or functionality. - */ /** * Test suite for the parsing engine. */ diff --git a/java/test/org/broadinstitute/sting/gatk/contexts/variantcontext/AlleleUnitTest.java b/java/test/org/broadinstitute/sting/gatk/contexts/variantcontext/AlleleUnitTest.java index 3532f4f05..2ac28093a 100755 --- a/java/test/org/broadinstitute/sting/gatk/contexts/variantcontext/AlleleUnitTest.java +++ b/java/test/org/broadinstitute/sting/gatk/contexts/variantcontext/AlleleUnitTest.java @@ -1,3 +1,26 @@ +/* + * 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. + */ + // our package package org.broadinstitute.sting.gatk.contexts.variantcontext; @@ -5,9 +28,6 @@ package org.broadinstitute.sting.gatk.contexts.variantcontext; // the imports for unit testing. import org.broadinstitute.sting.BaseTest; -import org.broadinstitute.sting.utils.BaseUtils; -import org.broadinstitute.sting.utils.ExpandingArrayList; -import org.broadinstitute.sting.utils.StingException; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/java/test/org/broadinstitute/sting/gatk/traversals/TraverseDuplicatesUnitTest.java b/java/test/org/broadinstitute/sting/gatk/traversals/TraverseDuplicatesUnitTest.java index bf84c98d2..4329b1a3a 100644 --- a/java/test/org/broadinstitute/sting/gatk/traversals/TraverseDuplicatesUnitTest.java +++ b/java/test/org/broadinstitute/sting/gatk/traversals/TraverseDuplicatesUnitTest.java @@ -1,10 +1,32 @@ +/* + * 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.traversals; import net.sf.samtools.SAMFileHeader; import net.sf.samtools.SAMRecord; import org.broadinstitute.sting.BaseTest; import org.broadinstitute.sting.utils.GenomeLocParser; -import org.broadinstitute.sting.utils.Pair; import org.broadinstitute.sting.utils.sam.ArtificialSAMUtils; import org.junit.Assert; import org.junit.Before; diff --git a/java/test/org/broadinstitute/sting/utils/ListUtilsUnitTest.java b/java/test/org/broadinstitute/sting/utils/ListUtilsUnitTest.java deleted file mode 100644 index 9524d09bc..000000000 --- a/java/test/org/broadinstitute/sting/utils/ListUtilsUnitTest.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.broadinstitute.sting.utils; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.broadinstitute.sting.BaseTest; - - -import java.util.List; -import java.util.ArrayList; -import java.util.Collections; - -/** - * Basic unit test for MathUtils - */ -public class ListUtilsUnitTest extends BaseTest { - @BeforeClass - public static void init() { } - - /** - * Tests that the random index selection is working correctly - */ - @Test - public void testRandomIndicesWithReplacement() { - logger.warn("Executing testRandomIndicesWithReplacement"); - - // Check that the size of the list returned is correct - Assert.assertTrue(ListUtils.sampleIndicesWithReplacement(5, 0).size() == 0); - Assert.assertTrue(ListUtils.sampleIndicesWithReplacement(5, 1).size() == 1); - Assert.assertTrue(ListUtils.sampleIndicesWithReplacement(5, 5).size() == 5); - Assert.assertTrue(ListUtils.sampleIndicesWithReplacement(5, 1000).size() == 1000); - - // Check that the list contains only the k element range that as asked for - no more, no less - List Five = new ArrayList(); - Collections.addAll(Five, 0, 1, 2, 3, 4); - List BigFive = ListUtils.sampleIndicesWithReplacement(5, 10000); - Assert.assertTrue(BigFive.containsAll(Five)); - Assert.assertTrue(Five.containsAll(BigFive)); - } - - /** - * Tests that we get the right values from the multinomial distribution - */ - @Test - public void testSliceListByIndices() { - logger.warn("Executing testSliceListByIndices"); - - // Check that the list contains only the k element range that as asked for - no more, no less but now - // use the index list to pull elements from another list using sliceListByIndices - List Five = new ArrayList(); - Collections.addAll(Five, 0, 1, 2, 3, 4); - List FiveAlpha = new ArrayList(); - Collections.addAll(FiveAlpha, 'a', 'b', 'c', 'd', 'e'); - List BigFive = ListUtils.sampleIndicesWithReplacement(5, 10000); - List BigFiveAlpha = ListUtils.sliceListByIndices(BigFive, FiveAlpha); - Assert.assertTrue(BigFiveAlpha.containsAll(FiveAlpha)); - Assert.assertTrue(FiveAlpha.containsAll(BigFiveAlpha)); - } -} \ No newline at end of file diff --git a/java/test/org/broadinstitute/sting/utils/MathUtilsUnitTest.java b/java/test/org/broadinstitute/sting/utils/MathUtilsUnitTest.java index a5fc779ba..6490909ae 100755 --- a/java/test/org/broadinstitute/sting/utils/MathUtilsUnitTest.java +++ b/java/test/org/broadinstitute/sting/utils/MathUtilsUnitTest.java @@ -1,3 +1,26 @@ +/* + * 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; import org.junit.Assert; @@ -8,6 +31,9 @@ import org.broadinstitute.sting.utils.MathUtils; import java.io.File; +import java.util.List; +import java.util.ArrayList; +import java.util.Collections; /** * Basic unit test for MathUtils @@ -55,4 +81,45 @@ public class MathUtilsUnitTest extends BaseTest { double[] probs3 = { 0.33, 0.33, 0.34 }; Assert.assertTrue(MathUtils.compareDoubles(MathUtils.multinomialProbability(counts3, probs3), 5.20988e-285, 1e-286) == 0); } + + /** + * Tests that the random index selection is working correctly + */ + @Test + public void testRandomIndicesWithReplacement() { + logger.warn("Executing testRandomIndicesWithReplacement"); + + // Check that the size of the list returned is correct + Assert.assertTrue(MathUtils.sampleIndicesWithReplacement(5, 0).size() == 0); + Assert.assertTrue(MathUtils.sampleIndicesWithReplacement(5, 1).size() == 1); + Assert.assertTrue(MathUtils.sampleIndicesWithReplacement(5, 5).size() == 5); + Assert.assertTrue(MathUtils.sampleIndicesWithReplacement(5, 1000).size() == 1000); + + // Check that the list contains only the k element range that as asked for - no more, no less + List Five = new ArrayList(); + Collections.addAll(Five, 0, 1, 2, 3, 4); + List BigFive = MathUtils.sampleIndicesWithReplacement(5, 10000); + Assert.assertTrue(BigFive.containsAll(Five)); + Assert.assertTrue(Five.containsAll(BigFive)); + } + + /** + * Tests that we get the right values from the multinomial distribution + */ + @Test + public void testSliceListByIndices() { + logger.warn("Executing testSliceListByIndices"); + + // Check that the list contains only the k element range that as asked for - no more, no less but now + // use the index list to pull elements from another list using sliceListByIndices + List Five = new ArrayList(); + Collections.addAll(Five, 0, 1, 2, 3, 4); + List FiveAlpha = new ArrayList(); + Collections.addAll(FiveAlpha, 'a', 'b', 'c', 'd', 'e'); + List BigFive = MathUtils.sampleIndicesWithReplacement(5, 10000); + List BigFiveAlpha = MathUtils.sliceListByIndices(BigFive, FiveAlpha); + Assert.assertTrue(BigFiveAlpha.containsAll(FiveAlpha)); + Assert.assertTrue(FiveAlpha.containsAll(BigFiveAlpha)); + } + } \ No newline at end of file diff --git a/java/test/org/broadinstitute/sting/utils/ExpandingArrayListUnitTest.java b/java/test/org/broadinstitute/sting/utils/collections/ExpandingArrayListUnitTest.java similarity index 76% rename from java/test/org/broadinstitute/sting/utils/ExpandingArrayListUnitTest.java rename to java/test/org/broadinstitute/sting/utils/collections/ExpandingArrayListUnitTest.java index b2c72a1dd..40c482588 100755 --- a/java/test/org/broadinstitute/sting/utils/ExpandingArrayListUnitTest.java +++ b/java/test/org/broadinstitute/sting/utils/collections/ExpandingArrayListUnitTest.java @@ -1,5 +1,28 @@ +/* + * 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. + */ + // our package -package org.broadinstitute.sting.utils; +package org.broadinstitute.sting.utils.collections; // the imports for unit testing. @@ -8,6 +31,8 @@ import org.junit.Assert; import org.junit.Test; import org.junit.Before; import org.broadinstitute.sting.BaseTest; +import org.broadinstitute.sting.utils.collections.ExpandingArrayList; + import java.util.Arrays; /**