dae.genomic_resources.implementations package

Submodules

dae.genomic_resources.implementations.annotation_pipeline_impl module

class dae.genomic_resources.implementations.annotation_pipeline_impl.AnnotationPipelineImplementation(resource: GenomicResource)[source]

Bases: GenomicResourceImplementation, InfoImplementationMixin

Resource implementation for annotation pipeline.

add_statistics_build_tasks(task_graph: TaskGraph, **kwargs: Any) list[Task][source]

Add tasks for calculating resource statistics to a task graph.

calc_info_hash() bytes[source]

Compute and return the info hash.

calc_statistics_hash() bytes[source]

Compute the statistics hash.

This hash is used to decide whether the resource statistics should be recomputed.

property files: set[str]

Return a list of resource files the implementation utilises.

get_info(**kwargs: Any) str[source]

Construct the contents of the implementation’s HTML info page.

get_statistics_info(**kwargs: Any) str[source]

Construct the contents of the implementation’s HTML statistics info page.

get_template() Template[source]

dae.genomic_resources.implementations.gene_models_impl module

class dae.genomic_resources.implementations.gene_models_impl.GeneModelsImpl(resource: GenomicResource)[source]

Bases: GenomicResourceImplementation, InfoImplementationMixin

Provides class for gene models.

add_statistics_build_tasks(task_graph: TaskGraph, **kwargs: Any) list[Task][source]

Add tasks for calculating resource statistics to a task graph.

calc_info_hash() bytes[source]

Compute and return the info hash.

calc_statistics_hash() bytes[source]

Compute the statistics hash.

This hash is used to decide whether the resource statistics should be recomputed.

property files: set[str]

Return a list of resource files the implementation utilises.

get_info(**kwargs: Any) str[source]

Construct the contents of the implementation’s HTML info page.

get_statistics() GeneModelsStatistics | None[source]

Try and load resource statistics.

get_statistics_info(**kwargs: Any) str[source]

Construct the contents of the implementation’s HTML statistics info page.

get_template() Template[source]
class dae.genomic_resources.implementations.gene_models_impl.GeneModelsStatistics(resource_id: str, chromosome_count: int, global_statistic: StatisticsData, chrom_statistics: dict[str, StatisticsData])[source]

Bases: ResourceStatistics

Class for accessing reference genome statistics.

static deserialize(data: str) GeneModelsStatistics[source]

Deserialize gene models statistics.

serialize() str[source]

Serialize gene models statistics.

class dae.genomic_resources.implementations.gene_models_impl.StatisticsData(transcript_number: int, protein_coding_transcript_number: int, gene_number: int, protein_coding_gene_number: int)[source]

Bases: object

Class for storing gene models statistics.

gene_number: int
protein_coding_gene_number: int
protein_coding_transcript_number: int
transcript_number: int

dae.genomic_resources.implementations.genomic_scores_impl module

class dae.genomic_resources.implementations.genomic_scores_impl.CnvCollectionImplementation(resource: GenomicResource)[source]

Bases: GenomicScoreImplementation

Assists in the management of resource of type cnv_collection.

add_statistics_build_tasks(task_graph: TaskGraph, **kwargs: Any) list[Task][source]

Add tasks for calculating resource statistics to a task graph.

calc_info_hash() bytes[source]

Compute and return the info hash.

calc_statistics_hash() bytes[source]

Compute the statistics hash.

This hash is used to decide whether the resource statistics should be recomputed.

get_info(**kwargs: Any) str[source]

Construct the contents of the implementation’s HTML info page.

get_statistics_info(**kwargs: Any) str[source]

Construct the contents of the implementation’s HTML statistics info page.

class dae.genomic_resources.implementations.genomic_scores_impl.GenomicScoreImplementation(resource: GenomicResource)[source]

Bases: GenomicResourceImplementation, InfoImplementationMixin

Genomic scores base class.

add_statistics_build_tasks(task_graph: TaskGraph, **kwargs: Any) list[Task][source]

Add tasks for calculating resource statistics to a task graph.

calc_info_hash() bytes[source]

Compute and return the info hash.

calc_statistics_hash() bytes[source]

Compute the statistics hash.

This hash is used to decide whether the resource statistics should be recomputed.

property files: set[str]

Return a list of resource files the implementation utilises.

get_config_histograms() dict[str, Any][source]

Collect all configurations of histograms for the genomic score.

get_info(**kwargs: Any) str[source]

Construct the contents of the implementation’s HTML info page.

get_statistics_info(**kwargs: Any) str[source]

Construct the contents of the implementation’s HTML statistics info page.

