# Path: alfpy/word_d2.py
# class Distance:
#     def __init__(self, vector_list):
#     def pwdist_d2(self, seqidx1, seqidx2):
#     def pwdist_d2_squareroot(self, seqidx1, seqidx2):
#     def set_disttype(self, disttype):
# def main():
# 
# Path: alfpy/word_pattern.py
# class Pattern:
#     def __init__(self, pat_list, occr_list, pos_list=None):
#     def _alfree_format(self):
#     def _teiresias_format(self):
#     def format(self, formattype=None):
#     def reduce_alphabet(self, alphabet_dict):
#     def merge_revcomp(self):
#         def revcomp(s):
#     def __repr__(self):
#     def __str__(self):
# def _create_wordpattern(seq_list, k):
# def _create_wordpattern_positions(seq_list, k):
# def create(seq_list, word_size=1, wordpos=False):
# def create_from_fasta(handle, word_size=1, wordpos=False):
# def create_from_bigfasta(filename, k=1):
# def run_teiresias(input_filename, w=2, l=2, k=2, output_filename=None):
# def read(handle):
# def main():
# 
# Path: alfpy/word_vector.py
# class Counts:
# class Bools(Counts):
# class Freqs(Counts):
# class FreqsStd(Freqs):
# class WeightModel:
# class CountsWeight(Counts):
# class FreqsWeight(Freqs):
# class WordModel:
# class EqualFreqs(WordModel):
# class EquilibriumFreqs(WordModel):
# class Composition(Counts):
#     def __init__(self, seq_lengths, patterns):
#     def _get_counts_occurrence(seq_count, patterns):
#     def __getitem__(self, seqidx):
#     def __str__(self):
#     def format(self, decimal_places=3):
#     def __init__(self, seq_lengths, patterns):
#     def __init__(self, seq_lengths, patterns):
#     def __relative_freqs(self):
#     def __init__(self, seq_lengths, patterns, freqmodel):
#     def __overlaps(self, freqmodel):
#     def __standardize_freqs(self, freqmodel):
#     def __init__(self, char_weights, wtype='content'):
#     def content(self, vector, patterns):
#     def __init__(self, seq_lengths, patterns, weightmodel):
#     def __init__(self, seq_lengths, patterns, weightmodel):
#     def probabilities(self, word):
#     def overlap_capability(self, word):
#     def var(self, word, seq_len, word_len=None, overlap_capability=None,
#             word_probs=None):
#     def __init__(self, alphabet_size):
#     def probabilities(self, word):
#     def __init__(self, equilibrium_frequencies):
#     def probabilities(self, word):
#     def __init__(self, seq_lengths, patterns, patterns1, patterns2):
#     def __check_patlen(self):
#     def __markov_chain_freqs(self, seqnum, seqlen, patnum, patlen, pattern):
#     def __composition(self, seqnum, seqlen):
# def _read_charval_file(handle):
# def main():
# 
# Path: alfpy/utils/distmatrix.py
# def create(id_list, distance):
# def read_highcharts_matrix(id_list, data):
#     def __init__(self, id_list, data):
#     def normalize(self):
#     def __iter__(self):
#     def writer(self, handle, f, decimal_places):
#     def display(self, f="phylip", decimal_places=7):
#     def write_to_file(self, handle, f="phylip", decimal_places=7):
#     def highcharts(self):
#     def format(self, decimal_places=7):
#     def min(self):
#     def max(self):
#     def is_zero(self):
#     def __repr__(self):
# class Matrix():


import unittest
from alfpy import word_d2
from alfpy import word_pattern
from alfpy import word_vector
from alfpy.utils import distmatrix
from . import utils




class DistanceTest(unittest.TestCase, utils.ModulesCommonTest):

    def __init__(self, *args, **kwargs):
        super(DistanceTest, self).__init__(*args, **kwargs)
        utils.ModulesCommonTest.set_test_data()
        self.patterns = []
        self.counts = []
        self.freqs = []
        for i in range(1, 5):
            p = word_pattern.create(self.pep_records.seq_list, i)
            self.patterns.append(p)
            c = word_vector.Counts(self.pep_records.length_list, p)
            self.counts.append(c)

