mkt.databases.plot.write_clade_membership_table

mkt.databases.plot.write_clade_membership_table(conservation_data, str_group: str = 'TK', str_filepath: str | None = None, dict_anchors: dict[str, tuple[str, ...]] | None = None) str[source]

Build a LaTeX (booktabs) table of named clades and their member kinases.

Uses the curated anchor-based clade names (mkt.schema.conservation_schema.DICT_CLADE_ANCHORS) so the table is keyed to stable clade names rather than fragile display-order numbers. Rows are the named clades that fall within str_group (e.g. the TK sub-families), ordered by descending membership.

Parameters:
  • conservation_data (KLIFSConservationData) – Persisted KLIFS clustering artifact (e.g. from mkt.schema.io_utils.load_conservation_data()).

  • str_group (str) – Kinase group to restrict membership to (default "TK"). Pass None to keep every member regardless of group.

  • str_filepath (str | None) – If given, write the LaTeX source to this path.

  • dict_anchors (dict[str, tuple[str, …]] | None) – Clade-name -> anchor-kinase mapping; defaults to DICT_CLADE_ANCHORS.

Returns:

The LaTeX table source.

Return type:

str