code: def remap_index_fn(ref_file):
      
      checks = [os.path.splitext(ref_file)[0].replace("/seq/", "/novoalign/"),
                os.path.splitext(ref_file)[0] + ".ndx",
                ref_file + ".bs.ndx",
                ref_file + ".ndx"]
      for check in checks:
          if os.path.exists(check):
              return check
      return checks[0]
docs: Map sequence references to equivalent novoalign indexes.