def optimal_size(num_kmers, mem_cap=None, fp_rate=None):
 if all(((num_kmers is not None), (mem_cap is not None), (fp_rate is None))):
  return estimate_optimal_with_K_and_M(num_kmers, mem_cap)
 elif all(((num_kmers is not None), (mem_cap is None), (fp_rate is not None))):
  return estimate_optimal_with_K_and_f(num_kmers, fp_rate)
 else:
  raise TypeError(u'num_kmers and either mem_cap or fp_rate must be defined.')

def optimal_size ( num_kmers , mem_cap = None , fp_rate = None ) : if all ( ( ( num_kmers is not None ) , ( mem_cap is not None ) , ( fp_rate is None ) ) ) : return estimate_optimal_with_K_and_M ( num_kmers , mem_cap ) elif all ( ( ( num_kmers is not None ) , ( mem_cap is None ) , ( fp_rate is not None ) ) ) : return estimate_optimal_with_K_and_f ( num_kmers , fp_rate ) else : raise TypeError ( u'num_kmers and either mem_cap or fp_rate must be defined.' )
utility function for estimating optimal countgraph args .