# 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/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_pattern
from alfpy.utils import seqrecords
from alfpy.version import __version__
    if args.teiresias:
        if args.l is None:
            parser.error("Teiresias requires --l")
        if args.k is None:
            parser.error("Teiresias requires --k")
        if args.word_size < 2:
            parser.error("Teiresias requires --word_size to be >= 2")
        if args.l < 2:
            parser.error("--l must be at least 2")
        if args.l > args.word_size:
            parser.error("--word_size must be >= than --l")
    elif args.word_size < 1:
        parser.error("--word_size must be >= 1")
    return args


def main():
    parser = get_parser()
    args = validate_args(parser)

    if args.teiresias:
        args.fasta.close()
        p = word_pattern.run_teiresias(args.fasta.name,
                                       w=args.word_size,
                                       l=args.l,
                                       k=args.k,
                                       output_filename=args.out)
    else:
        seq_records = seqrecords.read_fasta(args.fasta)
        args.fasta.close()

# 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/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/create_wordpattern.py
import argparse
import sys
from alfpy import word_pattern
from alfpy.utils import seqrecords
from alfpy.version import __version__

    if args.teiresias:
        if args.l is None:
            parser.error("Teiresias requires --l")
        if args.k is None:
            parser.error("Teiresias requires --k")
        if args.word_size < 2:
            parser.error("Teiresias requires --word_size to be >= 2")
        if args.l < 2:
            parser.error("--l must be at least 2")
        if args.l > args.word_size:
            parser.error("--word_size must be >= than --l")
    elif args.word_size < 1:
        parser.error("--word_size must be >= 1")
    return args


def main():
    parser = get_parser()
    args = validate_args(parser)

    if args.teiresias:
        args.fasta.close()
        p = word_pattern.run_teiresias(args.fasta.name,
                                       w=args.word_size,
                                       l=args.l,
                                       k=args.k,
                                       output_filename=args.out)
    else:
        seq_records = seqrecords.read_fasta(args.fasta)
        args.fasta.close()

        p = word_pattern.create(seq_records.seq_list,