Normalization¶
normalize
¶
Module for Variation Normalization.
Classes¶
Normalize
¶
Normalize(seqrepo_access: SeqRepoAccess, tokenizer: Tokenize, classifier: Classify, validator: Validate, translator: Translate, uta: UtaDatabase)
Bases: ToVRS
The Normalize class used to normalize a given variation.
Initialize Normalize class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seqrepo_access
|
SeqRepoAccess
|
Access to SeqRepo |
required |
tokenizer
|
Tokenize
|
Tokenizer class for tokenizing |
required |
classifier
|
Classify
|
Classifier class for classifying tokens |
required |
validator
|
Validate
|
Validator class for validating valid inputs |
required |
translator
|
Translate
|
Translating valid inputs |
required |
uta
|
UtaDatabase
|
Access to db containing alignment data |
required |
Methods:¶
get_hgvs_dup_del_mode
staticmethod
¶
get_hgvs_dup_del_mode(tokens: list[Token], hgvs_dup_del_mode: HGVSDupDelModeOption | None = None, baseline_copies: int | None = None) -> tuple[HGVSDupDelModeOption | None, str | None]
Get option to use for hgvs dup del mode
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tokens
|
list[Token]
|
List of tokens found in an input query |
required |
hgvs_dup_del_mode
|
HGVSDupDelModeOption | None
|
The hgvs dup del mode option provided in the input
query. Mode to use for interpreting HGVS duplications and deletions.
gnomad vcf token will always set to |
None
|
baseline_copies
|
int | None
|
The baseline copies provided in the input query.
Required when |
None
|
Returns:
| Type | Description |
|---|---|
tuple[HGVSDupDelModeOption | None, str | None]
|
Tuple containing the hgvs dup del mode option and warnings |
normalize
async
¶
normalize(q: str, hgvs_dup_del_mode: HGVSDupDelModeOption | None = HGVSDupDelModeOption.DEFAULT, input_assembly: Literal[GRCH37, GRCH38] | None = None, baseline_copies: int | None = None, copy_change: CopyChange | None = None) -> NormalizeService
Normalize and translate a HGVS, gnomAD VCF or Free Text description on GRCh37 or GRCh38 assembly to a VRS variation. Performs fully-justfied allele normalization. Will liftover to GRCh38 (if necessary) and align to a priority transcript. Will make inferences about the query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
str
|
HGVS, gnomAD VCF or Free Text description on GRCh37 or GRCh38 assembly |
required |
hgvs_dup_del_mode
|
HGVSDupDelModeOption | None
|
This parameter determines how to interpret HGVS dup/del expressions in VRS. |
DEFAULT
|
input_assembly
|
Literal[GRCH37, GRCH38] | None
|
Assembly used for |
None
|
baseline_copies
|
int | None
|
Baseline copies for HGVS duplications and deletions |
None
|
copy_change
|
CopyChange | None
|
The copy change for HGVS duplications and deletions represented as Copy Number Change Variation. |
None
|
Returns:
| Type | Description |
|---|---|
NormalizeService
|
NormalizeService with variation and warnings |