# 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():


from alfpy.utils import seqrecords
    from .utils import seqrecords
    from .utils.data import seqcontent
    import subprocess
        import uuid
        import os
            l = line.strip().split('\t')[2].split()
            pat = l.pop(0)
            pat_list.append(pat)
            d = {}
            # Alfree
            if ':' in l[0]:
                for el in l:
                    el = el.split(':')
                    seqidx = int(el[0])
                    count = int(el[1])
                    d[seqidx] = count
                occr_list.append(d)
            # Teiresias
            else:
                for seqidx, pos in zip(l[0::2], l[1::2]):
                    d.setdefault(int(seqidx), []).append(int(pos))
                pos_list.append(d)
                occr_list.append({seqi: len(poss) for seqi, poss in d.items()})
    return Pattern(pat_list=pat_list, pos_list=pos_list, occr_list=occr_list)


def main():
    # Manual creation of Pattern instance.
    pat_list = ['ATGC', 'CGCG', 'GCAT']
    occr_list = [{0: 1, 1: 2}, {2: 2}, {0: 3}]
    #pos_list = [{0: [234], 1:[200, 204]}, {2: [20, 45]}, {0: [3, 8, 34]}]
    pattern = Pattern(pat_list=pat_list, occr_list=occr_list, pos_list=[])

    k = 2


# 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/word_pattern.py
from alfpy.utils import seqrecords
    from .utils import seqrecords
    from .utils.data import seqcontent
    import subprocess
        import uuid
        import os

            l = line.strip().split('\t')[2].split()
            pat = l.pop(0)
            pat_list.append(pat)
            d = {}
            # Alfree
            if ':' in l[0]:
                for el in l:
                    el = el.split(':')
                    seqidx = int(el[0])
                    count = int(el[1])
                    d[seqidx] = count
                occr_list.append(d)
            # Teiresias
            else:
                for seqidx, pos in zip(l[0::2], l[1::2]):
                    d.setdefault(int(seqidx), []).append(int(pos))
                pos_list.append(d)
                occr_list.append({seqi: len(poss) for seqi, poss in d.items()})
    return Pattern(pat_list=pat_list, pos_list=pos_list, occr_list=occr_list)


def main():
    # Manual creation of Pattern instance.
    pat_list = ['ATGC', 'CGCG', 'GCAT']
    occr_list = [{0: 1, 1: 2}, {2: 2}, {0: 3}]
    #pos_list = [{0: [234], 1:[200, 204]}, {2: [20, 45]}, {0: [3, 8, 34]}]
    pattern = Pattern(pat_list=pat_list, occr_list=occr_list, pos_list=[])

    k = 2


    seq_records = seqrecords.main()