Get weblogo data for a sequence alignment.

    Returns a list of tuples: (posn, letter_counts, entropy, weight)

def read_logodata(handle):
    """Get weblogo data for a sequence alignment.

    Returns a list of tuples: (posn, letter_counts, entropy, weight)
    """
    seqs = weblogolib.read_seq_data(handle,
                                    alphabet=unambiguous_protein_alphabet)
    ldata = weblogolib.LogoData.from_seqs(seqs)
    letters = ldata.alphabet.letters()
    counts = ldata.counts.array
    logodata = []
    for i, coldata, entropy, weight in zip(range(len(counts)), counts,
                                           ldata.entropy, ldata.weight):
        cnts = dict((let, int(cnt))
                    for let, cnt in zip(letters, coldata))
        logodata.append((i + 1, cnts, entropy, weight))
    return logodata