HGVS mode handler¶
hgvs_dup_del_mode
¶
Module for hgvs_dup_del_mode in normalize endpoint.
Classes¶
HGVSDupDelMode
¶
Class for handling how to interpret HGVS duplications and deletions.
Initialize HGVS Dup Del Mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seqrepo_access
|
SeqRepoAccess
|
Access to seqrepo |
required |
Methods:¶
default_mode
¶
default_mode(alt_type: AltType, location: dict, vrs_seq_loc_ac: str, baseline_copies: int | None = None, copy_change: CopyChange | None = None, alt: str | None = None, extensions: list[Extension] | None = None) -> dict | None
Use default characteristics to return a variation. If baseline_copies not provided and endpoints are ambiguous - copy_number_change if copy_change not provided: copy_change - "loss" if del, "gain" if dup elif baseline_copies provided: copy_number_count copies are baseline + 1 for dup, baseline - 1 for del else allele
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alt_type
|
AltType
|
The type of alteration. Must be one of |
required |
location
|
dict
|
Sequence Location object |
required |
vrs_seq_loc_ac
|
str
|
Accession used in VRS Sequence Location |
required |
baseline_copies
|
int | None
|
Baseline copies for Copy Number Count variation |
None
|
copy_change
|
CopyChange | None
|
copy change for Copy Number Change Variation |
None
|
alt
|
str | None
|
Alteration |
None
|
extensions
|
list[Extension] | None
|
List of extensions for variation |
None
|
Returns:
| Type | Description |
|---|---|
dict | None
|
VRS Variation object represented as a dict |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
copy_number_count_mode
¶
copy_number_count_mode(alt_type: AltType, location: dict, baseline_copies: int, extensions: list[Extension] | None = None) -> dict
Return a VRS Copy Number Variation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alt_type
|
AltType
|
The type of alteration. Must be one of |
required |
location
|
dict
|
VRS SequenceLocation |
required |
baseline_copies
|
int
|
Baseline copies number |
required |
extensions
|
list[Extension] | None
|
List of extensions for variation |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
VRS Copy Number object represented as a dict |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
copy_number_change_mode
¶
copy_number_change_mode(alt_type: AltType, location: dict, copy_change: CopyChange | None = None, extensions: list[Extension] | None = None) -> dict
Return copy number change variation
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alt_type
|
AltType
|
The type of alteration. Must be one of |
required |
location
|
dict
|
VRS SequenceLocation |
required |
copy_change
|
CopyChange | None
|
The copy change |
None
|
extensions
|
list[Extension] | None
|
List of extensions for variation |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
Copy Number Change variation as a dict |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
allele_mode
¶
allele_mode(location: dict, alt_type: AltType, vrs_seq_loc_ac: str, alt: str, extensions: list[Extension] | None = None) -> dict | None
Return a VRS Allele with a normalized LiteralSequenceExpression or ReferenceLengthExpression.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location
|
dict
|
VRS Location |
required |
alt_type
|
AltType
|
Alteration type |
required |
vrs_seq_loc_ac
|
str
|
Accession used in VRS Sequence Location |
required |
alt
|
str
|
Alteration |
required |
extensions
|
list[Extension] | None
|
List of extensions for variation |
None
|
Returns:
| Type | Description |
|---|---|
dict | None
|
VRS Allele object represented as a dict |
interpret_variation
¶
interpret_variation(alt_type: AltType, location: dict, errors: list, hgvs_dup_del_mode: HGVSDupDelModeOption, vrs_seq_loc_ac: str, baseline_copies: int | None = None, copy_change: CopyChange | None = None, alt: str | None = None, extensions: list[Extension] | None = None) -> dict
Interpret variation using HGVSDupDelMode
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alt_type
|
AltType
|
Alteration type |
required |
location
|
dict
|
VRS Location object |
required |
errors
|
list
|
List of errors |
required |
hgvs_dup_del_mode
|
HGVSDupDelModeOption
|
Mode to use for interpreting HGVS duplications and deletions |
required |
vrs_seq_loc_ac
|
str
|
Accession used in VRS Sequence Location |
required |
baseline_copies
|
int | None
|
Baseline copies number |
None
|
copy_change
|
CopyChange | None
|
The copy change |
None
|
alt
|
str | None
|
The alteration |
None
|
extensions
|
list[Extension] | None
|
List of extensions for variation |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
VRS Variation object |