{"id":27780,"library":"ga4gh-cat-vrs","title":"GA4GH Cat-VRS","description":"GA4GH Categorical Variation Representation (Cat-VRS) reference implementation. Current version 0.7.2 (stable), with 0.8.0-alpha1 available. The library provides Python models and utilities for representing categorical (e.g., clinical significance) variants aligned with VRS. Release cadence is irregular, with several milestone releases in 2025-2026.","status":"active","version":"0.7.2","language":"python","source_language":"en","source_url":"https://github.com/ga4gh/cat-vrs-python","tags":["ga4gh","vrs","categorical-variant","genomics","clinical"],"install":[{"cmd":"pip install ga4gh-cat-vrs","lang":"bash","label":"Stable"},{"cmd":"pip install ga4gh-cat-vrs==0.8.0a1","lang":"bash","label":"Pre-release"}],"dependencies":[{"reason":"Core dependency for VRS data types and Allele definitions","package":"ga4gh.vrs","optional":false},{"reason":"Data validation and settings management using Pydantic models","package":"pydantic","optional":false}],"imports":[{"note":"Package name uses underscores and 'ga4gh' prefix","wrong":"from cat_vrs.models import CategoricalVariant","symbol":"CategoricalVariant","correct":"from ga4gh.cat_vrs.models import CategoricalVariant"},{"note":"Some recipes classes do not inherit from CategoricalVariant in v0.5.0+","symbol":"ClinicalInterpretation","correct":"from ga4gh.cat_vrs.models import ClinicalInterpretation"}],"quickstart":{"code":"from ga4gh.cat_vrs.models import CategoricalVariant, ClinicalInterpretation\nfrom ga4gh.vrs.models import Allele\n\n# Create a categorical variant with a simple allele\nallele = Allele(\n    location=\"ga4gh:VSLoc:someLocation\",\n    state=\"ga4gh:VSEXP:someExpression\"\n)\ncv = CategoricalVariant(\n    allele=allele,\n    context=\"ga4gh:VS:someContext\",\n    type=\"CategoricalVariant\",\n    member=[ClinicalInterpretation(label=\"pathogenic\", id=\"clinvar:12345\")]\n)\nprint(cv.model_dump())","lang":"python","description":"Instantiate a CategoricalVariant with an Allele and a ClinicalInterpretation member."},"warnings":[{"fix":"Update to v0.6.0+ where the inheritance was restored, or adjust code to not use recipe classes as CategoricalVariant subclasses.","message":"In v0.5.0, recipe classes no longer inherit from CategoricalVariant. Code that relied on inheritance may break when upgrading from v0.4.x.","severity":"breaking","affected_versions":">=0.5.0,<0.6.0"},{"fix":"Ensure your code uses Pydantic V2 patterns. Use model_copy() instead of copy() and model_dump() instead of dict().","message":"v0.7.0 updated to Cat-VRS models 1.0.0 with breaking changes to model structure. Pydantic V2 is required.","severity":"breaking","affected_versions":">=0.7.0"},{"fix":"Pin to stable 0.7.x if you need production stability. Test your code against the alpha before upgrading.","message":"v0.8.0-alpha moves to Cat-VRS 1.1.0-snapshot and may change model fields. The pre-release uses ga4gh.vrs ~=2.4.0a1.","severity":"breaking","affected_versions":"0.8.0a0, 0.8.0a1"},{"fix":"Replace instance.copy() with instance.model_copy() and supply arguments as keyword args.","message":"The 'copy' method from Pydantic V1 is deprecated in favor of 'model_copy' in v0.6.0+.","severity":"deprecated","affected_versions":">=0.6.0"}],"env_vars":null,"search_vec":"'-2026':49 '0.7.2':16 '0.8.0':19 '2025':48 'align':36 'alpha1':20 'avail':21 'cadenc':40 'cat':3,10 'cat-vr':2,9 'categor':6,31,53 'categorical-vari':52 'clinic':33,56 'current':14 'e.g':32 'ga4gh':1,5,50 'genom':55 'implement':13 'irregular':42 'librari':23 'mileston':45 'model':26 'provid':24 'python':25 'refer':12 'releas':39,46 'repres':30 'represent':8 'sever':44 'signific':34 'stabl':17 'util':28 'variant':35,54 'variat':7 'version':15 'vrs':4,11,38,51","created_at":"2026-05-09T05:52:03.140289+00:00","updated_at":"2026-05-09T05:52:03.140289+00:00","problems":[{"fix":"Use: from ga4gh.cat_vrs.models import CategoricalVariant","cause":"Incorrect import path: the package is ga4gh.cat_vrs, not cat_vrs.","error":"ImportError: cannot import name 'CategoricalVariant' from 'cat_vrs'"},{"fix":"Explicitly set type='CategoricalVariant' when constructing CategoricalVariant.","cause":"The 'type' field must be exactly 'CategoricalVariant' (string). The default might be missing in older versions.","error":"pydantic_core._pydantic_core.ValidationError: 1 validation error for CategoricalVariant\ntype\n  unexpected value; permitted: 'CategoricalVariant'"},{"fix":"Replace .copy() with .model_copy() (Pydantic V2 pattern).","cause":"Pydantic V2 removed the copy() method. In ga4gh-cat-vrs >=0.6.0, use model_copy().","error":"AttributeError: 'CategoricalVariant' object has no attribute 'copy'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ga4gh/cat-vrs-python","docs":"https://github.com/ga4gh/cat-vrs-python","changelog":"https://github.com/ga4gh/cat-vrs-python/releases","pypi":"https://pypi.org/project/ga4gh-cat-vrs/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}