get_template() Template[source]
property resource_id: str
dae.genomic_resources.implementations.genomic_scores_impl.build_score_implementation_from_resource(resource: GenomicResource) GenomicScoreImplementation | CnvCollectionImplementation[source]

Builds score implementation based on resource type

dae.genomic_resources.implementations.liftover_chain_impl module

Provides LiftOver chain resource.

class dae.genomic_resources.implementations.liftover_chain_impl.LiftoverChainImplementation(resource: GenomicResource)[source]

Bases: GenomicResourceImplementation, InfoImplementationMixin

Defines Lift Over chain resource implementation.

add_statistics_build_tasks(task_graph: TaskGraph, **kwargs: Any) list[Task][source]

Add tasks for calculating resource statistics to a task graph.

calc_info_hash() bytes[source]

Compute and return the info hash.

calc_statistics_hash() bytes[source]

Compute the statistics hash.

This hash is used to decide whether the resource statistics should be recomputed.

get_info(**kwargs: Any) str[source]

Construct the contents of the implementation’s HTML info page.

get_statistics_info(**kwargs: Any) str[source]

Construct the contents of the implementation’s HTML statistics info page.

get_template() Template[source]

dae.genomic_resources.implementations.reference_genome_impl module

class dae.genomic_resources.implementations.reference_genome_impl.ChromosomeStatistic(chromosome: str, length: int = 0, nucleotide_counts: dict[str, int] | None = None, nucleotide_pair_counts: dict[str, int] | None = None)[source]

Bases: Statistic

Class for individual chromosome statistics.

add_value(value: tuple[str | None, str]) None[source]

Add a value to the statistic.

static deserialize(content: str) ChromosomeStatistic[source]

Create a statistic from serialized data.

finish() None[source]

Perform final calculations for the statistic.

This step is optional.

This is called when resource iteration is complete.

Can also be used when creating more complex resources via deserialization.

merge(other: Statistic) None[source]

Merge the values from another statistic in place.

serialize() str[source]

Return a serialized version of this statistic.

class dae.genomic_resources.implementations.reference_genome_impl.GenomeStatistic(chromosomes: list[str], length: int = 0, nucleotide_distribution: dict[str, float] | None = None, bi_nucleotide_distribution: dict[str, float] | None = None, chromosome_statistics: dict[str, ChromosomeStatistic] | None = None)[source]

Bases: Statistic

Class for the global reference genome statistic.

add_value(value: Any) None[source]

Add a value to the statistic.

property chrom_count: int
static deserialize(content: str) GenomeStatistic[source]

Create a statistic from serialized data.

finish() None[source]

Perform final calculations for the statistic.

This step is optional.

This is called when resource iteration is complete.

Can also be used when creating more complex resources via deserialization.

merge(other: Statistic) None[source]

Merge the values from another statistic in place.

serialize() str[source]

Return a serialized version of this statistic.

class dae.genomic_resources.implementations.reference_genome_impl.GenomeStatisticsMixin[source]

Bases: object

Mixin for reference genome statistics access.

static get_chrom_file(chrom: str) str[source]
static get_global_statistic_file() str[source]
class dae.genomic_resources.implementations.reference_genome_impl.ReferenceGenomeImplementation(resource: GenomicResource)[source]

Bases: GenomicResourceImplementation, InfoImplementationMixin

Resource implementation for reference genome.

add_statistics_build_tasks(task_graph: TaskGraph, **kwargs: Any) list[Task][source]

Add tasks for calculating resource statistics to a task graph.

calc_info_hash() bytes[source]

Compute and return the info hash.

calc_statistics_hash() bytes[source]

Compute the statistics hash.

This hash is used to decide whether the resource statistics should be recomputed.

property files: set[str]

Return a list of resource files the implementation utilises.

get_info(**kwargs: Any) str[source]

Construct the contents of the implementation’s HTML info page.

get_statistics() ReferenceGenomeStatistics | None[source]

Try and load resource statistics.

get_statistics_info(**kwargs: Any) str[source]

Construct the contents of the implementation’s HTML statistics info page.

get_template() Template[source]
class dae.genomic_resources.implementations.reference_genome_impl.ReferenceGenomeStatistics(resource_id: str, global_statistic: GenomeStatistic, chrom_statistics: dict[str, ChromosomeStatistic])[source]

Bases: ResourceStatistics, GenomeStatisticsMixin

Class for accessing reference genome statistics.

static build_statistics(genomic_resource: GenomicResource) ReferenceGenomeStatistics | None[source]

Load reference genome statistics.

Module contents