# Path: alfpy/graphdna.py
# def _2DSGraphVector(seq):
# def _2DMGraphVector(seq, n):
# def _2DNGraphVector(genomeseq):
# def create_2DSGraphVectors(seq_records):
# def create_2DMGraphVectors(seq_records, n):
# def create_2DNGraphVectors(seq_records):
#     def __init__(self, vector, disttype='euclid_norm'):
# def main():
# class Distance(distance.Distance):
# 
# 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 numpy as np
import unittest
from alfpy import graphdna
from alfpy.utils import distmatrix
from . import utils
        super(DistanceTest, self).__init__(*args, **kwargs)
        utils.ModulesCommonTest.set_test_data()

    def test_distance_2DSG(self):
        data = graphdna.create_2DSGraphVectors(self.dna_records)
        dist = graphdna.Distance(data)
        matrix = distmatrix.create(self.dna_records.id_list, dist)
        exp = [
            '   3',
            'seq1       0.0000000 9.4762599 14.6585286',
            'seq2       9.4762599 0.0000000 6.7199568',
            'seq3       14.6585286 6.7199568 0.0000000',
        ]
        self.assertEqual(matrix.format(), "\n".join(exp))

    def test_distance_2DMG(self):
        data = graphdna.create_2DMGraphVectors(self.dna_records, 10)
        dist = graphdna.Distance(data)
        matrix = distmatrix.create(self.dna_records.id_list, dist)
        exp = [
            '   3',
            'seq1       0.0000000 22.2449494 55.9753388',
            'seq2       22.2449494 0.0000000 34.2064423',
            'seq3       55.9753388 34.2064423 0.0000000'
        ]
        self.assertEqual(matrix.format(), "\n".join(exp))

    def test_distance_2DNG(self):
        data = graphdna.create_2DNGraphVectors(self.dna_records)
        dist = graphdna.Distance(data)

# Path: alfpy/graphdna.py
# def _2DSGraphVector(seq):
# def _2DMGraphVector(seq, n):
# def _2DNGraphVector(genomeseq):
# def create_2DSGraphVectors(seq_records):
# def create_2DMGraphVectors(seq_records, n):
# def create_2DNGraphVectors(seq_records):
#     def __init__(self, vector, disttype='euclid_norm'):
# def main():
# class Distance(distance.Distance):
# 
# 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_graphdna.py
import numpy as np
import unittest
from alfpy import graphdna
from alfpy.utils import distmatrix
from . import utils

        super(DistanceTest, self).__init__(*args, **kwargs)
        utils.ModulesCommonTest.set_test_data()

    def test_distance_2DSG(self):
        data = graphdna.create_2DSGraphVectors(self.dna_records)
        dist = graphdna.Distance(data)
        matrix = distmatrix.create(self.dna_records.id_list, dist)
        exp = [
            '   3',
            'seq1       0.0000000 9.4762599 14.6585286',
            'seq2       9.4762599 0.0000000 6.7199568',
            'seq3       14.6585286 6.7199568 0.0000000',
        ]
        self.assertEqual(matrix.format(), "\n".join(exp))

    def test_distance_2DMG(self):
        data = graphdna.create_2DMGraphVectors(self.dna_records, 10)
        dist = graphdna.Distance(data)
        matrix = distmatrix.create(self.dna_records.id_list, dist)
        exp = [
            '   3',
            'seq1       0.0000000 22.2449494 55.9753388',
            'seq2       22.2449494 0.0000000 34.2064423',
            'seq3       55.9753388 34.2064423 0.0000000'
        ]
        self.assertEqual(matrix.format(), "\n".join(exp))

    def test_distance_2DNG(self):
        data = graphdna.create_2DNGraphVectors(self.dna_records)
        dist = graphdna.Distance(data)

        matrix = distmatrix.create(self.dna_records.id_list, dist)