def calc_gc_skew(sequence):
 g = (sequence.count('G') + sequence.count('g'))
 c = (sequence.count('C') + sequence.count('c'))
 if ((g + c) == 0):
  return 0.0
 else:
  return ((g - c) / float((g + c)))

def calc_gc_skew ( sequence ) : g = ( sequence . count ( 'G' ) + sequence . count ( 'g' ) ) c = ( sequence . count ( 'C' ) + sequence . count ( 'c' ) ) if ( ( g + c ) == 0 ) : return 0.0 else : return ( ( g - c ) / float ( ( g + c ) ) )
returns the / gc skew in a passed sequence .