code: def check_file_names(samples, raw_dir, options):
      
      file_names = {}
      for sample in samples:
          the_sample = None
          try:
              the_sample = sample[1]
          except IndexError:
              msg = ("problematic samples file should include both family and "
                     "individual IDs")
              raise ProgramError(msg)
          if options.use_full_ids:
              the_sample = options.full_ids_delimiter.join(sample)
  
          file_name = os.path.join(raw_dir, "{}.txt".format(the_sample))
          if not os.path.isfile(file_name):
              file_name += ".gz"
              if not os.path.isfile(file_name):
                  msg = "can't find file for sample {}".format(the_sample)
                  raise ProgramError(msg)
          file_names[the_sample] = file_name
  
      return file_names
docs: Check if all files are present.
  
      :param samples: a list of tuples with the family ID as first element (str)
                      and sample ID as last element (str).
      :param raw_dir: the directory containing the raw files.
      :param options: the options.
  
      :type samples: list of tuples
      :type raw_dir: str
      :type options: argparse.Namespace
  
      :returns: a dict containing samples as key (a tuple with the family ID as
                first element and sample ID as last element) and the name of the
                raw file as element.