def solexa_quality_from_phred(phred_quality):
 if (phred_quality is None):
  return None
 elif (phred_quality > 0):
  return max((-5.0), (10 * log(((10 ** (phred_quality / 10.0)) - 1), 10)))
 elif (phred_quality == 0):
  return (-5.0)
 else:
  raise ValueError(('PHRED qualities must be positive (or zero), not %r' % phred_quality))

def solexa_quality_from_phred ( phred_quality ) : if ( phred_quality is None ) : return None elif ( phred_quality > 0 ) : return max ( ( - 5.0 ) , ( 10 * log ( ( ( 10 ** ( phred_quality / 10.0 ) ) - 1 ) , 10 ) ) ) elif ( phred_quality == 0 ) : return ( - 5.0 ) else : raise ValueError ( ( 'PHRED qualities must be positive (or zero), not %r' % phred_quality ) )
covert a phred quality to a solexa quality .