# 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():


import unittest
from alfpy import word_pattern
from alfpy import word_vector
from . import utils
        ]
        self.assertEqual(fw.format(), "\n".join(exp))

    def test_equal_freqs_pattern2(self):
        # The result of this method is identical to that from decaf+py.
        p = word_pattern.create(self.dna_records.seq_list, 2, True)
        freq = word_vector.Freqs(self.dna_records.length_list, p)
        freqmodel = word_vector.EqualFreqs(alphabet_size=4)
        freqs_std = word_vector.FreqsStd(self.dna_records.length_list,
                                         p, freqmodel)
        exp = [
            "TA\t0.113 0.189 0.169",
            "AC\t0.150 0.063 0.169",
            "GG\t0.030 0.201 0.135",
            "CT\t0.000 0.189 0.084",
            "AG\t0.038 0.126 0.084",
            "CA\t0.038 0.000 0.169",
            "AT\t0.038 0.063 0.084",
            "GA\t0.038 0.063 0.084",
            "AA\t0.060 0.000 0.067",
            "CC\t0.060 0.000 0.067",
            "CG\t0.113 0.000 0.000",
            "GT\t0.113 0.000 0.000",
            "TT\t0.030 0.050 0.000",
            "TC\t0.000 0.063 0.000",
            "TG\t0.038 0.000 0.000"
        ]
        self.assertEqual(freqs_std.format(), "\n".join(exp))

    def test_equilibrium_freqs_pattern2(self):

# 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: tests/test_word_vector.py
import unittest
from alfpy import word_pattern
from alfpy import word_vector
from . import utils

        ]
        self.assertEqual(fw.format(), "\n".join(exp))

    def test_equal_freqs_pattern2(self):
        # The result of this method is identical to that from decaf+py.
        p = word_pattern.create(self.dna_records.seq_list, 2, True)
        freq = word_vector.Freqs(self.dna_records.length_list, p)
        freqmodel = word_vector.EqualFreqs(alphabet_size=4)
        freqs_std = word_vector.FreqsStd(self.dna_records.length_list,
                                         p, freqmodel)
        exp = [
            "TA\t0.113 0.189 0.169",
            "AC\t0.150 0.063 0.169",
            "GG\t0.030 0.201 0.135",
            "CT\t0.000 0.189 0.084",
            "AG\t0.038 0.126 0.084",
            "CA\t0.038 0.000 0.169",
            "AT\t0.038 0.063 0.084",
            "GA\t0.038 0.063 0.084",
            "AA\t0.060 0.000 0.067",
            "CC\t0.060 0.000 0.067",
            "CG\t0.113 0.000 0.000",
            "GT\t0.113 0.000 0.000",
            "TT\t0.030 0.050 0.000",
            "TC\t0.000 0.063 0.000",
            "TG\t0.038 0.000 0.000"
        ]
        self.assertEqual(freqs_std.format(), "\n".join(exp))

    def test_equilibrium_freqs_pattern2(self):

        p = word_pattern.create(self.dna_records.seq_list, 2, True)