Validation and Normalization

hgvs.validator

implements validation of hgvs variants

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

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

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

Bases: object

Attempts to determine if the HGVS name is internally consistent

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

Bases: object

invoke intrinsic and extrinsic validation

validate(var, strict=None)

hgvs.normalizer

hgvs.normalizer

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

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)

Perform sequence variants normalization for single variant