# Path: alfpy/word_distance.py
# def geometric_mean(values):
#     def pwdist_euclid_squared(self, seq1idx, seq2idx):
#     def pwdist_euclid_norm(self, seq1idx, seq2idx):
#     def pwdist_euclid_seqlen1(self, seq1idx, seq2idx):
#     def pwdist_euclid_seqlen2(self, seq1idx, seq2idx):
#     def __angle_cos(self, seq1idx, seq2idx):
#     def pwdist_angle_cos_diss(self, seq1idx, seq2idx):
#     def pwdist_angle_cos_evol(self, seq1idx, seq2idx):
#     def pwdist_manhattan(self, seq1idx, seq2idx):
#     def pwdist_diff_abs_add(self, seq1idx, seq2idx):
#     def pwdist_chebyshev(self, seq1idx, seq2idx):
#     def pwdist_braycurtis(self, seq1idx, seq2idx):
#     def pwdist_diff_abs_mult(self, seq1idx, seq2idx):
#     def pwdist_diff_abs_mult1(self, seq1idx, seq2idx):
#     def pwdist_diff_abs_mult2(self, seq1idx, seq2idx):
#     def pwdist_kld(self, seq1idx, seq2idx):
#     def pwdist_jsd(self, seq1idx, seq2idx):
#         def entropy(p, q):
#     def pwdist_google(self, seq1idx, seq2idx):
#     def pwdist_lcc(self, seq1idx, seq2idx):
#     def pwdist_canberra(self, seq1idx, seq2idx):
#     def pwdist_minkowski(self, seq1idx, seq2idx, p=2):
# def main():
# class Distance(distance.Distance):
#         _P = x + 0.0000001
#         _Q = y + 0.0000001
#         _M = 0.5 * (_P + _Q)
# 
# 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_rtd.py
# def calc_rtd(word_positions):
# def create_vector(seqcount, pattern):
# 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: alfpy/utils/seqrecords.py
# class SeqRecords:
#     def __init__(self, id_list=None, seq_list=None):
#     def add(self, seqid, seq):
#     def fasta(self, wrap=70):
#     def length_list(self):
#     def __iter__(self):
#     def __len__(self):
#     def __repr__(self):
# def read_fasta(handle):
# def main():
# 
# Path: alfpy/version.py



import argparse
import sys
from alfpy import word_distance
from alfpy import word_pattern
from alfpy import word_rtd
from alfpy.utils import distmatrix
from alfpy.utils import seqrecords
from alfpy.version import __version__
#! /usr/bin/env python

# Copyright (c) 2016 Zielezinski A, combio.pl




def get_parser():
    parser = argparse.ArgumentParser(
        description='''Calculate distances between protein/DNA sequences based
        on Return Time Distribution (RTD) of words\' occurrences and their
        relative orders''',
        add_help=False, prog='calc_word_rtd.py'
    )
    group = parser.add_argument_group('REQUIRED ARGUMENTS')
    group.add_argument('--fasta', '-f',
                       help='input FASTA sequence filename', required=True,
                       type=argparse.FileType('r'), metavar="FILE")

    group = parser.add_argument_group('  Choose between the two options')
    g1 = group.add_mutually_exclusive_group()
    g1.add_argument('--word_size', '-s', metavar="N",
                    help='word size for creating word patterns',
                    type=int)
    g1.add_argument('--word_pattern', '-w',
                    help='input filename w/ pre-computed word patterns',
                    type=argparse.FileType('r'), metavar="FILE")

    group = parser.add_argument_group('OPTIONAL ARGUMENTS')

# Path: alfpy/word_distance.py
# def geometric_mean(values):
#     def pwdist_euclid_squared(self, seq1idx, seq2idx):
#     def pwdist_euclid_norm(self, seq1idx, seq2idx):
#     def pwdist_euclid_seqlen1(self, seq1idx, seq2idx):
#     def pwdist_euclid_seqlen2(self, seq1idx, seq2idx):
#     def __angle_cos(self, seq1idx, seq2idx):
#     def pwdist_angle_cos_diss(self, seq1idx, seq2idx):
#     def pwdist_angle_cos_evol(self, seq1idx, seq2idx):
#     def pwdist_manhattan(self, seq1idx, seq2idx):
#     def pwdist_diff_abs_add(self, seq1idx, seq2idx):
#     def pwdist_chebyshev(self, seq1idx, seq2idx):
#     def pwdist_braycurtis(self, seq1idx, seq2idx):
#     def pwdist_diff_abs_mult(self, seq1idx, seq2idx):
#     def pwdist_diff_abs_mult1(self, seq1idx, seq2idx):
#     def pwdist_diff_abs_mult2(self, seq1idx, seq2idx):
#     def pwdist_kld(self, seq1idx, seq2idx):
#     def pwdist_jsd(self, seq1idx, seq2idx):
#         def entropy(p, q):
#     def pwdist_google(self, seq1idx, seq2idx):
#     def pwdist_lcc(self, seq1idx, seq2idx):
#     def pwdist_canberra(self, seq1idx, seq2idx):
#     def pwdist_minkowski(self, seq1idx, seq2idx, p=2):
# def main():
# class Distance(distance.Distance):
#         _P = x + 0.0000001
#         _Q = y + 0.0000001
#         _M = 0.5 * (_P + _Q)
# 
# 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_rtd.py
# def calc_rtd(word_positions):
# def create_vector(seqcount, pattern):
# 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: alfpy/utils/seqrecords.py
# class SeqRecords:
#     def __init__(self, id_list=None, seq_list=None):
#     def add(self, seqid, seq):
#     def fasta(self, wrap=70):
#     def length_list(self):
#     def __iter__(self):
#     def __len__(self):
#     def __repr__(self):
# def read_fasta(handle):
# def main():
# 
# Path: alfpy/version.py



# Path: bin/calc_word_rtd.py
import argparse
import sys
from alfpy import word_distance
from alfpy import word_pattern
from alfpy import word_rtd
from alfpy.utils import distmatrix
from alfpy.utils import seqrecords
from alfpy.version import __version__

#! /usr/bin/env python

# Copyright (c) 2016 Zielezinski A, combio.pl




def get_parser():
    parser = argparse.ArgumentParser(
        description='''Calculate distances between protein/DNA sequences based
        on Return Time Distribution (RTD) of words\' occurrences and their
        relative orders''',
        add_help=False, prog='calc_word_rtd.py'
    )
    group = parser.add_argument_group('REQUIRED ARGUMENTS')
    group.add_argument('--fasta', '-f',
                       help='input FASTA sequence filename', required=True,
                       type=argparse.FileType('r'), metavar="FILE")

    group = parser.add_argument_group('  Choose between the two options')
    g1 = group.add_mutually_exclusive_group()
    g1.add_argument('--word_size', '-s', metavar="N",
                    help='word size for creating word patterns',
                    type=int)
    g1.add_argument('--word_pattern', '-w',
                    help='input filename w/ pre-computed word patterns',
                    type=argparse.FileType('r'), metavar="FILE")

    group = parser.add_argument_group('OPTIONAL ARGUMENTS')

    distlist = word_distance.Distance.get_disttypes()