def base_to_str( base ):
    """Converts 0,1,2,3 to A,C,G,T"""
    if 0 == base: return 'A'
    if 1 == base: return 'C'
    if 2 == base: return 'G'
    if 3 == base: return 'T'
    raise RuntimeError( 'Bad base: %d' % base )