stats: Compute checksum for names/seqs/quals
fix DPR annotation

* Max alleles got changed in 8030ea3 to 5 instead of 4 to
  fix a speparate bug, but 4 left at line 127 in bam2bcf.c
  when initialising memory. This leads to bug reported in
  #274
* Fix this, but also make `B2B_MAX_ALLELES' a constant to
  set this number everywhere it is used (@pd3 please check)
* Parsing of tags was broken. the `--tag' options in the
  example in #274 should not have been parsed. Should be
  fixed now
* Add test output for all `--tags' options

Fixes #274
No need to initialise array anyway
fixes #271
fixes #272

- consistent use of /usr/bin/env perl shebangs
- consistent use of 'use warnings;' in favor of perl -w
Merge stats checksums
Modified the mpileup tests to have local copies of appropriate
reference sequences.  All other tests already had this (but
accidentally escaped in some circumstances).

Added a non-existant REF_PATH= to the tests to prevent it using the
default search path and escaping off to the EBI.

See https://github.com/samtools/samtools/issues/279
Replace bcftools+bcf_filter.sh with new vcf-miniview

Add new vcf-miniview test utility, which reads BCF or VCF and outputs
VCF optionally filtered in the same way that the old bcf_filter.sh did.
The sed -r option used by bcf_filter.sh was not available on OS X, and
an installation of bcftools will not necessarily be available on test
machines, notably when testing via travis.
Insulate test case from $GREP_OPTIONS

Prevent e.g. GREP_OPTIONS='--binary-files=without-match' from
subverting the expected output.

Perhaps we ought to add 'unalias egrep' somewhere too...
Update expected output with symbolic "<X>" alleles

Since b14b21933b08ccdf7a777ed4a3529edbb03114e9 mpileup outputs a
symbolic allele rather than a plain "X".
Update QS values in expected output, and don't truncate them

Following the lead of f85ac7d492ddf7fd54e9849733c2d66adf874938
(around the time of which the QS computation changed), we should be
regression testing the full values emitted for QS.
Merge minimal MD5 reference area for mpileup tests

Provide a local reference area via $REF_PATH for mpileup/regression.sh
tests (cf 38eda28b81fd3c176f90a0f03d2645fc891167f0's commit message).
(Note that these MD5 files are truncated versions of their full
sequences; just enough to pass the tests.)

Set REF_PATH to an empty value (but not the empty string, as that
produces the default setting), or in general to point within the test
suite, for tests that exercise it -- currently test.pl and regression.sh.

This makes the test suite self-contained for reference areas, and
in particular prevents travis build testing from trying to access
the EBI reference server.  Fixes #279.
Clean after fix in e3d4eee

- free allocated memory
- strncmp not necessary with hts_readlist
Fix fixmates for supplementary reads

Currently samtools fixmate will incorrectly perceive supplementary reads as
primaries and consequently mess up the pairing information for the primaries.
This commit fixes this by passing supplementary reads through unmodified.
This also updates flagstat to separate out the statistics for supplementary
and secondary reads.

Signed-off-by: Martin Pollard <mp15@sanger.ac.uk>
Reduce use of abort, remove assert(fp), pass one string to fprintf not multicall

Reduce use of abort to situations where you might actually want to debug.
Remove assert(fp)'s and replace with proper error messages.
Remove a few instances where fprintf is called multiple times rather than just
passing one string to it.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Merge #! fixes to misc/ scripts

Use "#!/usr/bin/env (perl|python)" throughout, to get the interpreter
from $PATH.  Use "use strict; use warnings;" in Perl scripts (this merge
commit also re-adds strict in novo2sam.pl).  Fixes #273.

(These small changes are not legally significant for copyright purposes,
so years in the copyright notices have not been updated.)
Formatting fixes for better grinding into HTML

In particular, the removed .RE was incorrectly nested.
Also use fancy >= and arrow characters where available.
Recanonicalise test/test.pl whitespace -- USE -b/-w TO DIFF/BLAME

This file had a mixture of 4-space and 8-space tabs, which previously
went unnoticed.  Manually re-expand tabs to spaces using the right
number of spaces for each tab.

See notes in fcb8af08a6fd3bfcf195407c4ba5bae528ee326d.
mpileup: conform to VCFv4.2 spec, version string should be quoted
Recanonicalise padding.c whitespace -- USE -b/-w TO DIFF/BLAME

This file had a mixture of 1-tab and 8-space indents which previously
went unnoticed.  See notes in fcb8af08a6fd3bfcf195407c4ba5bae528ee326d.