clophfit.prtecan.models ======================= .. py:module:: clophfit.prtecan.models .. autoapi-nested-parse:: Prtecan/prtecan.py. Classes ------- .. autoapisummary:: clophfit.prtecan.models.Labelblock clophfit.prtecan.models.Tecanfile clophfit.prtecan.models.LabelblocksGroup clophfit.prtecan.models.TecanfilesGroup clophfit.prtecan.models.PlateScheme Module Contents --------------- .. py:class:: Labelblock Parse a label block. :param lines: :raises ValueError: When data do not correspond to a complete 96-well plate. :raises TypeError: When normalization parameters are not numerical. .. rubric:: Notes Logs a warning when it replaces "OVER" with ``np.nan`` for saturated values. .. py:attribute:: lines :type: dataclasses.InitVar[list[list[str | int | float]]] Lines to create this Labelblock. .. py:attribute:: filename :type: str :value: '' Path of the corresponding Tecan file. .. py:attribute:: metadata :type: dict[str, clophfit.prtecan.parsers.Metadata] Metadata specific for this Labelblock. .. py:attribute:: data :type: dict[str, float] Plate data values as {'well_name', value}. .. py:attribute:: data_nrm :type: dict[str, float] Plate data values normalized as {'well_name', value}. .. py:method:: almost_equal(other) Check if two Labelblocks are almost equal (same excitation and emission). .. py:class:: Tecanfile Parse a Tecan .xls file. :param path: Path to `.xls` file. :type path: Path :raises FileNotFoundError: When path does not exist. :raises ValueError: When no Labelblock is found or file format is invalid. .. py:attribute:: metadata :type: dict[str, clophfit.prtecan.parsers.Metadata] General metadata for Tecanfile, like `Date` and `Shaking Duration`. .. py:attribute:: labelblocks :type: dict[int, Labelblock] All labelblocks contained in this file. .. py:class:: LabelblocksGroup Group labelblocks with compatible metadata. :param labelblocks: Labelblocks to be grouped. :type labelblocks: list[Labelblock] :param allequal: :raises Exception: When labelblocks are neither equal nor almost equal. .. py:attribute:: allequal :type: bool :value: False True if labelblocks already tested equal. .. py:attribute:: metadata :type: dict[str, clophfit.prtecan.parsers.Metadata] Metadata shared by all labelblocks. .. py:property:: data :type: dict[str, list[float]] Grouped data if labelblocks are equal, otherwise empty. .. py:property:: data_nrm :type: dict[str, list[float]] Normalized data by number of flashes, integration time and gain. .. py:class:: TecanfilesGroup Group of Tecanfiles containing at least one common Labelblock. :param tecanfiles: List of Tecanfiles. :type tecanfiles: list[Tecanfile] :raises ValueError: When no common Labelblock is found across all Tecanfiles. .. rubric:: Notes Logs a warning if the Tecanfiles do not contain the same number of Labelblocks that can be merged in the same order. In such cases, fewer LabelblocksGroup may be created. .. py:attribute:: labelblocksgroups :type: dict[int, LabelblocksGroup] Each group contains its own data like a titration. .. py:attribute:: metadata :type: dict[str, clophfit.prtecan.parsers.Metadata] Metadata shared by all tecanfiles. .. py:class:: PlateScheme Define buffer, discard, ctrl and unk wells, and ctrl names. :param file: File path to the scheme file []. :type file: Path .. py:property:: nofit_keys :type: set[str] Buffer and discarded wells. .. py:property:: buffer :type: list[str] List of buffer wells. .. py:property:: discard :type: list[str] List of discard wells. .. py:property:: ctrl :type: list[str] List of CTR wells. .. py:property:: names :type: dict[str, set[str]] A dictionary mapping sample names to their associated list of wells.