Fixed a few typos and clarified some doc points.
Merge pull request #385 from broadinstitute/gg_vqsr_docfixes

Fixed a few typos and clarified some doc points.
Merged bug fix from Stable into Unstable
Add Array Logless PairHMM

A new PairHMM implementation for read/haplotype likelihood calculations. Output is the same as the LOGLESS_CACHING version.

Instead of allocating an entire (read x haplotype) matrix for each HMM state, this version stores sub-computations in 1D arrays. It also accesses intersections of the (read x haplotype) alignment in a different order, proceeding over "diagonals" if we think of the alignment as a matrix.

This implementation makes use of haplotype caching. Because arrays are overwritten, it has to explicitly store mid-process information. Knowing where to capture this info requires us to look ahead at the subsequent haplotype to be analyzed. This necessitated a signature change in the primary method for all pairHMM implementations.

We also had to adjust the classes that employ the pairHMM:
LikelihoodCalculationEngine (used by HaplotypeCaller)
PairHMMIndelErrorModel (used by indel genotyping classes)

Made the array version the default in the HaplotypeCaller and the UnifiedArgumentCollection.
The latter affects classes:
ErrorModel
GeneralPloidyIndelGenotypeLikelihoodsCalculationModel
IndelGenotypeLikelihoodsCalculationModel
... all of which use the pairHMM via PairHMMIndelErrorModel
Changes to Array PairHMM to address review comments

Returned Logless Caching implementation to the default in all cases. Changing to the array version will await performance benchmarking

Refactored many pieces of functionality in ArrayLoglessPairHMM into their own methods.
Retreived PairHMM benchmarks from archive and made improvements

PairHMMSyntheticBenchmark and PairHMMEmpirical benchmark were written to test the banded pairHMM, and were archived along with it. I returned them to the test directory for use in benchmarking the ArrayLoglessPairHMM. I commented out references to the banded pairHMM (which was left in archive), rather than removing those references entirely.

Renamed PairHMMEmpiricalBenchmark to PairHMMBandedEmpiricalBenchmark and returned it to the archive. It has a few problems for use as a general benchmark, including initializing the HMM too frequently and doing too much setup work in the 'time' method. However, since the size selection and debug printing are useful for testing the banded implementation, I decided to keep it as-is and archive it alongside with the other banded pairHMM classes. I did fix one bug that was causing the selectWorkingData function to return prematurely. As a result, the benchmark was only evaluating 4-40 pairHMM calls instead of the desired "maxRecords".

I wrote a new PairHMMEmpiricalBenchmark that simply works through a list of data, with setup work and hmm-initialization moved to its own function. This involved writing a new data read-in function in PairHMMTestData. The original was not maintaining the input data in order, the end result of which would be an over-estimate of how much caching we are able to do. The new benchmark class more closely mirrors real-world operation over large data.

It might be cleaner to fix some of the issues with the BandedEmpiricalBenchmark and use one read-in function. However, this would involve more extensive changes to:
PairHMMBandedEmpiricalBenchmark
PairHMMTestData
BandedLoglessPairHMMUnitTest

I decided against this as the banded benchmark and unit test are archived.
adding a check for the UNAVAILABLE case of GenotypeType in CountVariants
Merge pull request #387 from lbergelson/lb_add_ungenotyped_case_countvariants

adding a check for the UNAVAILABLE case of GenotypeType in CountVariants
Changed the error for the record size mismatch in the genotyping engine to be a user error since it is possible
to reach this state with input VCFs that contain the same event multiple times (and it's not something we want to
handle in the code).
Merge pull request #388 from broadinstitute/eb_change_record_size_mismatch_to_user_error

Changed the error for the record size mismatch in the genotyping engine ...
Added REVERT SOFTCLIPPED bases to ClipReads
Created a single sample calling pipeline which leverages the reference model calculation mode of the HaplotypeCaller

-- Adding changes to CombineVariants to work with the Reference Model mode of the HaplotypeCaller.
-- Added -combineAnnotations mode to CombineVariants to merge the info field annotations by taking the median
-- Added new StrandBiasBySample genotype annotation for use in computing strand bias from single sample input vcfs
-- Bug fixes to calcGenotypeLikelihoodsOfRefVsAny, used in isActive() as well as the reference model
-- Added active region trimming capabilities to the reference model mode, not perfect yet, turn off with --dontTrimActiveRegions
-- We only realign reads in the reference model if there are non-reference haplotypes, a big time savings
-- We only realign reads in the reference model if the read is informative for a particular haplotype over another
-- GVCF blocks will now track and output the minimum PLs over the block

-- MD5 changes!
-- HC tests: from bug fixes in calcGenotypeLikelihoodsOfRefVsAny
-- GVCF tests: from HC changes above and adding in active region trimming
Merge pull request #389 from broadinstitute/rp_single_sample_calling_pipline_HC

Created a single sample calling pipeline which leverages the reference m...
Merge pull request #361 from broadinstitute/bt_pairhmm_array_implementation

Add Array Logless PairHMM
Updates to the single sample calling pipeline to reflect latest experiments with full whole genome callsets.
Clarified docs on using clipping options
Merge pull request #390 from broadinstitute/mc_update_clipreads

Added REVERT SOFTCLIPPED bases to ClipReads
Merge pull request #394 from broadinstitute/rp_single_sample_calling_pipeline_update

Updates to the single sample calling pipeline to reflect latest experime...
Provide close methods to clean up resources used while creating AlignmentContexts from BAM file regions. Allows utilization of CoveredLocusView via the API

Signed-off-by: David Roazen <droazen@broadinstitute.org>
Merge pull request #395 from broadinstitute/dr_chapmanb_patch_add_api_close_methods

Provide close methods to clean up resources used while creating AlignmentContexts from BAM file regions