https://github.com/cerebis/bin3C/blob/76ad2a94597b92b21e1d2054a1917c277e06cb1b/mzd/contact_map.py#L537 This will produce an uncaught exception if the 'HD' record does not existing the BAM file. We need to either check for 'HD' or place this call in a try/catch KeyError