dae.common_reports package

Submodules

dae.common_reports.common_report module

class dae.common_reports.common_report.CommonReport(data: dict[str, Any])[source]

Bases: object

Class representing a common report JSON.

static build_and_save(study: GenotypeData, force: bool = False) CommonReport | None[source]

Build a common report for a study, saves it and returns the report.

If the common reports are disabled for the study, the function skips building the report and returns None.

If the report already exists the default behavior is to skip building the report. You can force building the report by passing force=True to the function.

static build_report(genotype_data_study: GenotypeData) CommonReport[source]

Generate common report JSON from genotpye data study.

static load(report_filename: str) CommonReport | None[source]

Load a common report from a file.

If file does not exists returns None.

save(report_filename: str) None[source]

Save common report into a file.

to_dict(full: bool = False) dict[str, Any][source]

dae.common_reports.denovo_report module

class dae.common_reports.denovo_report.DenovoReport(json: dict[str, Any])[source]

Bases: object

Class representing a denovo report JSON.

static from_genotype_study(genotype_data: GenotypeData, person_set_collections: List[PersonSetCollection]) DenovoReport[source]

Create a denovo report JSON from a genotype data study.

is_empty() bool[source]
to_dict() dict[str, Any][source]
class dae.common_reports.denovo_report.DenovoReportTable(json: dict[str, Any])[source]

Bases: object

Class representing a denovo report table JSON.

static from_variants(denovo_variants: Iterable[FamilyVariant], effect_groups: list[str], effect_types: list[str], person_set_collection: PersonSetCollection) DenovoReportTable[source]

Construct a denovo report table from variants.

is_empty() bool[source]

Return whether the table does not have a single counted variant.

to_dict() dict[str, Any][source]
class dae.common_reports.denovo_report.EffectCell(person_set: PersonSet, effect: str)[source]

Bases: object

Class representing a cell in the denovo report table.

property column_name: str
count_variant(family_variant: FamilyVariant, family_allele: FamilyAllele) None[source]

Count given variant in the cell data.

is_empty() bool[source]
property number_of_children_with_event: int
property number_of_observed_events: int
property observed_rate_per_child: int | float
property percent_of_children_with_events: int | float
to_dict() Dict[str, int | float | str][source]
class dae.common_reports.denovo_report.EffectRow(effect: str, person_sets: List[PersonSet])[source]

Bases: object

Class representing a row in the denovo report table.

count_variant(fv: FamilyVariant) None[source]
get_empty() List[bool][source]
is_row_empty() bool[source]
remove_elements(indexes: list[int]) None[source]
to_dict() dict[str, Any][source]

dae.common_reports.family_counter module

class dae.common_reports.family_counter.FamiliesGroupCounters(json: dict[str, Any])[source]

Bases: object

Class representing families group counters JSON.

static from_families(families: FamiliesData, person_set_collection: PersonSetCollection, draw_all_families: bool) FamiliesGroupCounters[source]

Create families group counters from a dict of families.

to_dict(full: bool = False) dict[str, Any][source]
class dae.common_reports.family_counter.FamilyCounter(json: dict[str, Any])[source]

Bases: object

Class representing a family counter JSON.

property family: dict[str, Any]
static from_family(family: Family, pedigree: list, label: int | None = None) FamilyCounter[source]
to_dict(full: bool = False) dict[str, Any][source]

Transform counter to dict.

dae.common_reports.family_counter.get_family_pedigree(family: Family, person_set_collection: PersonSetCollection) list[source]
dae.common_reports.family_counter.get_family_type(family: Family, person_to_set: dict) tuple[source]

Transform a family into a tuple of strings describing members.

dae.common_reports.family_report module

Provides family report class.

class dae.common_reports.family_report.FamiliesReport(json: dict[str, Any])[source]

Bases: object

Class representing a family report JSON.

static from_families_data(families: FamiliesData, person_set_collections: Iterable[PersonSetCollection], draw_all_families: bool = True) FamiliesReport[source]

Create a family report from families data.

static from_genotype_study(genotype_data_study: GenotypeData, person_set_collections: Iterable[PersonSetCollection]) FamiliesReport[source]

Create a family report from a genotype study.

to_dict(full: bool = False) list[dict[str, Any]][source]

dae.common_reports.people_counter module

class dae.common_reports.people_counter.PeopleCounter(json: dict[str, Union[int, str]])[source]

Bases: object

Class representing a people counter JSON.

static from_person_set(person_set: PersonSet) PeopleCounter[source]

Build people counter JSON from person set.

is_empty() bool[source]
is_empty_field(field: str) bool[source]

Return whether a given field has not counted a single variant.

to_dict(rows: list) dict[str, Union[int, str]][source]
class dae.common_reports.people_counter.PeopleCounters(json: dict[str, Any])[source]

Bases: object

Class representing people counters JSON.

static from_person_set_collection(person_set_collection: PersonSetCollection) PeopleCounters[source]

Create people counters JSON from dict of families.

to_dict() dict[str, Any][source]
class dae.common_reports.people_counter.PeopleReport(json: list[dict[str, Any]])[source]

Bases: object

Class representing people report JSON.

static from_person_set_collections(person_set_collections: list[dae.person_sets.PersonSetCollection]) PeopleReport[source]

Create people report from list of person set collections.

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

Module contents