# Path: kipoiseq/transforms/functional.py
# def _get_alphabet_dict(alphabet):
# def _get_index_dict(alphabet):
# def one_hot2token(arr):
# def one_hot2string(arr, alphabet=DNA):
# def rc_dna(seq):
# def rc_rna(seq):
# def tokenize(seq, alphabet=DNA, neutral_alphabet=["N"]):
# def token2one_hot(tokens, alphabet_size=4, neutral_value=.25, dtype=None):
# def one_hot(seq, alphabet=DNA, neutral_alphabet=['N'], neutral_value=.25, dtype=None):
# def one_hot_dna(seq: str,
#                 alphabet: list = DNA,
#                 neutral_alphabet: str = 'N',
#                 neutral_value: Any = 0.25,
#                 dtype=np.float32) -> np.ndarray:
#     def to_uint8(string):
# def pad(seq, length, value="N", anchor="center"):
# def trim(seq, length, anchor="center"):
# def fixed_len(seq, length, anchor="center", value="N"):
# def resize_interval(interval, width, anchor='center'):
# def translate(seq: str, hg38=False):
# TRANSLATION_TABLE = {
#     'ATA': 'I', 'ATC': 'I', 'ATT': 'I', 'ATG': 'M',
#     'ACA': 'T', 'ACC': 'T', 'ACG': 'T', 'ACT': 'T',
#     'AAC': 'N', 'AAT': 'N', 'AAA': 'K', 'AAG': 'K',
#     'AGC': 'S', 'AGT': 'S', 'AGA': 'R', 'AGG': 'R',
#     'CTA': 'L', 'CTC': 'L', 'CTG': 'L', 'CTT': 'L',
#     'CCA': 'P', 'CCC': 'P', 'CCG': 'P', 'CCT': 'P',
#     'CAC': 'H', 'CAT': 'H', 'CAA': 'Q', 'CAG': 'Q',
#     'CGA': 'R', 'CGC': 'R', 'CGG': 'R', 'CGT': 'R',
#     'GTA': 'V', 'GTC': 'V', 'GTG': 'V', 'GTT': 'V',
#     'GCA': 'A', 'GCC': 'A', 'GCG': 'A', 'GCT': 'A',
#     'GAC': 'D', 'GAT': 'D', 'GAA': 'E', 'GAG': 'E',
#     'GGA': 'G', 'GGC': 'G', 'GGG': 'G', 'GGT': 'G',
#     'TCA': 'S', 'TCC': 'S', 'TCG': 'S', 'TCT': 'S',
#     'TTC': 'F', 'TTT': 'F', 'TTA': 'L', 'TTG': 'L',
#     'TAC': 'Y', 'TAT': 'Y', 'TAA': '_', 'TAG': '_',
#     'TGC': 'C', 'TGT': 'C', 'TGA': '_', 'TGG': 'W',
# }
# TRANSLATION_TABLE_FOR_HG38 = {
#     'ATA': 'I', 'ATC': 'I', 'ATT': 'I', 'ATG': 'M',
#     'ACA': 'T', 'ACC': 'T', 'ACG': 'T', 'ACT': 'T',
#     'AAC': 'N', 'AAT': 'N', 'AAA': 'K', 'AAG': 'K',
#     'AGC': 'S', 'AGT': 'S', 'AGA': 'R', 'AGG': 'R',
#     'CTA': 'L', 'CTC': 'L', 'CTG': 'L', 'CTT': 'L',
#     'CCA': 'P', 'CCC': 'P', 'CCG': 'P', 'CCT': 'P',
#     'CAC': 'H', 'CAT': 'H', 'CAA': 'Q', 'CAG': 'Q',
#     'CGA': 'R', 'CGC': 'R', 'CGG': 'R', 'CGT': 'R',
#     'GTA': 'V', 'GTC': 'V', 'GTG': 'V', 'GTT': 'V',
#     'GCA': 'A', 'GCC': 'A', 'GCG': 'A', 'GCT': 'A',
#     'GAC': 'D', 'GAT': 'D', 'GAA': 'E', 'GAG': 'E',
#     'GGA': 'G', 'GGC': 'G', 'GGG': 'G', 'GGT': 'G',
#     'TCA': 'S', 'TCC': 'S', 'TCG': 'S', 'TCT': 'S',
#     'TTC': 'F', 'TTT': 'F', 'TTA': 'L', 'TTG': 'L',
#     'TAC': 'Y', 'TAT': 'Y', 'TAA': '_', 'TAG': '_',
#     'TGC': 'C', 'TGT': 'C', 'TGA': 'U', 'TGG': 'W',  # TGA to U instead of STOP codon
#     'XXX': 'X',  # ambiguous start
#     'NNN': ''  # empty string for ambiguous protein
# }
# 
# Path: kipoiseq/utils.py
# DNA = ("A", "C", "G", "T")
# 
# def parse_alphabet(alphabet):
#     if isinstance(alphabet, str):
#         return list(alphabet)
#     else:
#         return alphabet
# 
# def parse_dtype(dtype):
#     if isinstance(dtype, string_types):
#         try:
#             return eval(dtype)
#         except Exception as e:
#             raise ValueError(
#                 "Unable to parse dtype: {}. \nException: {}".format(dtype, e))
#     else:
#         return dtype


import numpy as np
        import warnings
from kipoiseq.transforms import functional as F
from kipoiseq.utils import DNA, parse_alphabet, parse_dtype
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function




