Fixed script for parsing BLAST output
Fixed a few bugs in blast2sam.pl script, added POD documentation
Create header of common test functions

Create a header to be included in tests for common functions.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Add split command to samtools

The split command takes BAMs which consist of multiple readgroups
and separates them out into separate files, one for each readgroup.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Add unit test for bam_split.c's count_rg

Add unit test to test count_rg function.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Polish bam_split

Unit test expand_format_string
Change from output_prefix to output format string
Make usage write to stdout when not an error.
Make stdout usage appear if no arguments given.
Make unaccounted reads an option and whine if found and not specified.
Filter alternate @RG lines from the files they’re not in.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Add unit test for bam_split.c's filter_header_rg

Add unit test to test filter_header_rg function.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Restructure testing structure to dedupe

Move certain functions from test.h into a test.c file to reduce code
duplication.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Add unit test for bam_split.c's parse_args

Add unit test to test parse_args function.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>
Added mpileup tests
Mpileup test in Makefile
Add -b parameter to samtools merge manpage
Update samtools.1
Match style for FILE option
Alternate syntax for samtools merge.

Providing a FILE to the -b option for samtools merge overrides any file selection made at the command line, I have added an alternative syntax line in the documentation to try and clarify this.
Alternate syntax for samtools merge in stderr message
Clarify list is not a literal
Match samtools merge manpage and stderr syntax
Fix dependencies for test/test.h

Three of the test/merge/*.c tests do not yet use test.c's functions,
so needn't link to it.
Write files based on the *basename* of the input file

Strip the directory part (tools that write to the current directory
by default are more convenient) and extension from the input filename
before using it in the output filename template.

We don't seem to need _GNU_SOURCE.  Also minor spelling fixups.