let read_group_header_option algorithm ~sample_name ~read_group_id =
(* this option should magically make the sam file compatible
mutect and other GATK-like pieces of software
http://seqanswers.com/forums/showthread.php?t=17233
The `LB` one seems “necessary” for somatic sniper:
`[bam_header_parse] missing LB tag in @RG lines.`
*)
match algorithm with
|`Mem ->
sprintf "-R '@RG\\tID:%s\\tSM:%s\\tLB:ga\\tPL:Illumina'" read_group_id sample_name
|`Aln ->
sprintf "-r '@RG\\tID:%s\\tSM:%s\\tLB:ga\\tPL:Illumina'" read_group_id sample_name