dae.pheno_tool package
Subpackages
Submodules
dae.pheno_tool.pheno_tool_adapter module
- class dae.pheno_tool.pheno_tool_adapter.PhenoToolAdapter(pheno_tool: PhenoTool, pheno_tool_helper: PhenoToolHelper)[source]
Bases:
PhenoToolAdapterBase
Adapter for PhenoTool class.
- calc_by_effect(measure_id: str, effect: str, people_variants: Counter, person_ids: list[str] | None = None, family_ids: list[str] | None = None, normalize_by: list[dict[str, str]] | None = None) dict[str, Any] [source]
- calc_variants(data: dict[str, Any], effect_groups: list[str]) dict[str, Any] [source]
Run pheno tool on given data.
- get_result_by_sex(result: dict[str, PhenoResult], sex: str) dict[str, Any] [source]
- class dae.pheno_tool.pheno_tool_adapter.PhenoToolAdapterBase[source]
Bases:
object
Base class for pheno tool adapters.
dae.pheno_tool.tool module
- class dae.pheno_tool.tool.PhenoResult[source]
Bases:
object
Represents a result of PhenoTool calculation.
- class dae.pheno_tool.tool.PhenoTool(phenotype_data: PhenotypeData)[source]
Bases:
object
Tool to estimate dependency between variants and phenotype measrues.
Arguments of the constructor are:
phenotype_data – an instance of PhenotypeData
measure_id – a phenotype measure ID
person_ids – an optional list of person IDs to filter the phenotype database with
normalize_by – list of continuous measure names. Default value is an empty list
- calc(measure_id: str, variants: Counter, *, sex_split: bool = False, person_ids: list[str] | None = None, family_ids: list[str] | None = None, normalize_by: list[dict[str, str]] | None = None) dict[str, PhenoResult] | PhenoResult [source]
Perform calculation.
variants – an instance of Counter, matching personIds to an amount of variants
sex_split – should we split the result by sex or not. Default is False.
- class dae.pheno_tool.tool.PhenoToolHelper(genotype_data: GenotypeData, phenotype_data: PhenotypeData)[source]
Bases:
object
Helper class for PhenoTool.
Collects variants and person ids from genotype data.
Arguments of the constructor are:
genotype_data – an instance of StudyWrapper