classifier module

CharGer

class CharGer(config)[source]

Bases: object

Variant classifier.

Parameters

config (charger.config.CharGerConfig) – CharGer’s configurations. See CharGerConfig for details to set it up.

Examples

>>> config = CharGerConfig(...)
>>> charger = CharGer()
>>> charger.setup()
>>> charger.run_acmg_modules()
>>> charger.run_charger_modules()
config: Final[charger.config.CharGerConfig]

Configuration as a CharGerConfig object.

input_variants: List[charger.variant.Variant]

Parsed input variants.

pathogenic_variants: List[charger.variant.Variant]

Known pathogenic variants.

inheritance_genes: charger.classifier.InheritanceGenesType

Variant inheritance dominance mode of the genes for PVS1 module.

pp2_genes: Set[str]

Genes marked for PP2 module.

bp1_genes: Set[str]

Genes marked for BP1 module.

results: List[charger.result.CharGerResult]

Classification results of the input variants. The length and order should always be the same as input_variants.

setup()[source]

Setup all the intput data and annotation.

Sequentially it calls:

  1. _validate_config()

  2. _read_input_variants()

  3. _read_pathogenic_variants()

  4. _read_inheritance_gene_table()

  5. _read_pp2_gene_list()

  6. _read_bp1_gene_list()

  7. _match_clinvar()

Return type

None

run_acmg_modules()[source]

Run all ACMG modules.

See acmg_modules for all the currently implemented modules.

Return type

None

run_charger_modules()[source]

Run all CharGer customized modules.

See custom_modules for all the currently implemented modules.

Return type

None

Module helper classes

InheritanceGenesType

Type hint alias for CharGer.inheritance_genes.

alias of Dict[str, Optional[charger.variant.GeneInheritanceMode]]

class ModuleAvailability(value)[source]

Bases: enum.Enum

Availability of a ACMG or CharGer modules.

Used by CharGer._acmg_module_availability and CharGer._charger_module_availability.

Examples

Skip PVS1 module by:

>>> charger = CharGer(CharGerConfig())
>>> charger._acmg_module_availability = ModuleAvailability.USER_DISABLED
ACTIVE = 1

The module is active.

USER_DISABLED = 2

The module is disabled by user. The module will be skipped.

INVALID_SETUP = 3

The module has invalid setup, such as no additional annotation provided. The module will be skipped.