def GC_skew(seq, window=100):
 values = []
 for i in range(0, len(seq), window):
  s = seq[i:(i + window)]
  g = (s.count('G') + s.count('g'))
  c = (s.count('C') + s.count('c'))
  skew = ((g - c) / float((g + c)))
  values.append(skew)
 return values

def GC_skew ( seq , window = 100 ) : values = [ ] for i in range ( 0 , len ( seq ) , window ) : s = seq [ i : ( i + window ) ] g = ( s . count ( 'G' ) + s . count ( 'g' ) ) c = ( s . count ( 'C' ) + s . count ( 'c' ) ) skew = ( ( g - c ) / float ( ( g + c ) ) ) values . append ( skew ) return values
calculates gc skew / for multiple windows along the sequence .