code: def _get_galaxy_loc_file(name, galaxy_dt, ref_dir, galaxy_base):
      
      if "file" in galaxy_dt and os.path.exists(os.path.join(galaxy_base, galaxy_dt["file"])):
          loc_file = os.path.join(galaxy_base, galaxy_dt["file"])
          need_remap = False
      elif alignment.TOOLS[name].galaxy_loc_file is None:
          loc_file = os.path.join(ref_dir, alignment.BASE_LOCATION_FILE)
          need_remap = True
      else:
          loc_file = os.path.join(ref_dir, alignment.TOOLS[name].galaxy_loc_file)
          need_remap = False
      if not os.path.exists(loc_file):
          loc_file = os.path.join(ref_dir, alignment.BASE_LOCATION_FILE)
          need_remap = True
      return loc_file, need_remap
docs: Retrieve Galaxy *.loc file for the given reference/aligner name.
  
      First tries to find an aligner specific *.loc file. If not defined
      or does not exist, then we need to try and remap it from the
      default reference file