code: def make_auc_structure(score_structure):
      
  
      n = len([x for x in score_structure if x[3] == '0'])   # Total no. of decoys
      p = len([x for x in score_structure if x[3] == '1'])   # Total no. of actives
  
      auc_structure = []
  
      for mol in score_structure:
          if n == 0:
              fpf = 0
          else:
              fpf = float(mol[4]) / n
          if p == 0:
              tpf = 0
          else:
              tpf = float(mol[5]) / p
          tup = mol[0:4] + (fpf, tpf)
          auc_structure.append(tup)
  
      return auc_structure
docs: calculates ROC data points and returns roc_structure, a modified form of the score_structure format
      :param score_structure: list [(id, best_score, best_query, status, net decoy count, net active count), ..., ]
      :return auc_structure: list [(id, best_score, best_query, status, fpf, tpf), ..., ]