mkt.databases.datasets.discoverx.DiscoverXInfoGenerator

class mkt.databases.datasets.discoverx.DiscoverXInfoGenerator(str_url: str = 'https://raw.githubusercontent.com/openkinome/kinoml/refs/heads/master/kinoml/data/kinomescan/DiscoverX_489_Kinase_Assay_Construct_Information.csv', bool_offset: bool = True, df: DataFrame | None = None, df_id: DataFrame | None = None, dict_discoverx_info: dict[str, DiscoverXInfo] = FieldInfo(annotation=NoneType, required=False, default_factory=dict, json_schema_extra={'initialize': False}))[source]

Bases: object

Class to generate DiscoverXInfo objects from DiscoverX kinase construct information CSV.

__init__(str_url: str = 'https://raw.githubusercontent.com/openkinome/kinoml/refs/heads/master/kinoml/data/kinomescan/DiscoverX_489_Kinase_Assay_Construct_Information.csv', bool_offset: bool = True, df: DataFrame | None = None, df_id: DataFrame | None = None, dict_discoverx_info: dict[str, DiscoverXInfo] = FieldInfo(annotation=NoneType, required=False, default_factory=dict, json_schema_extra={'initialize': False})) None

Methods

__eq__(other)

Return self==value.

__init__([str_url, bool_offset, df, df_id, ...])

__post_init__()

Post-initialization to generate DataFrame and ID mapping.

check_multimatch_str(list_in)

Check which multi-mapping kinase IDs correspond to a given region.

generate_dataframes()

Generate DataFrame of DiscoverX kinase construct information with UniProt mapping.

generate_discoverx_info_dict()

Generate dictionary of DiscoverXInfo objects from the DataFrame.

parse_mutation_info(str_mut)

Parse mutation information from a mutation string.

replace_multi_mapping_keys()

Combine mono- and multi-mapping UniProt ID lists into a single list.

return_construct_boundaries(str_in)

Return the start and end indices of the kinase construct from the construct description.

return_deletion_mutation(str_in)

Return the start residue, list of codon indices, and end residue from a deletion

return_missense_mutation(str_in)

Return the wild-type residue, codon index, and mutant residue from a missense mutation string.

Attributes

__dataclass_fields__

__dataclass_params__

__match_args__

bool_offset

Whether to use 1-based indexing (True) or 0-based indexing (False).

df

DataFrame of the DiscoverX kinase construct information CSV.

df_id

DataFrame of the UniProt ID mapping results.

str_url

URL to the DiscoverX kinase construct information CSV.

__init__(str_url: str = 'https://raw.githubusercontent.com/openkinome/kinoml/refs/heads/master/kinoml/data/kinomescan/DiscoverX_489_Kinase_Assay_Construct_Information.csv', bool_offset: bool = True, df: DataFrame | None = None, df_id: DataFrame | None = None, dict_discoverx_info: dict[str, DiscoverXInfo] = FieldInfo(annotation=NoneType, required=False, default_factory=dict, json_schema_extra={'initialize': False})) None
bool_offset: bool = True

Whether to use 1-based indexing (True) or 0-based indexing (False). Default is True.

Type:

bool

check_multimatch_str(list_in: list[tuple[int, str]]) list[str][source]

Check which multi-mapping kinase IDs correspond to a given region.

Parameters:

list_in (list[tuple[int, str]]) – List of tuples of (row index, kinase ID) for multi-mapping kinase IDs.

Returns:

List of strings containing the resolved kinase IDs.

Return type:

list[str]

df: DataFrame | None = None

DataFrame of the DiscoverX kinase construct information CSV.

Type:

pd.DataFrame

df_id: DataFrame | None = None

DataFrame of the UniProt ID mapping results.

Type:

pd.DataFrame

generate_dataframes() tuple[DataFrame, DataFrame][source]

Generate DataFrame of DiscoverX kinase construct information with UniProt mapping.

Returns:

dfpd.DataFrame

DataFrame of the DiscoverX kinase construct information.

df_idpd.DataFrame

DataFrame of the UniProt ID mapping results.

generate_discoverx_info_dict() dict[str, DiscoverXInfo][source]

Generate dictionary of DiscoverXInfo objects from the DataFrame.

Returns:

dict[str, DiscoverXInfo]

Dictionary of DiscoverXInfo objects keyed by DiscoverX gene symbol.

parse_mutation_info(str_mut: str) tuple[bool, dict[str, list | None]][source]

Parse mutation information from a mutation string.

Parameters:

str_mutstr

Mutation string in the format “A123B” (missense) or “A123-B” (deletion).

Returns:

tuple[bool, dict[str, list | None]]
Tuple of (is_wild_type, dict of mutations) where dict contains:
  • “missense”: list of missense mutations as tuples (wt_aa, position, mut_aa)

  • “deletion”: list of deletion mutations as tuples (wt_aa, list of positions, mut_aa or ‘-‘)

If wild-type, returns (True, {“missense”: None, “deletion”: None}). If mutations are present, returns (False, {“missense”: […], “deletion”: […]}). Missense mutations are represented as tuples of (WT AA, position, mutant AA). Deletion mutations are represented as tuples of (WT start AA, list of positions, WT end AA).

replace_multi_mapping_keys() list[str | None][source]

Combine mono- and multi-mapping UniProt ID lists into a single list.

Returns:

list[str | None]

Combined list of UniProt IDs.

static return_construct_boundaries(str_in: str) tuple[str | None, int | None, str | None, int | None][source]

Return the start and end indices of the kinase construct from the construct description.

Parameters:

str_instr

“AA Start/Stop” string.

Returns:

tuple[str | None, int | None, str | None, int | None]

Tuple of (str_start, idx_start, str_end, idx_end).

static return_deletion_mutation(str_in: str) tuple[str, list[int], str][source]

Return the start residue, list of codon indices, and end residue from a deletion

Parameters:

str_instr

Deletion mutation string (e.g., “A123-125del”).

Returns:

tuple[str, list[int], str]

Tuple of (str_start, list_idx_del, str_end).

static return_missense_mutation(str_in: str) tuple[str, int, str][source]

Return the wild-type residue, codon index, and mutant residue from a missense mutation string.

Parameters:

str_instr

Missense mutation string (e.g., “A123T”).

Returns:

tuple[str, int, str]

Tuple of (str_wt, idx_codon, str_mut).

str_url: str = 'https://raw.githubusercontent.com/openkinome/kinoml/refs/heads/master/kinoml/data/kinomescan/DiscoverX_489_Kinase_Assay_Construct_Information.csv'

URL to the DiscoverX kinase construct information CSV.

Type:

str