# Path: alfpy/bbc.py
# def base_base_correlation(seq, k, alphabet=None):
# def create_vectors(seq_records, k=10, alphabet="ATGC"):
#     def __init__(self, vector, disttype='euclid_norm'):
# def main():
#     L = len(alphabet)
#         D = l_dist_correlations - np.dot(p.T, p)
# 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/utils/data/seqcontent.py
# def get_alphabet(mol):
#     return ALPHABET[mol]
# 
# Path: alfpy/version.py



import argparse
import sys
from alfpy import bbc
from alfpy.utils import distmatrix
from alfpy.utils import seqrecords
from alfpy.utils.data.seqcontent import get_alphabet
from alfpy.version import __version__
#! /usr/bin/env python

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




def get_parser():
    parser = argparse.ArgumentParser(
        description='''Calculatee distance between DNA/protein sequences
        based on Base-Base Correlation (BBC).''',
        add_help=False, prog='calc_bbc.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.add_argument('--molecule', '-m', choices=['dna', 'rna', 'protein'],
                       help='choose sequence alphabet', required=True)

    group = parser.add_argument_group('OPTIONAL ARGUMENTS')

# Path: alfpy/bbc.py
# def base_base_correlation(seq, k, alphabet=None):
# def create_vectors(seq_records, k=10, alphabet="ATGC"):
#     def __init__(self, vector, disttype='euclid_norm'):
# def main():
#     L = len(alphabet)
#         D = l_dist_correlations - np.dot(p.T, p)
# 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/utils/data/seqcontent.py
# def get_alphabet(mol):
#     return ALPHABET[mol]
# 
# Path: alfpy/version.py



# Path: bin/calc_bbc.py
import argparse
import sys
from alfpy import bbc
from alfpy.utils import distmatrix
from alfpy.utils import seqrecords
from alfpy.utils.data.seqcontent import get_alphabet
from alfpy.version import __version__

#! /usr/bin/env python

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




def get_parser():
    parser = argparse.ArgumentParser(
        description='''Calculatee distance between DNA/protein sequences
        based on Base-Base Correlation (BBC).''',
        add_help=False, prog='calc_bbc.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.add_argument('--molecule', '-m', choices=['dna', 'rna', 'protein'],
                       help='choose sequence alphabet', required=True)

    group = parser.add_argument_group('OPTIONAL ARGUMENTS')

    group.add_argument('--k', '-k', help='''maximum distance to observe