# Path: pyani/pyani_config.py
# NUCMER_DEFAULT = Path("nucmer")
# FILTER_DEFAULT = Path("delta-filter")
# BLASTN_DEFAULT = Path("blastn")
# MAKEBLASTDB_DEFAULT = Path("makeblastdb")
# BLASTALL_DEFAULT = Path("blastall")
# FORMATDB_DEFAULT = Path("formatdb")
# QSUB_DEFAULT = Path("qsub")
# FASTANI_DEFAULT = Path("fastANI")
# ANIM_FILESTEMS = (
#     "ANIm_alignment_lengths",
#     "ANIm_percentage_identity",
#     "ANIm_alignment_coverage",
#     "ANIm_similarity_errors",
#     "ANIm_hadamard",
# )
# ANIB_FILESTEMS = (
#     "ANIb_alignment_lengths",
#     "ANIb_percentage_identity",
#     "ANIb_alignment_coverage",
#     "ANIb_similarity_errors",
#     "ANIb_hadamard",
# )
# TETRA_FILESTEMS = ("TETRA_correlations",)
# ANIBLASTALL_FILESTEMS = (
#     "ANIblastall_alignment_lengths",
#     "ANIblastall_percentage_identity",
#     "ANIblastall_alignment_coverage",
#     "ANIblastall_similarity_errors",
#     "ANIblastall_hadamard",
# )
# ALIGNDIR = {
#     "ANIm": "nucmer_output",
#     "ANIb": "blastn_output",
#     "ANIblastall": "blastall_output",
#     "fastANI": "fastani_output",
# }
# MPL_CBAR = "Spectral"
# FRAGSIZE = 1020  # Default ANIb fragment size
# SGE_WAIT = 0.01  # Base unit of time (s) to wait between polling SGE
# CMAP_SPBND_BURD = LinearSegmentedColormap("spbnd_BuRd", cdict_spbnd_BuRd)
# CMAP_HADAMARD_BURD = LinearSegmentedColormap("hadamard_BuRd", cdict_hadamard_BuRd)
# CMAP_BURD = LinearSegmentedColormap("BuRd", cdict_BuRd)
# def params_mpl(dfm: pd.DataFrame) -> Dict[str, Tuple[str, Any, Any]]:
# def get_colormap(dataframe: pd.DataFrame, matname: str) -> Tuple[str, Any, Any]:


import shutil
import pandas as pd  # type: ignore
from logging import Logger
from pathlib import Path
from typing import (
    Any,
    Callable,
    Dict,
    Iterable,
    Iterator,
    List,
    NamedTuple,
    Optional,
    Tuple,
)
from Bio import SeqIO  # type: ignore
from pyani import pyani_config
        """
        self.percentage_identity.loc[qname, sname] = value
        if sym:
            self.percentage_identity.loc[sname, qname] = value

    def add_coverage(
        self, qname: str, sname: str, qcover: float, scover: Optional[float] = None
    ) -> None:
        """Add percentage coverage values to self.alignment_coverage.

        :param qname:
        :param sname:
        :param value:
        :param sym:
        """
        self.alignment_coverage.loc[qname, sname] = qcover
        if scover:
            self.alignment_coverage.loc[sname, qname] = scover

    @property
    def hadamard(self) -> float:
        """Return Hadamard matrix (identity * coverage)."""
        return self.percentage_identity * self.alignment_coverage

    @property
    def data(self) -> Iterator[Tuple[Any, str]]:
        """Return list of (dataframe, filestem) tuples."""
        stemdict = {
            "ANIm": pyani_config.ANIM_FILESTEMS,
            "ANIb": pyani_config.ANIB_FILESTEMS,

# Path: pyani/pyani_config.py
# NUCMER_DEFAULT = Path("nucmer")
# FILTER_DEFAULT = Path("delta-filter")
# BLASTN_DEFAULT = Path("blastn")
# MAKEBLASTDB_DEFAULT = Path("makeblastdb")
# BLASTALL_DEFAULT = Path("blastall")
# FORMATDB_DEFAULT = Path("formatdb")
# QSUB_DEFAULT = Path("qsub")
# FASTANI_DEFAULT = Path("fastANI")
# ANIM_FILESTEMS = (
#     "ANIm_alignment_lengths",
#     "ANIm_percentage_identity",
#     "ANIm_alignment_coverage",
#     "ANIm_similarity_errors",
#     "ANIm_hadamard",
# )
# ANIB_FILESTEMS = (
#     "ANIb_alignment_lengths",
#     "ANIb_percentage_identity",
#     "ANIb_alignment_coverage",
#     "ANIb_similarity_errors",
#     "ANIb_hadamard",
# )
# TETRA_FILESTEMS = ("TETRA_correlations",)
# ANIBLASTALL_FILESTEMS = (
#     "ANIblastall_alignment_lengths",
#     "ANIblastall_percentage_identity",
#     "ANIblastall_alignment_coverage",
#     "ANIblastall_similarity_errors",
#     "ANIblastall_hadamard",
# )
# ALIGNDIR = {
#     "ANIm": "nucmer_output",
#     "ANIb": "blastn_output",
#     "ANIblastall": "blastall_output",
#     "fastANI": "fastani_output",
# }
# MPL_CBAR = "Spectral"
# FRAGSIZE = 1020  # Default ANIb fragment size
# SGE_WAIT = 0.01  # Base unit of time (s) to wait between polling SGE
# CMAP_SPBND_BURD = LinearSegmentedColormap("spbnd_BuRd", cdict_spbnd_BuRd)
# CMAP_HADAMARD_BURD = LinearSegmentedColormap("hadamard_BuRd", cdict_hadamard_BuRd)
# CMAP_BURD = LinearSegmentedColormap("BuRd", cdict_BuRd)
# def params_mpl(dfm: pd.DataFrame) -> Dict[str, Tuple[str, Any, Any]]:
# def get_colormap(dataframe: pd.DataFrame, matname: str) -> Tuple[str, Any, Any]:


# Path: pyani/pyani_tools.py
import shutil
import pandas as pd  # type: ignore
from logging import Logger
from pathlib import Path
from typing import (
    Any,
    Callable,
    Dict,
    Iterable,
    Iterator,
    List,
    NamedTuple,
    Optional,
    Tuple,
)
from Bio import SeqIO  # type: ignore
from pyani import pyani_config

        """
        self.percentage_identity.loc[qname, sname] = value
        if sym:
            self.percentage_identity.loc[sname, qname] = value

    def add_coverage(
        self, qname: str, sname: str, qcover: float, scover: Optional[float] = None
    ) -> None:
        """Add percentage coverage values to self.alignment_coverage.

        :param qname:
        :param sname:
        :param value:
        :param sym:
        """
        self.alignment_coverage.loc[qname, sname] = qcover
        if scover:
            self.alignment_coverage.loc[sname, qname] = scover

    @property
    def hadamard(self) -> float:
        """Return Hadamard matrix (identity * coverage)."""
        return self.percentage_identity * self.alignment_coverage

    @property
    def data(self) -> Iterator[Tuple[Any, str]]:
        """Return list of (dataframe, filestem) tuples."""
        stemdict = {
            "ANIm": pyani_config.ANIM_FILESTEMS,
            "ANIb": pyani_config.ANIB_FILESTEMS,

            "ANIblastall": pyani_config.ANIBLASTALL_FILESTEMS,