let print_alignment a =
sprintf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s"
(print_qname a.qname)
(print_flags a.flags)
(print_rname a.rname)
(print_pos a.pos)
(print_mapq a.mapq)
(print_cigar a.cigar)
(print_rnext a.rnext)
(print_pnext a.pnext)
(print_tlen a.tlen)
(print_seq a.seq)
(print_qual a.qual)
(
List.map a.optional_fields ~f:print_optional_field
|> String.concat ~sep:"\t"
)