dae.genomic_resources.statistics package

Submodules

dae.genomic_resources.statistics.base_statistic module

class dae.genomic_resources.statistics.base_statistic.Statistic(statistic_id: str, description: str)[source]

Bases: object

Base class genomic resource statistics.

Statistics are generated using task graphs and aggregate values from a large amount of data. Each statistic should have a clearly defined single unit of data to process (for example, a nucleotide in a reference genome).

abstract add_value(value: Any) None[source]

Add a value to the statistic.

description: str
abstract static deserialize(content: str) Statistic[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.

abstract merge(other: Statistic) None[source]

Merge the values from another statistic in place.

abstract serialize() str[source]

Return a serialized version of this statistic.

statistic_id: str

dae.genomic_resources.statistics.min_max module

class dae.genomic_resources.statistics.min_max.MinMaxValue(score_id: str, min_value: float = nan, max_value: float = nan, count: int = 0)[source]

Bases: Statistic

Statistic that calculates Min and Max values in a genomic score.

add_count(count: int = 1) None[source]
add_value(value: float | None) None[source]

Add a value to the statistic.

static deserialize(content: str) MinMaxValue[source]

Create a statistic from serialized data.

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.statistics.min_max.MinMaxValueStatisticMixin[source]

Bases: object

static get_min_max_file(score_id: str) str[source]

Module contents