# Path: enrich2/plots.py
# DEFAULT_BINS = 30
# DEFAULT_GRIDSIZE = 50
# def configure_axes(ax, xgrid=False):
# def fit_axes(ax, xvalues, yvalues, slope, intercept, xlabels=None):
# def fit_axes_text(ax, cornertext=None, centertext=None, centerwrap=40):
# def volcano_plot(df, pdf, title=None, colors=None, log_bins=True, logp_max=10):
# def barcodemap_plot(
#     obj, pdf, log=False, bins=DEFAULT_BINS, color=plot_colors["bright3"]
# ):
# def overlap_merge_plot(obj, pdf):
# def counts_plot(
#     seqlib, label, pdf, log=False, bins=DEFAULT_BINS, color=plot_colors["bright1"]
# ):
# def weights_plot(selection, label, pdf):
# def corr_axes(ax, x, y, score_min, score_max, **kwargs):
# def hexbin_corr_axes(
#     ax, x, y, score_min, score_max, cbar_ax=None, gridsize=50, cmap="YlGnBu_r"
# ):
# def density_ax(ax, ys, xmin, xmax, xlabel, line_params, legend_loc="best"):


import logging
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
from matplotlib.patches import Circle
from matplotlib.lines import Line2D
from matplotlib.gridspec import GridSpec
from .plots import plot_cmaps, plot_colors
    groups = list()
    found_aa = list()
    with open(fname) as handle:
        for line in handle:
            if line.startswith("#"):
                continue
            if len(line) == 0:
                continue
            try:
                label, aa = line.split("\t")
            except ValueError:
                raise ValueError(
                    "Unexpected AA list file line format [{}]" "".format("SFMAP.PY")
                )
            aa = aa.split(",")
            aa = [x.strip() for x in aa]
            if any(x not in AA_LIST for x in aa):
                raise ValueError(
                    "Invalid amino acid in AA list file [{}]" "".format("SFMAP.PY")
                )
            else:
                group_labels.append(label)
                groups.append(aa)
                found_aa.extend(aa)
    if any(x not in found_aa for x in AA_LIST):
        raise ValueError(
            "Not all amino acids assigned in AA list file [{}]" "".format("SFMAP.PY")
        )
    if len(AA_LIST) != len(found_aa):
        raise ValueError(

# Path: enrich2/plots.py
# DEFAULT_BINS = 30
# DEFAULT_GRIDSIZE = 50
# def configure_axes(ax, xgrid=False):
# def fit_axes(ax, xvalues, yvalues, slope, intercept, xlabels=None):
# def fit_axes_text(ax, cornertext=None, centertext=None, centerwrap=40):
# def volcano_plot(df, pdf, title=None, colors=None, log_bins=True, logp_max=10):
# def barcodemap_plot(
#     obj, pdf, log=False, bins=DEFAULT_BINS, color=plot_colors["bright3"]
# ):
# def overlap_merge_plot(obj, pdf):
# def counts_plot(
#     seqlib, label, pdf, log=False, bins=DEFAULT_BINS, color=plot_colors["bright1"]
# ):
# def weights_plot(selection, label, pdf):
# def corr_axes(ax, x, y, score_min, score_max, **kwargs):
# def hexbin_corr_axes(
#     ax, x, y, score_min, score_max, cbar_ax=None, gridsize=50, cmap="YlGnBu_r"
# ):
# def density_ax(ax, ys, xmin, xmax, xlabel, line_params, legend_loc="best"):


# Path: enrich2/sfmap.py
import logging
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
from matplotlib.patches import Circle
from matplotlib.lines import Line2D
from matplotlib.gridspec import GridSpec
from .plots import plot_cmaps, plot_colors

    groups = list()
    found_aa = list()
    with open(fname) as handle:
        for line in handle:
            if line.startswith("#"):
                continue
            if len(line) == 0:
                continue
            try:
                label, aa = line.split("\t")
            except ValueError:
                raise ValueError(
                    "Unexpected AA list file line format [{}]" "".format("SFMAP.PY")
                )
            aa = aa.split(",")
            aa = [x.strip() for x in aa]
            if any(x not in AA_LIST for x in aa):
                raise ValueError(
                    "Invalid amino acid in AA list file [{}]" "".format("SFMAP.PY")
                )
            else:
                group_labels.append(label)
                groups.append(aa)
                found_aa.extend(aa)
    if any(x not in found_aa for x in AA_LIST):
        raise ValueError(
            "Not all amino acids assigned in AA list file [{}]" "".format("SFMAP.PY")
        )
    if len(AA_LIST) != len(found_aa):
        raise ValueError(

            "Duplicate assignments in AA list file [{}]" "".format("SFMAP.PY")