# Path: alfpy/utils/distance.py
# class Distance(object):
#     def __getitem__(self, seqnum):
#     def get_disttypes(cls):
#     def set_disttype(self, disttype):
#     def __init__(self, vector, disttype):
#     def pwdist_euclid_squared(self, seq1idx, seq2idx):
#     def pwdist_euclid_norm(self, seq1idx, seq2idx):
#     def pwdist_google(self, seq1idx, seq2idx):


import numpy as np
from .utils import distance
    from .utils.seqrecords import main
    from .utils import distmatrix
            nuc1 = alphabet[s[i]]
            nuc2 = alphabet[s[i + l]]
            l_dist_correlations[nuc1][nuc2] += 1
        l_dist_correlations /= np.sum(l_dist_correlations)

        # Compute the D_{ij}(l) which is the deviation from
        # statistical independance.
        # $D_{ij}(l) = p_{ij}(l) - p_i p_j$
        D = l_dist_correlations - np.dot(p.T, p)

        bbc += D + (D ** 2 / 2 * np.dot(p.T ** 2, p ** 2)) + D ** 3

    # Flatten the bbc into a 16 feature vector.
    bbc.shape = (1, L * L)
    return bbc


def create_vectors(seq_records, k=10, alphabet="ATGC"):
    """Create BBC's vectors for multiple sequence records.

    Args:
        seq_records (obj SeqRecords)
    """
    data = np.zeros(shape=(seq_records.count, len(alphabet)**2))
    for seqidx, seq in enumerate(seq_records.seq_list):
        vector = base_base_correlation(seq, k=k, alphabet=alphabet)
        data[seqidx] = vector
    return data



# Path: alfpy/utils/distance.py
# class Distance(object):
#     def __getitem__(self, seqnum):
#     def get_disttypes(cls):
#     def set_disttype(self, disttype):
#     def __init__(self, vector, disttype):
#     def pwdist_euclid_squared(self, seq1idx, seq2idx):
#     def pwdist_euclid_norm(self, seq1idx, seq2idx):
#     def pwdist_google(self, seq1idx, seq2idx):


# Path: alfpy/bbc.py
import numpy as np
from .utils import distance
    from .utils.seqrecords import main
    from .utils import distmatrix

            nuc1 = alphabet[s[i]]
            nuc2 = alphabet[s[i + l]]
            l_dist_correlations[nuc1][nuc2] += 1
        l_dist_correlations /= np.sum(l_dist_correlations)

        # Compute the D_{ij}(l) which is the deviation from
        # statistical independance.
        # $D_{ij}(l) = p_{ij}(l) - p_i p_j$
        D = l_dist_correlations - np.dot(p.T, p)

        bbc += D + (D ** 2 / 2 * np.dot(p.T ** 2, p ** 2)) + D ** 3

    # Flatten the bbc into a 16 feature vector.
    bbc.shape = (1, L * L)
    return bbc


def create_vectors(seq_records, k=10, alphabet="ATGC"):
    """Create BBC's vectors for multiple sequence records.

    Args:
        seq_records (obj SeqRecords)
    """
    data = np.zeros(shape=(seq_records.count, len(alphabet)**2))
    for seqidx, seq in enumerate(seq_records.seq_list):
        vector = base_base_correlation(seq, k=k, alphabet=alphabet)
        data[seqidx] = vector
    return data



class Distance(distance.Distance):