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_denovo_gene_sets(types: dict[str, Any], datasets: list[Any], collection_id: str) list[dict[str, Any]] [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_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_genotype_data(genotype_data_id: str) GenotypeData [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.
- 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]
- 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_denovo_gene_sets(types: dict[str, Any], datasets: list[Any], collection_id: str) list[dict[str, Any]] [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_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_genotype_data(genotype_data_id: str) GenotypeData [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.
- 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]
- unregister_genotype_data(genotype_data: GenotypeData) None [source]