# Path: kipoiseq/transforms/functional.py
# def _get_alphabet_dict(alphabet):
# def _get_index_dict(alphabet):
# def one_hot2token(arr):
# def one_hot2string(arr, alphabet=DNA):
# def rc_dna(seq):
# def rc_rna(seq):
# def tokenize(seq, alphabet=DNA, neutral_alphabet=["N"]):
# def token2one_hot(tokens, alphabet_size=4, neutral_value=.25, dtype=None):
# def one_hot(seq, alphabet=DNA, neutral_alphabet=['N'], neutral_value=.25, dtype=None):
# def one_hot_dna(seq: str,
#                 alphabet: list = DNA,
#                 neutral_alphabet: str = 'N',
#                 neutral_value: Any = 0.25,
#                 dtype=np.float32) -> np.ndarray:
#     def to_uint8(string):
# def pad(seq, length, value="N", anchor="center"):
# def trim(seq, length, anchor="center"):
# def fixed_len(seq, length, anchor="center", value="N"):
# def resize_interval(interval, width, anchor='center'):
# def translate(seq: str, hg38=False):
# TRANSLATION_TABLE = {
#     'ATA': 'I', 'ATC': 'I', 'ATT': 'I', 'ATG': 'M',
#     'ACA': 'T', 'ACC': 'T', 'ACG': 'T', 'ACT': 'T',
#     'AAC': 'N', 'AAT': 'N', 'AAA': 'K', 'AAG': 'K',
#     'AGC': 'S', 'AGT': 'S', 'AGA': 'R', 'AGG': 'R',
#     'CTA': 'L', 'CTC': 'L', 'CTG': 'L', 'CTT': 'L',
#     'CCA': 'P', 'CCC': 'P', 'CCG': 'P', 'CCT': 'P',
#     'CAC': 'H', 'CAT': 'H', 'CAA': 'Q', 'CAG': 'Q',
#     'CGA': 'R', 'CGC': 'R', 'CGG': 'R', 'CGT': 'R',
#     'GTA': 'V', 'GTC': 'V', 'GTG': 'V', 'GTT': 'V',
#     'GCA': 'A', 'GCC': 'A', 'GCG': 'A', 'GCT': 'A',
#     'GAC': 'D', 'GAT': 'D', 'GAA': 'E', 'GAG': 'E',
#     'GGA': 'G', 'GGC': 'G', 'GGG': 'G', 'GGT': 'G',
#     'TCA': 'S', 'TCC': 'S', 'TCG': 'S', 'TCT': 'S',
#     'TTC': 'F', 'TTT': 'F', 'TTA': 'L', 'TTG': 'L',
#     'TAC': 'Y', 'TAT': 'Y', 'TAA': '_', 'TAG': '_',
#     'TGC': 'C', 'TGT': 'C', 'TGA': '_', 'TGG': 'W',
# }
# TRANSLATION_TABLE_FOR_HG38 = {
#     'ATA': 'I', 'ATC': 'I', 'ATT': 'I', 'ATG': 'M',
#     'ACA': 'T', 'ACC': 'T', 'ACG': 'T', 'ACT': 'T',
#     'AAC': 'N', 'AAT': 'N', 'AAA': 'K', 'AAG': 'K',
#     'AGC': 'S', 'AGT': 'S', 'AGA': 'R', 'AGG': 'R',
#     'CTA': 'L', 'CTC': 'L', 'CTG': 'L', 'CTT': 'L',
#     'CCA': 'P', 'CCC': 'P', 'CCG': 'P', 'CCT': 'P',
#     'CAC': 'H', 'CAT': 'H', 'CAA': 'Q', 'CAG': 'Q',
#     'CGA': 'R', 'CGC': 'R', 'CGG': 'R', 'CGT': 'R',
#     'GTA': 'V', 'GTC': 'V', 'GTG': 'V', 'GTT': 'V',
#     'GCA': 'A', 'GCC': 'A', 'GCG': 'A', 'GCT': 'A',
#     'GAC': 'D', 'GAT': 'D', 'GAA': 'E', 'GAG': 'E',
#     'GGA': 'G', 'GGC': 'G', 'GGG': 'G', 'GGT': 'G',
#     'TCA': 'S', 'TCC': 'S', 'TCG': 'S', 'TCT': 'S',
#     'TTC': 'F', 'TTT': 'F', 'TTA': 'L', 'TTG': 'L',
#     'TAC': 'Y', 'TAT': 'Y', 'TAA': '_', 'TAG': '_',
#     'TGC': 'C', 'TGT': 'C', 'TGA': 'U', 'TGG': 'W',  # TGA to U instead of STOP codon
#     'XXX': 'X',  # ambiguous start
#     'NNN': ''  # empty string for ambiguous protein
# }
# 
# Path: kipoiseq/utils.py
# DNA = ("A", "C", "G", "T")
# 
# def parse_alphabet(alphabet):
#     if isinstance(alphabet, str):
#         return list(alphabet)
#     else:
#         return alphabet
# 
# def parse_dtype(dtype):
#     if isinstance(dtype, string_types):
#         try:
#             return eval(dtype)
#         except Exception as e:
#             raise ValueError(
#                 "Unable to parse dtype: {}. \nException: {}".format(dtype, e))
#     else:
#         return dtype


# Path: kipoiseq/transforms/transforms.py
import numpy as np
        import warnings
from kipoiseq.transforms import functional as F
from kipoiseq.utils import DNA, parse_alphabet, parse_dtype

from __future__ import division
from __future__ import absolute_import
from __future__ import print_function




class Compose(object):