gpf.studies package
Submodules
gpf.studies.study module
Classes to represent genotype data.
- class gpf.studies.study.CommonStudyMixin(config: Box)[source]
Bases:
objectMixin class for common study functionality to be reused.
- property description: str | None
Load and return description of a genotype data.
- class gpf.studies.study.GenotypeData(registry: GenotypeStorageRegistry, config: Box, studies: list[GenotypeData])[source]
Bases:
CommonStudyMixin,ABCAbstract base class for genotype data.
- build_and_save(*, force: bool = False) CommonReport | None[source]
Build a common report for a study, saves it and returns the report.
If the common reports are disabled for the study, the function skips building the report and returns None.
If the report already exists the default behavior is to skip building the report. You can force building the report by passing force=True to the function.
- build_report() CommonReport[source]
Generate common report JSON from genotpye data study.
- abstract property families: FamiliesData
- get_common_report() CommonReport | None[source]
Return a study’s common report.
- get_leaf_children() list[GenotypeDataStudy][source]
Return list of genotype studies children of this group.
- get_person_set_collection(person_set_collection_id: str | None) PersonSetCollection | None[source]
- get_query_leaf_studies(study_filters: Iterable[str] | None) list[GenotypeDataStudy][source]
Collect studies contained in local hierarchy.
- property has_cnv: bool
- property has_complex: bool
- property has_denovo: bool
- property has_transmitted: bool
- property has_zygosity: bool
- abstract property is_group: bool
- property name: str
- property parents: set[str]
- property person_set_collections: dict[str, PersonSetCollection]
- property phenotype: str | None
- property pub_med: str | None
- query_summary_variants(*, regions: list[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, category_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) Iterable[SummaryVariant][source]
Query and return generator containing summary variants.
- query_variants(*, regions: list[Region] | None = None, genes: list[str] | None = None, effect_types: list[str] | None = None, family_ids: list[str] | None = None, person_ids: list[str] | None = None, person_set_collection: PSCQuery | None = None, inheritance: str | list[str] | None = None, roles: str | None = None, sexes: str | None = None, affected_statuses: str | None = None, variant_type: str | None = None, real_attr_filter: list[tuple] | None = None, categorical_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, summary_variant_ids: list[str] | None = None, study_filters: list[str] | None = None, unique_family_variants: bool = True, tags_query: TagsQuery | None = None, zygosity_in_status: str | None = None) Iterable[FamilyVariant][source]
Query and return generator containing variants.
- property study_id: str
- property study_type: str
- property year: str | None
- class gpf.studies.study.GenotypeDataGroup(registry: GenotypeStorageRegistry, config: Box, studies: Iterable[GenotypeData])[source]
Bases:
GenotypeDataRepresents a group of genotype data classes.
Queries to this object will be sent to all child data.
- property families: FamiliesData
- property has_denovo: bool
- property has_transmitted: bool
- property is_group: bool
- class gpf.studies.study.GenotypeDataStudy(registry: GenotypeStorageRegistry, config: Box)[source]
Bases:
GenotypeDataRepresents a singular genotype data study.
- property backend: QueryVariantsBase
- property families: FamiliesData
- property is_group: bool
- property study_phenotype: str
- class gpf.studies.study.PSCQueryAdjustments(affected_statues: str | None, sexes: str | None, roles: str | None, person_ids: list[str] | None)[source]
Bases:
objectQuery adjustments from person set collection query.
- affected_statues: str | None
- person_ids: list[str] | None
- roles: str | None
- sexes: str | None
gpf.studies.variants_db module
- class gpf.studies.variants_db.VariantsDb(dae_config: Box, genome: ReferenceGenome, gene_models: GeneModels, annotation: list[AttributeInfo], storage_registry: GenotypeStorageRegistry)[source]
Bases:
objectDatabase 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[GenotypeData][source]
- get_all_genotype_groups() list[GenotypeData][source]
- get_all_genotype_studies() list[GenotypeDataStudy][source]
- get_genotype_group(group_id: str) GenotypeData | None[source]
- get_genotype_study(study_id: str) GenotypeData | None[source]
- register_genotype_data(genotype_data: GenotypeData | GenotypeDataGroup) None[source]
Add GenotypeData to DB.
- unregister_genotype_data(genotype_data: GenotypeData) None[source]
Remove GenotypeData from DB.