dae.gpf_instance package
Subpackages
- dae.gpf_instance.adjustments package
- Submodules
- dae.gpf_instance.adjustments.adjust_command module
- dae.gpf_instance.adjustments.adjust_duckdb_storage module
- dae.gpf_instance.adjustments.adjust_impala_storage module
- dae.gpf_instance.adjustments.gpf_instance_adjustments module
- Module contents
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, dae_config_path: 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_genotype_data() list[GenotypeData] [source]
- get_all_phenotype_data() list[PhenotypeData] [source]
- get_annotation_pipeline() AnnotationPipeline [source]
Return the annotation pipeline configured in the GPF instance.
- get_annotation_pipeline_config() list[dict[str, Any]] | RawFullConfig [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_enrichment_builder(dataset: GenotypeData) BaseEnrichmentBuilder [source]
Get enrichment builder for specific dataset.
Will create and register new one if one isn’t found.
- get_genotype_data(genotype_data_id: str) GenotypeData [source]
- get_gp_statistic(gene_symbol: str) GPStatistic [source]
- get_pheno_tool_adapter(dataset: GenotypeData) PhenoToolAdapterBase [source]
Get enrichment builder for specific dataset.
Will create and register new one if one isn’t found.
- get_phenotype_data(phenotype_data_id: str) PhenotypeData [source]
- get_transcript_models(gene_symbol: str) tuple[str | None, list[TranscriptModel] | None] [source]
Get gene model by gene symbol.
- property grr: GenomicResourceRepo
Return genomic resource repository configured for GPF instance.
- list_gp_gene_symbols(page: int, symbol_like: str | None = None) list[str] [source]
Query AGR statistics and return results.
- load() GPFInstance [source]
Load all GPF instance attributes.
- make_enrichment_builder(dataset: GenotypeData) EnrichmentBuilder [source]
- make_pheno_tool_adapter(dataset: GenotypeData) PhenoToolAdapterBase [source]
Create a pheno tool adapter for dataset.
- property phenotype_storages: PhenotypeStorageRegistry
Get phenotype storage registry.
Will load if not cached.
- query_gp_statistics(page: int, symbol_like: str | None = None, sort_by: str | None = None, order: str | None = None) list[GPStatistic] [source]
Query AGR statistics and return results.
- property reference_genome: ReferenceGenome
Return reference genome defined in the GPFInstance config.
- register_enrichment_builder(dataset_id: str, builder: BaseEnrichmentBuilder) None [source]
Register a new enrichment builder to a given dataset ID.
- register_pheno_tool_adapter(dataset_id: str, adapter: PhenoToolAdapterBase) None [source]
Register a new enrichment builder to a given dataset ID.
Module contents
- class dae.gpf_instance.GPFInstance(dae_config: Box, dae_dir: str | Path, dae_config_path: 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_genotype_data() list[GenotypeData] [source]
- get_all_phenotype_data() list[PhenotypeData] [source]
- get_annotation_pipeline() AnnotationPipeline [source]
Return the annotation pipeline configured in the GPF instance.
- get_annotation_pipeline_config() list[dict[str, Any]] | RawFullConfig [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_enrichment_builder(dataset: GenotypeData) BaseEnrichmentBuilder [source]
Get enrichment builder for specific dataset.
Will create and register new one if one isn’t found.
- get_genotype_data(genotype_data_id: str) GenotypeData [source]
- get_gp_statistic(gene_symbol: str) GPStatistic [source]
- get_pheno_tool_adapter(dataset: GenotypeData) PhenoToolAdapterBase [source]
Get enrichment builder for specific dataset.
Will create and register new one if one isn’t found.
- get_phenotype_data(phenotype_data_id: str) PhenotypeData [source]
- get_transcript_models(gene_symbol: str) tuple[str | None, list[TranscriptModel] | None] [source]
Get gene model by gene symbol.
- property grr: GenomicResourceRepo
Return genomic resource repository configured for GPF instance.
- list_gp_gene_symbols(page: int, symbol_like: str | None = None) list[str] [source]
Query AGR statistics and return results.
- load() GPFInstance [source]
Load all GPF instance attributes.
- make_enrichment_builder(dataset: GenotypeData) EnrichmentBuilder [source]
- make_pheno_tool_adapter(dataset: GenotypeData) PhenoToolAdapterBase [source]
Create a pheno tool adapter for dataset.
- property phenotype_storages: PhenotypeStorageRegistry
Get phenotype storage registry.
Will load if not cached.
- query_gp_statistics(page: int, symbol_like: str | None = None, sort_by: str | None = None, order: str | None = None) list[GPStatistic] [source]
Query AGR statistics and return results.
- property reference_genome: ReferenceGenome
Return reference genome defined in the GPFInstance config.
- register_enrichment_builder(dataset_id: str, builder: BaseEnrichmentBuilder) None [source]
Register a new enrichment builder to a given dataset ID.
- register_pheno_tool_adapter(dataset_id: str, adapter: PhenoToolAdapterBase) None [source]
Register a new enrichment builder to a given dataset ID.