docs: def parse_procheck(quality_directory):
      """Parses all PROCHECK files in a directory and returns a Pandas DataFrame of the results
  
      Args:
          quality_directory: path to directory with PROCHECK output (.sum files)
  
      Returns:
          Pandas DataFrame: Summary of PROCHECK results
  
      """
  
      # TODO: save as dict instead, offer df as option
      # TODO: parse for one file instead
  
      procheck_summaries = glob.glob(os.path.join(quality_directory, '*.sum'))
  
      if len(procheck_summaries) == 0:
          return pd.DataFrame()
  
      all_procheck = {}
      for summ in procheck_summaries:
          structure_id = os.path.basename(summ).split('.sum')[0]
          procheck_dict = {}
          with open(summ) as f_in:
              lines = (line.rstrip() for line in f_in) # All lines including the blank ones
              lines = (line for line in lines if line) # Non-blank lines
              for line in lines:
                  if len(line.split()) > 1:
                      if line.split()[1] == 'Ramachandran':
                          procheck_dict['procheck_rama_favored'] = percentage_to_float(line.split()[3])
                          procheck_dict['procheck_rama_allowed'] = percentage_to_float(line.split()[5])
                          procheck_dict['procheck_rama_allowed_plus'] = percentage_to_float(line.split()[7])
                          procheck_dict['procheck_rama_disallowed'] = percentage_to_float(line.split()[9])
                      if line.split()[1] == 'G-factors':
                          procheck_dict['procheck_gfac_dihedrals'] = line.split()[3]
                          procheck_dict['procheck_gfac_covalent'] = line.split()[5]
                          procheck_dict['procheck_gfac_overall'] = line.split()[7]
          all_procheck[structure_id] = procheck_dict
  
      DF_PROCHECK = pd.DataFrame.from_dict(all_procheck, orient='index')
  
      return DF_PROCHECK