# Path: alfpy/word_d2.py
# class Distance:
#     def __init__(self, vector_list):
#     def pwdist_d2(self, seqidx1, seqidx2):
#     def pwdist_d2_squareroot(self, seqidx1, seqidx2):
#     def set_disttype(self, disttype):
# def main():
# 
# Path: alfpy/word_pattern.py
# class Pattern:
#     def __init__(self, pat_list, occr_list, pos_list=None):
#     def _alfree_format(self):
#     def _teiresias_format(self):
#     def format(self, formattype=None):
#     def reduce_alphabet(self, alphabet_dict):
#     def merge_revcomp(self):
#         def revcomp(s):
#     def __repr__(self):
#     def __str__(self):
# def _create_wordpattern(seq_list, k):
# def _create_wordpattern_positions(seq_list, k):
# def create(seq_list, word_size=1, wordpos=False):
# def create_from_fasta(handle, word_size=1, wordpos=False):
# def create_from_bigfasta(filename, k=1):
# def run_teiresias(input_filename, w=2, l=2, k=2, output_filename=None):
# def read(handle):
# def main():
# 
# Path: alfpy/word_vector.py
# class Counts:
# class Bools(Counts):
# class Freqs(Counts):
# class FreqsStd(Freqs):
# class WeightModel:
# class CountsWeight(Counts):
# class FreqsWeight(Freqs):
# class WordModel:
# class EqualFreqs(WordModel):
# class EquilibriumFreqs(WordModel):
# class Composition(Counts):
#     def __init__(self, seq_lengths, patterns):
#     def _get_counts_occurrence(seq_count, patterns):
#     def __getitem__(self, seqidx):
#     def __str__(self):
#     def format(self, decimal_places=3):
#     def __init__(self, seq_lengths, patterns):
#     def __init__(self, seq_lengths, patterns):
#     def __relative_freqs(self):
#     def __init__(self, seq_lengths, patterns, freqmodel):
#     def __overlaps(self, freqmodel):
#     def __standardize_freqs(self, freqmodel):
#     def __init__(self, char_weights, wtype='content'):
#     def content(self, vector, patterns):
#     def __init__(self, seq_lengths, patterns, weightmodel):
#     def __init__(self, seq_lengths, patterns, weightmodel):
#     def probabilities(self, word):
#     def overlap_capability(self, word):
#     def var(self, word, seq_len, word_len=None, overlap_capability=None,
#             word_probs=None):
#     def __init__(self, alphabet_size):
#     def probabilities(self, word):
#     def __init__(self, equilibrium_frequencies):
#     def probabilities(self, word):
#     def __init__(self, seq_lengths, patterns, patterns1, patterns2):
#     def __check_patlen(self):
#     def __markov_chain_freqs(self, seqnum, seqlen, patnum, patlen, pattern):
#     def __composition(self, seqnum, seqlen):
# def _read_charval_file(handle):
# def main():
# 
# Path: alfpy/utils/distmatrix.py
# def create(id_list, distance):
# def read_highcharts_matrix(id_list, data):
#     def __init__(self, id_list, data):
#     def normalize(self):
#     def __iter__(self):
#     def writer(self, handle, f, decimal_places):
#     def display(self, f="phylip", decimal_places=7):
#     def write_to_file(self, handle, f="phylip", decimal_places=7):
#     def highcharts(self):
#     def format(self, decimal_places=7):
#     def min(self):
#     def max(self):
#     def is_zero(self):
#     def __repr__(self):
# class Matrix():


# Path: tests/test_word_d2.py
import unittest
from alfpy import word_d2
from alfpy import word_pattern
from alfpy import word_vector
from alfpy.utils import distmatrix
from . import utils





class DistanceTest(unittest.TestCase, utils.ModulesCommonTest):

    def __init__(self, *args, **kwargs):
        super(DistanceTest, self).__init__(*args, **kwargs)
        utils.ModulesCommonTest.set_test_data()
        self.patterns = []
        self.counts = []
        self.freqs = []
        for i in range(1, 5):
            p = word_pattern.create(self.pep_records.seq_list, i)
            self.patterns.append(p)
            c = word_vector.Counts(self.pep_records.length_list, p)
            self.counts.append(c)

            f = word_vector.Freqs(self.pep_records.length_list, p)