mkt.databases.protvar.ProtvarVariant
- class mkt.databases.protvar.ProtvarVariant(mt: str | None, scores: dict = <factory>)[source]
Bases:
objectScores for a single variant (one mutant residue) at a position.
Built by
ProtvarScoreQuery; holds the raw per-database score dict for this variant and exposes scalar accessors. Conservation, which is residue- rather than variant-level, is shared across all variants at the position.- __init__(*args: Any, **kwargs: Any) None
Methods
__eq__(other)Return self==value.
get_classification(database)Return the categorical classification for a database, or None.
Return the standalone popEVE payload for this variant, or None.
get_score(database)Return the numeric score for a database, or None if not present.
Attributes
__dataclass_fields____dataclass_params____match_args____pydantic_config__Mutant residue (1-letter code) this variant represents; None if unknown.
Mapping of ScoreDatabase to its raw score dict for this variant.
- get_classification(database: ScoreDatabase | str)[source]
Return the categorical classification for a database, or None.
- Parameters:
database (ScoreDatabase | str) – Database to retrieve, as a ScoreDatabase member or its value (e.g. “AM”).
- Returns:
The classification (“eveClass” for EVE, “amClass” for AlphaMissense); None for databases without one (Conservation, ESM1b, popEVE) or when the database is absent for this variant.
- Return type:
str | None
- get_popeve() dict | None[source]
Return the standalone popEVE payload for this variant, or None.
- Returns:
The full popEVE score dict (multiple keys, retained verbatim), or None if popEVE was not returned for this variant.
- Return type:
dict | None
- get_score(database: ScoreDatabase | str)[source]
Return the numeric score for a database, or None if not present.
- Parameters:
database (ScoreDatabase | str) – Database to retrieve, as a ScoreDatabase member or its value (e.g. “AM”).
- Returns:
The score (“score” for Conservation/EVE/ESM1b, “amPathogenicity” for AlphaMissense); None for popEVE (use
get_popeve()) or when the database is absent for this variant.- Return type:
float | None
- mt: str | None
Mutant residue (1-letter code) this variant represents; None if unknown.
- scores: dict
Mapping of ScoreDatabase to its raw score dict for this variant.