<commit_before>import argparse
import itertools
import os.path
import textwrap

from .api import predict
from .model import parse
from .utils import (
    dump_posterior_file,
    load_posterior_file,
    load_fasta_file,
)

has_matplotlib = True
try:
    import matplotlib
    matplotlib.use('Agg')
    import matplotlib.pyplot as plt
except ImportError:
    has_matplotlib = False


APP_DIR = os.path.dirname(__file__.__path__[0])
DEFAULT_MODEL = os.path.join(APP_DIR, 'tmhmm', 'TMHMM2.0.model')


PRETTY_NAMES = {
    'i': 'inside',
    'M': 'transmembrane helix',
    'o': 'outside',
    'O': 'outside'
}


def summarize(path):
    """
    Summarize a path as a list of (start, end, state) triples.
    """
    for state, group in itertools.groupby(enumerate(path), key=lambda x: x[1]):
        group = list(group)
        start = min(group, key=lambda x: x[0])[0]
        end = max(group, key=lambda x: x[0])[0]<commit_msg>Fix wrong path to model file<commit_after>import argparse
import itertools
import os.path
import textwrap

from .api import predict
from .model import parse
from .utils import (
    dump_posterior_file,
    load_posterior_file,
    load_fasta_file,
)

has_matplotlib = True
try:
    import matplotlib
    matplotlib.use('Agg')
    import matplotlib.pyplot as plt
except ImportError:
    has_matplotlib = False


DEFAULT_MODEL = os.path.join(os.path.dirname(__file__), 'TMHMM2.0.model')


PRETTY_NAMES = {
    'i': 'inside',
    'M': 'transmembrane helix',
    'o': 'outside',
    'O': 'outside'
}


def summarize(path):
    """
    Summarize a path as a list of (start, end, state) triples.
    """
    for state, group in itertools.groupby(enumerate(path), key=lambda x: x[1]):
        group = list(group)
        start = min(group, key=lambda x: x[0])[0]
        end = max(group, key=lambda x: x[0])[0]
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.008187772925764192, 'mean_word_length': 3.45985401459854, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5651907', 'n_tokens_mistral': 674, 'n_tokens_neox': 652, 'n_words': 171}