Validation and Normalization

hgvs.validator

implements validation of hgvs variants

class hgvs.validator.ExtrinsicValidator(hdp, strict=True)[source]

Bases: object

Attempts to determine if the HGVS name validates against external data sources

validate(var, strict=None)[source]
class hgvs.validator.IntrinsicValidator(strict=True)[source]

Bases: object

Attempts to determine if the HGVS name is internally consistent

validate(var, strict=None)[source]
class hgvs.validator.Validator(hdp, strict=True)[source]

Bases: object

invoke intrinsic and extrinsic validation

validate(var, strict=None)[source]

hgvs.normalizer

hgvs.normalizer

class hgvs.normalizer.Normalizer(hdp, cross_boundaries=False, shuffle_direction=3, alt_aln_method='splign', validate=True)[source]

Bases: object

Perform variant normalization

Initialize and configure the normalizer

Parameters:
  • hdp – HGVS Data Provider Interface-compliant instance (see hgvs.dataproviders.interface.Interface)
  • cross_boundaries – whether allow the shuffling to cross the exon-intron boundary
  • shuffle_direction – shuffling direction
  • alt_aln_method – sequence alignment method (e.g., splign, blat)
  • validate – whether validating the input variant before normalizing
normalize(var)[source]

Perform sequence variants normalization for single variant