def count_ambig(curr_seq, valid_chars='ATCG'):
 up_seq = curr_seq.upper()
 total = 0
 for vchar in valid_chars:
  total += up_seq.count(vchar)
 return (len(curr_seq) - total)

def count_ambig ( curr_seq , valid_chars = 'ATCG' ) : up_seq = curr_seq . upper ( ) total = 0 for vchar in valid_chars : total += up_seq . count ( vchar ) return ( len ( curr_seq ) - total )
counts non-standard characters in seq .