refactor get_command_line
use bam_header_dup from samtools