This tool will generate multiple output datasets for each redagroup from the input dataset.
samtools split [options] merged.sam|merged.bam|merged.cram
-u FILE1 Put reads with no RG tag or an unrecognised RG tag into FILE1
-u FILE1:FILE2 As above, but assigns an RG tag as given in the header of FILE2
-f STRING Output filename format string (see below) ["%*_%#.%."]
-v Verbose output
%% %
%* basename
%# @RG index
%! @RG ID
%. output format filename extension