Skip to content

Documentation for Annotation

cnv: CNVRegionAnnotation instance-attribute

count_gene_types()

Count the number of genes of each type in GenesDB

Returns:

Type Description
GenesDBGeneTypesCounter

A dictionary with the count of each gene type.

count_regulatory_types()

Count the number of regulatory element types in the database

Returns:

Type Description
RegulatoryTypesCounter

A dictionary with the count of each regulatory type.

Notes
The regulatory database entries are looped over and their "type" element is checked for presence in any of existing regulatory types.
Unknown regulatory types are counted as 'other'. To get a count of all regulatory types, sum the values.

get_annotated_genes()

Get list of names for genes that are morbid or associated with a disease

Returns:

Type Description
AnnotatedGenesList

Dictionary with two lists of gene names: 'morbid_genes' and 'associated_with_disease'

get_benign_cnvs_gs_outer(frequency_threshold)

Get Benign CNV GS outer entries with no defined frequency or higher than the threshold

Parameters:

Name Type Description Default
frequency_threshold float

Minimum frequency for a benign CNV GS outer entry to be considered

required

Returns:

Type Description
list[dict[str, Any]]

List of benign CNV GS outer entries

See Also

core.MIN_FREQUENCY_BENIGN Minimum frequency for a benign CNV GS outer entry to be considered

get_common_variability_regions()

Get GnomAD regions that intersect with the CNV and are in the specified populations

Returns:

Type Description
list[CommonVariabilityRegion]

List of common variability regions that intersect with the CNV

See Also

core.POPULATION_FOR_COMMON_VARIABILITY List of populations for common variability core.COMMON_VARIABILITY_FREQUENCY_THRESHOLD Minimum frequency for a common variability region to be considered

get_gene_by_name(gene_name)

Get 'Genes' entry with gene_name

get_gene_transcript_regions(gene_name)

Get transcript regions for a gene

Parameters:

Name Type Description Default
gene_name str

Name of the gene

required

Returns:

Type Description
list[TranscriptRegion]

List of transcript regions for the gene

get_genes(gene_type=None, overlap=enums.Overlap.ANY)

Get 'Genes' entries whose gene_type is 'gene_type' and overlaps the CNV region in that manner

get_haploinsufficient_gene_names(overlap_type, valid_scores)

Get names of genes with sufficient Haploinsufficiency Score

get_haploinsufficient_genes(overlap_type, valid_scores)

Get all HiGene entries with sufficient Haploinsufficiency Score

Parameters:

Name Type Description Default
overlap_type Overlap

Type of overlap to consider.

required
valid_scores list[int]

List of valid scores to consider. Entry scores are coerced to integers.

required

Returns:

Type Description
list[HiGeneEntry]

List of HiGene entries with sufficient Haploinsufficiency Score

get_haploinsufficient_regions(overlap_type, valid_scores)

Get all HiRegion entries with sufficient Haploinsufficiency Score

Parameters:

Name Type Description Default
overlap_type Overlap

Type of overlap to consider.

required
valid_scores list[int]

List of valid scores to consider. Entry scores are coerced to integers.

required

Returns:

Type Description
list[HiRegionEntry]

List of HiRegion entries with sufficient Haploinsufficiency Score

get_high_risk_loss_genes()

Get genes with high risk loss predictors

Raises:

Type Description
HighRiskForDuplicationError

If the CNV region is a duplication, not a loss

Returns:

Type Description
list[dict[str, Any]]

List of genes with high risk loss predictors

See Also

core.HIGH_RISK_PREDICTORS List of high risk predictors core.HIGH_RISK_PREDICTORS_COUNT_THRESHOLD Minimum number of high risk predictors for a gene to be considered high risk

get_triplosensitivity_gene_names(overlap_type, valid_scores)

Get names of genes with sufficient Triplosensitivity Score

get_triplosensitivity_genes(overlap_type, valid_scores)

Get all HiGene entries with sufficient Triplosensitivity Score

Parameters:

Name Type Description Default
overlap_type Overlap

Type of overlap to consider.

required
valid_scores list[int]

List of valid scores to consider. Entry scores are coerced to integers.

required

Returns:

Type Description
list[HiGeneEntry]

List of HiGene entries with sufficient Triplosensitivity Score

get_triplosensitivity_regions(overlap_type, valid_scores)

Get all HiRegion entries with sufficient Triplosensitivity Score

Parameters:

Name Type Description Default
overlap_type Overlap

Type of overlap to consider.

required
valid_scores list[int]

List of valid scores to consider. Entry scores are coerced to integers.

required

Returns:

Type Description
list[HiRegionEntry]

List of HiRegion entries with sufficient Triplosensitivity Score

load_from_json(json_file) classmethod

Load annotation from a JSON file

Parameters:

Name Type Description Default
json_file str

Path to the JSON file. Can be gzipped.

required

Returns:

Type Description
Annotation

Annotation object loaded from the JSON file.

Raises:

Type Description
FileNotFoundError

If the file does not exist.

handler: python options: show_root_heading: false show_source: true