def decode_edges(edges):
    """
    Decodes the specified integer representing edges in Cortex graph. Returns
    a tuple (forward, reverse) which contain the list of nucleotides that we
    append to a kmer and its reverse complement to obtain other kmers in the
    Cortex graph.
    """
    bases = ["A", "C", "G", "T"]
    fwd = []
    for j in range(4):
        if (1 << j) & edges != 0:
            fwd.append(bases[j])
    rev = []
    bases.reverse()
    for j in range(4):
        if (1 << (j + 4)) & edges != 0:
            rev.append(bases[j])
    return fwd, rev