Minor optimizations to avoid extra processing (esp. for reduced reads)
A much better way of choosing the alternate allele(s) to genotype in the SNP model of UG: instead of looking at the sum of base qualities (which can and did lead to us over-genotyping esp. when allowing multiple alternate alleles), we look at the likelihoods themselves (free since we are already calculating likelihoods for all 10 genotypes).  Now, even if the base quals exceed some arbitrary threshold, we only bother genotyping an alternate allele when there's a sample for which it is more likely than ref/ref (I can generate weird edge cases where this falls apart, but none that model truly variable sites that we actually want to call).  This leads to a huge efficiency improvement esp. for exomes (and esp. for many samples) where we almost always were trying to genotype all 3 alternate alleles.  Integration tests change only because ref calls have slight QUAL differences (because the best alt allele is still chosen arbitrarily, but differently).
Merge branch 'master' of ssh://nickel.broadinstitute.org/humgen/gsa-scr1/gsa-engineering/git/unstable
Merge branch 'master' of ssh://nickel.broadinstitute.org/humgen/gsa-scr1/gsa-engineering/git/unstable
Protect against too many alternate alleles in the haplotype caller.
Merged bug fix from Stable into Unstable
GATKPerformanceOverTime script update

-- Automatic detection of most recent version of GATK release (just tell the script now to use 1.2, 1.3, and 1.4)
-- Uses 1.4 now
-- By default we do 9 runs of each non-parallel test
-- In PathUtils added convenience utility to find most recent release GATK jar with a specific release number
runGATKReport only archives and shows errors for last days runs
GATKPerformanceOverTime bug fixes

-- Don't try to do nt 16, it's just too painful as the threading doesn't work well and it consumes a large chunk of our available slots on gsa4
-- bugfix: only do multi-threaded test for each iteration, not expanding by subiterations, so we no longer try to do 3x3 nt 16 runs
Merge branch 'master' of ssh://gsa1/humgen/gsa-scr1/gsa-engineering/git/unstable
 Add support for reads starting with insertion

      * Modified cleanCigarShift to allow insertions in the beginning and end of the read
      * Allowed cigars starting/ending in insertions in the systematic ReadClipper tests
      * Updated all ReadClipper unit tests
      * ReduceReads does not hard clip leading insertions by default anymore
      * SlidingWindow adjusts start location if read starts with insertion
      * SlidingWindow creates an empty element with insertions to the right
      * Fixed all potential divide by zero with totalCount() (from BaseCounts)
      * Updated all Integration tests
      * Added new integration test for multiple interval reducing
Added knuth-shuffle (KS) and randomSubset using KS to MathUtils

         * Knuth-shuffle is a simple, yet effective array permutator (hope this is good english).
         * added a simple randomSubset that returns a random subset without repeats of any given array with the same probability for every permutation.
         * added unit tests to both functions
Added downsampling support to ReduceReads

    * Downsampling is now a parameter to the walker with default value of 0 (no downsampling)
    * Downsampling selects reads at random at the variant region window and strives to achieve uniform coverage if possible around the desired downsampling value.
    * Added integration test
Some WGS performance upgrades for ReduceReads

   * Do not try to hard clip to the interval when doing WGS
   * Do not even add reads that have been completely clipped out in WGS
Refactor of the downsampling machinery to accept different strategies

   * Implemented Adaptive downsampler
   * Added integration test
   * Added option to RRead scala script to choose downsampling strategy
Added single sample option for the ReduceReads calling script
Script to calculate gc content of intervals independently

   * necessary for baits because we don't want the overlapping intervals to be merged by the GATK engine
Added parameter to combine RGs in CoverageByRG

   * -g takes a string of read groups separated by space " "
   * multiple -g creates multiple sum columns in the table

Signed-off-by: Mauricio Carneiro <carneiro@broadinstitute.org>
Added getPileupForReadGroups to ReadBackPileup

   * returns a pileup for all the read groups provided.
   * saves us from multiple calls to getPileup (which is very inefficient)
Optimizations to the CoverageByRG walker

   * outputs only the groups of read groups necessary, avoiding multiple pileup creations every call to map
   * now also counts the number of variants associated with a given ROD (dbSNP) exist in the interval
   * new column: interval size