# Path: modules/pepdata/static_data.py
# MATRIX_DIR = join(PACKAGE_DIR, 'matrices')


from os.path import join
from .static_data import MATRIX_DIR
import numpy as np
    lines = [l.strip() for l in table.split("\n")]
    lines = [l for l in lines if len(l) > 0 and not l.startswith("#")]
    assert len(lines) == 20, "Malformed amino acid interaction table"
    d = {}
    for i, line in enumerate(lines):
        coeff_strings = line.split(" ")
        assert len(coeff_strings) == 20, \
          "Malformed row in amino acid interaction table"
        x = amino_acid_letters[i]
        d[x] = {}
        for j, coeff_str in enumerate(coeff_strings):
            value = float(coeff_str)
            y = amino_acid_letters[j]
            d[x][y] = value
    return d

def transpose_interaction_dict(d):
    transposed = {}
    for x in amino_acid_letters:
        transposed[x] = {}
        for y in amino_acid_letters:
            transposed[x][y] = d[y][x]
    return transposed


with open(join(MATRIX_DIR, 'strand_vs_coil.txt'), 'r') as f:
    strand_vs_coil_table = f.read()
    strand_vs_coil = parse_interaction_table(strand_vs_coil_table)
    coil_vs_strand = transpose_interaction_dict(strand_vs_coil)


# Path: modules/pepdata/static_data.py
# MATRIX_DIR = join(PACKAGE_DIR, 'matrices')


# Path: modules/pepdata/amino_acid.py
from os.path import join
from .static_data import MATRIX_DIR
import numpy as np

    lines = [l.strip() for l in table.split("\n")]
    lines = [l for l in lines if len(l) > 0 and not l.startswith("#")]
    assert len(lines) == 20, "Malformed amino acid interaction table"
    d = {}
    for i, line in enumerate(lines):
        coeff_strings = line.split(" ")
        assert len(coeff_strings) == 20, \
          "Malformed row in amino acid interaction table"
        x = amino_acid_letters[i]
        d[x] = {}
        for j, coeff_str in enumerate(coeff_strings):
            value = float(coeff_str)
            y = amino_acid_letters[j]
            d[x][y] = value
    return d

def transpose_interaction_dict(d):
    transposed = {}
    for x in amino_acid_letters:
        transposed[x] = {}
        for y in amino_acid_letters:
            transposed[x][y] = d[y][x]
    return transposed


with open(join(MATRIX_DIR, 'strand_vs_coil.txt'), 'r') as f:
    strand_vs_coil_table = f.read()
    strand_vs_coil = parse_interaction_table(strand_vs_coil_table)
    coil_vs_strand = transpose_interaction_dict(strand_vs_coil)


with open(join(MATRIX_DIR, 'helix_vs_strand.txt'), 'r') as f: