dae.gpf_instance package

Submodules

dae.gpf_instance.gpf_instance module

Defines GPFInstance class that gives access to different parts of GPF.

class dae.gpf_instance.gpf_instance.GPFInstance(dae_config: Box, dae_dir: str | Path, **kwargs: dict[str, Any])[source]

Bases: object

Class to access different parts of a GPF instance.

static build(config_filename: str | Path | None = None, **kwargs: Any) GPFInstance[source]

Construct and return a GPF instance.

If the config_filename is None, tries to discover the GPF instance. First check if a DAE_DB_DIR environment variable is defined and if defined use it as a GPF instance directory.

Otherwise look for a gpf_instance.yaml file in the current directory and its parents. If found use it as a configuration file.

property denovo_gene_sets_db: DenovoGeneSetsDb
property gene_models: GeneModels

Return gene models used in the GPF instance.

property gene_scores_db: Any

Load and return gene scores db.

property gene_sets_db: GeneSetsDb

Return GeneSetsDb populated with gene sets from the GPFInstance.

property genomic_scores: GenomicScoresRegistry

Load and return genomic scores db.

property genotype_storages: Any

Construct and return genotype storage registry.

get_all_common_report_configs() list[box.box.Box][source]

Return all common report configuration.

get_all_denovo_gene_sets(types: dict[str, Any], datasets: list[Any], collection_id: str) list[dict[str, Any]][source]
get_all_gene_score_descs() list[dae.gene_scores.gene_scores.ScoreDesc][source]
get_all_gene_scores() list[dae.gene_scores.gene_scores.GeneScore][source]
get_all_gene_sets(collection_id: str) list[dae.gene.gene_sets_db.GeneSet][source]
get_all_genotype_data() list[dae.studies.study.GenotypeData][source]
get_all_phenotype_data() list[dae.pheno.pheno_data.PhenotypeData][source]
get_annotation_pipeline() AnnotationPipeline[source]

Return the annotation pipeline configured in the GPF instance.

get_annotation_pipeline_config() list[dict[str, Any]][source]

Return the annotation pipeline config.

get_common_report(study_id: str) CommonReport | None[source]

Load and return common report (dataset statistics) for a study.

get_dataset(dataset_id: str) GenotypeData[source]
get_denovo_gene_set(gene_set_id: str, types: dict[str, Any], datasets: list[dae.studies.study.GenotypeData], collection_id: str) dict[str, Any][source]
get_denovo_gene_sets(datasets: list[dae.studies.study.GenotypeData]) list[dict[str, Any]][source]
get_gene_score(gene_score_id: str) GeneScore[source]
get_gene_score_desc(score_id: str) ScoreDesc[source]
get_gene_set(collection_id: str, gene_set_id: str) GeneSet[source]
get_gene_sets_collections() list[dict[str, Any]][source]
get_genotype_data(genotype_data_id: str) GenotypeData[source]
get_genotype_data_config(genotype_data_id: str) Box | None[source]
get_genotype_data_ids(local_only: bool = False) list[str][source]
get_gp_configuration() Box[source]
get_gp_statistic(gene_symbol: str) GPStatistic[source]
get_phenotype_data(phenotype_data_id: str) PhenotypeData[source]
get_phenotype_data_config(phenotype_data_id: str) Box | None[source]
get_phenotype_data_ids() list[str][source]
get_transcript_models(gene_symbol: str) tuple[Optional[str], Optional[list[dae.genomic_resources.gene_models.TranscriptModel]]][source]

Get gene model by gene symbol.

property grr: GenomicResourceRepo

Return genomic resource repository configured for GPF instance.

has_denovo_gene_sets() bool[source]
has_gene_score(gene_score_id: str) bool[source]
has_gene_set_collection(gsc_id: str) bool[source]
has_phenotype_data(phenotype_data_id: str) bool[source]
load() GPFInstance[source]

Load all GPF instance attributes.

query_gp_statistics(page: int, symbol_like: str | None = None, sort_by: str | None = None, order: str | None = None) list[dae.gene_profile.statistic.GPStatistic][source]

Query AGR statistics and return results.

property reference_genome: ReferenceGenome

Return reference genome defined in the GPFInstance config.

register_genotype_data(genotype_data: GenotypeData) None[source]
reload() None[source]

Reload GPF instance studies, de Novo gene sets, etc.

unregister_genotype_data(genotype_data: GenotypeData) None[source]

Module contents

class dae.gpf_instance.GPFInstance(dae_config: Box, dae_dir: str | Path, **kwargs: dict[str, Any])[source]

Bases: object

Class to access different parts of a GPF instance.

static build(config_filename: str | Path | None = None, **kwargs: Any) GPFInstance[source]

Construct and return a GPF instance.

If the config_filename is None, tries to discover the GPF instance. First check if a DAE_DB_DIR environment variable is defined and if defined use it as a GPF instance directory.

Otherwise look for a gpf_instance.yaml file in the current directory and its parents. If found use it as a configuration file.

property denovo_gene_sets_db: DenovoGeneSetsDb
property gene_models: GeneModels

Return gene models used in the GPF instance.

property gene_scores_db: Any

Load and return gene scores db.

property gene_sets_db: GeneSetsDb

Return GeneSetsDb populated with gene sets from the GPFInstance.

property genomic_scores: GenomicScoresRegistry

Load and return genomic scores db.

property genotype_storages: Any

Construct and return genotype storage registry.

get_all_common_report_configs() list[box.box.Box][source]

Return all common report configuration.

get_all_denovo_gene_sets(types: dict[str, Any], datasets: list[Any], collection_id: str) list[dict[str, Any]][source]
get_all_gene_score_descs() list[dae.gene_scores.gene_scores.ScoreDesc][source]
get_all_gene_scores() list[dae.gene_scores.gene_scores.GeneScore][source]
get_all_gene_sets(collection_id: str) list[dae.gene.gene_sets_db.GeneSet][source]
get_all_genotype_data() list[dae.studies.study.GenotypeData][source]
get_all_phenotype_data() list[dae.pheno.pheno_data.PhenotypeData][source]
get_annotation_pipeline() AnnotationPipeline[source]

Return the annotation pipeline configured in the GPF instance.

get_annotation_pipeline_config() list[dict[str, Any]][source]

Return the annotation pipeline config.

get_common_report(study_id: str) CommonReport | None[source]

Load and return common report (dataset statistics) for a study.

get_dataset(dataset_id: str) GenotypeData[source]
get_denovo_gene_set(gene_set_id: str, types: dict[str, Any], datasets: list[dae.studies.study.GenotypeData], collection_id: str) dict[str, Any][source]
get_denovo_gene_sets(datasets: list[dae.studies.study.GenotypeData]) list[dict[str, Any]][source]
get_gene_score(gene_score_id: str) GeneScore[source]
get_gene_score_desc(score_id: str) ScoreDesc[source]
get_gene_set(collection_id: str, gene_set_id: str) GeneSet[source]
get_gene_sets_collections() list[dict[str, Any]][source]
get_genotype_data(genotype_data_id: str) GenotypeData[source]
get_genotype_data_config(genotype_data_id: str) Box | None[source]
get_genotype_data_ids(local_only: bool = False) list[str][source]
get_gp_configuration() Box[source]
get_gp_statistic(gene_symbol: str) GPStatistic[source]
get_phenotype_data(phenotype_data_id: str) PhenotypeData[source]
get_phenotype_data_config(phenotype_data_id: str) Box | None[source]
get_phenotype_data_ids() list[str][source]
get_transcript_models(gene_symbol: str) tuple[Optional[str], Optional[list[dae.genomic_resources.gene_models.TranscriptModel]]][source]

Get gene model by gene symbol.

property grr: GenomicResourceRepo

Return genomic resource repository configured for GPF instance.

has_denovo_gene_sets() bool[source]
has_gene_score(gene_score_id: str) bool[source]
has_gene_set_collection(gsc_id: str) bool[source]
has_phenotype_data(phenotype_data_id: str) bool[source]
load() GPFInstance[source]

Load all GPF instance attributes.

query_gp_statistics(page: int, symbol_like: str | None = None, sort_by: str | None = None, order: str | None = None) list[dae.gene_profile.statistic.GPStatistic][source]

Query AGR statistics and return results.

property reference_genome: ReferenceGenome

Return reference genome defined in the GPFInstance config.

register_genotype_data(genotype_data: GenotypeData) None[source]
reload() None[source]

Reload GPF instance studies, de Novo gene sets, etc.

unregister_genotype_data(genotype_data: GenotypeData) None[source]