dae.studies package

Subpackages

Submodules

dae.studies.dataset_helpers module

class dae.studies.dataset_helpers.DatasetHelpers(gpf_instance=None)[source]

Bases: object

Helper class for work with studies in impala genotype storage.

disable_study_config(dataset_id, dry_run=None)[source]

Disable dataset.

find_genotype_data_config(dataset_id)[source]

Find and return configuration of a dataset.

find_genotype_data_config_file(dataset_id)[source]

Find and return config filename for a dataset.

get_genotype_storage(dataset_id)[source]

Find the genotype storage that stores a dataset.

remove_study_config(dataset_id)[source]
rename_study_config(dataset_id, new_id, config_content, dry_run=None)[source]

Rename study config for a dataset.

dae.studies.study module

Classes to represent genotype data.

class dae.studies.study.GenotypeData(config: Box, studies: list[dae.studies.study.GenotypeData])[source]

Bases: ABC

Abstract base class for genotype data.

close() None[source]
property description: str | None

Load and return description of a genotype data.

abstract property families: FamiliesData
get_leaf_children() list[dae.studies.study.GenotypeDataStudy][source]

Return list of genotype studies children of this group.

get_person_set_collection(person_set_collection_id: str) PersonSetCollection | None[source]
abstract get_studies_ids(leaves: bool = True) list[str][source]
property has_cnv: bool
property has_complex: bool
property has_denovo: bool
property has_transmitted: bool
abstract property is_group: bool
property name: str
property parents: set[str]
property person_set_collections: dict[str, dae.person_sets.PersonSetCollection]
property phenotype: str | None
property pub_med: str | None
query_result_summary_variants(regions: list[dae.utils.regions.Region] | None = None, genes: list[str] | None = None, effect_types: list[str] | None = None, variant_type: str | None = None, real_attr_filter: list[tuple] | None = None, ultra_rare: bool | None = None, frequency_filter: list[tuple] | None = None, return_reference: bool | None = None, return_unknown: bool | None = None, limit: int | None = None, study_filters: list[str] | None = None, **kwargs: Any) QueryResult | None[source]

Build a query result for summary variants only.

query_result_variants(regions: list[dae.utils.regions.Region] | None = None, genes: list[str] | None = None, effect_types: list[str] | None = None, family_ids: Iterable[str] | None = None, person_ids: Iterable[str] | None = None, person_set_collection: tuple[str, list[str]] | None = None, inheritance: str | list[str] | None = None, roles: str | None = None, sexes: str | None = None, variant_type: str | None = None, real_attr_filter: list[tuple] | None = None, ultra_rare: bool | None = None, frequency_filter: list[tuple] | None = None, return_reference: bool | None = None, return_unknown: bool | None = None, limit: int | None = None, study_filters: Iterable[str] | None = None, pedigree_fields: list[str] | None = None, **_kwargs: Any) QueryResult | None[source]

Build a query result.

query_summary_variants(regions: list[dae.utils.regions.Region] | None = None, genes: list[str] | None = None, effect_types: list[str] | None = None, variant_type: str | None = None, real_attr_filter: list[tuple] | None = None, ultra_rare: bool | None = None, frequency_filter: list[tuple] | None = None, return_reference: bool | None = None, return_unknown: bool | None = None, limit: int | None = None, study_filters: list[str] | None = None, **kwargs: Any) Generator[SummaryVariant, None, None][source]

Query and return generator containing summary variants.

query_variants(regions: list[dae.utils.regions.Region] | None = None, genes: list[str] | None = None, effect_types: list[str] | None = None, family_ids: Iterable[str] | None = None, person_ids: Iterable[str] | None = None, person_set_collection: tuple[str, list[str]] | None = None, inheritance: str | list[str] | None = None, roles: str | None = None, sexes: str | None = None, variant_type: str | None = None, real_attr_filter: list[tuple] | None = None, ultra_rare: bool | None = None, frequency_filter: list[tuple] | None = None, return_reference: bool | None = None, return_unknown: bool | None = None, limit: int | None = None, study_filters: Iterable[str] | None = None, pedigree_fields: list[str] | None = None, unique_family_variants: bool = True, **kwargs: Any) Generator[FamilyVariant, None, None][source]

Query and return generator containing variants.

property study_id: str
property study_type: str
property year: str | None
class dae.studies.study.GenotypeDataGroup(config: Box, studies: Iterable[GenotypeData])[source]

Bases: GenotypeData

Represents a group of genotype data classes.

Queries to this object will be sent to all child data.

property families: FamiliesData
get_studies_ids(leaves: bool = True) list[str][source]
has_families_cache() bool[source]

Check cached families and person set collections.

property is_group: bool
load_families_cache() bool[source]

Load cached families and person set collections.

If cached families or persons are missing, returns False.

rebuild_families() None[source]

Construct genotype group families data from child studies.

save_families_cache(cache_dir: str | None = None) None[source]

Load cached families and person set collections.

If cached families or persons are missing, returns False.

class dae.studies.study.GenotypeDataStudy(config: Box, backend: Any)[source]

Bases: GenotypeData

Represents a singular genotype data study.

property families: FamiliesData
get_studies_ids(leaves: bool = True) list[str][source]
property is_group: bool
property study_phenotype: str

dae.studies.variants_db module

class dae.studies.variants_db.VariantsDb(dae_config: Box, genome: ReferenceGenome, gene_models: GeneModels, genotype_storage_factory: GenotypeStorageRegistry)[source]

Bases: object

Database responsible for keeping genotype data studies and groups.

get(object_id: str) GenotypeData | None[source]

Deprecated since version start: using GPFInstance methods

get_all_genotype_data() list[dae.studies.study.GenotypeData][source]
get_all_genotype_group_configs() list[box.box.Box][source]
get_all_genotype_group_ids() list[str][source]
get_all_genotype_groups() list[dae.studies.study.GenotypeData][source]
get_all_genotype_studies() List[GenotypeDataStudy | Any][source]
get_all_genotype_study_configs() list[box.box.Box][source]
get_all_genotype_study_ids() List[str | Any][source]
get_all_ids() list[str][source]

Deprecated since version start: using GPFInstance methods

get_config(config_id: str) Box | None[source]

Deprecated since version start: using GPFInstance methods

get_genotype_group(group_id: str) GenotypeData | None[source]
get_genotype_group_config(group_id: str) Box | None[source]
get_genotype_study(study_id: str) GenotypeData | None[source]
get_genotype_study_config(study_id: str) Box | None[source]
register_genotype_data(genotype_data: GenotypeData | GenotypeDataGroup) None[source]

Add GenotypeData to DB.

reload() None[source]

Load all studies and groups again.

unregister_genotype_data(genotype_data: GenotypeData) None[source]

Remove GenotypeData from DB.

Module contents