{"id":19909672,"url":"https://github.com/chrovis/varity","last_synced_at":"2025-05-03T02:31:43.630Z","repository":{"id":39498900,"uuid":"88606030","full_name":"chrovis/varity","owner":"chrovis","description":"Variant translation library for Clojure","archived":false,"fork":false,"pushed_at":"2025-04-20T23:47:09.000Z","size":973,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-21T00:31:29.629Z","etag":null,"topics":["bioinformatics","clojure","hgvs","liftover","vcf"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrovis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-04-18T09:17:40.000Z","updated_at":"2025-04-17T11:42:02.000Z","dependencies_parsed_at":"2023-02-09T01:45:47.709Z","dependency_job_id":"a0ec2691-4e6c-413c-87ee-572ef95faca9","html_url":"https://github.com/chrovis/varity","commit_stats":{"total_commits":311,"total_committers":10,"mean_commits":31.1,"dds":0.3697749196141479,"last_synced_commit":"e51d56c8384e4050603f7036d8a03bf31878e4fe"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrovis%2Fvarity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrovis%2Fvarity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrovis%2Fvarity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrovis%2Fvarity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrovis","download_url":"https://codeload.github.com/chrovis/varity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252133738,"owners_count":21699589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioinformatics","clojure","hgvs","liftover","vcf"],"created_at":"2024-11-12T21:16:19.163Z","updated_at":"2025-05-03T02:31:43.104Z","avatar_url":"https://github.com/chrovis.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# varity\n\n[![Clojars Project](https://img.shields.io/clojars/v/varity.svg)](https://clojars.org/varity)\n[![build](https://github.com/chrovis/varity/actions/workflows/build.yml/badge.svg)](https://github.com/chrovis/varity/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/chrovis/varity/branch/master/graph/badge.svg)](https://codecov.io/gh/chrovis/varity)\n\nVariant translation library for Clojure.\n\n## Features\n\n* VCF variant ⇄ HGVS\n* Finding HGVS aliases\n* Conversion of a genomic coordinates between assemblies\n\n## Installation\n\nClojure CLI/deps.edn:\n\n```clojure\nvarity/varity {:mvn/version \"0.11.0\"}\n```\n\nLeiningen/Boot:\n\n```clojure\n[varity \"0.11.0\"]\n```\n\nTo use varity with Clojure 1.8, you must include a dependency on\n[clojure-future-spec](https://github.com/tonsky/clojure-future-spec).\n\n## Breaking changes in 0.11.0\n\nWe fixed the `varity.vcf-to-hgvs` implementation.\nIt is confusing to throw the exception in `vcf-variant-\u003eprotein-hgvs` when a variant overlaps the exon-intron boundaries, even if coding DNA HGVS is available. So we changed the behavior to return protein HGVS as `nil`.\n\n## Usage\n\n### Documentation\n\n[API Reference](https://chrovis.github.io/varity/)\n\n### Notice\n\nAll positions are represented as one-based number, and all ranges are\nrepresented as one-based closed intervals. For example,\n\n```clojure\n{:pos 3}\n```\n\nrepresents the third position from the start, and\n\n```clojure\n{:chr \"chr1\", :start 1, :end 3}\n```\n\nrepresents the first three bases of chromosome 1.\n\n### VCF variant to HGVS\n\n`varity.vcf-to-hgvs` provides functions to convert a VCF-style variant into HGVS.\nThe returned HGVS is data structure of [clj-hgvs](https://github.com/chrovis/clj-hgvs).\n\n```clojure\n(require '[varity.vcf-to-hgvs :as v2h])\n\n(v2h/vcf-variant-\u003ehgvs {:chr \"chr7\", :pos 55191822, :ref \"T\", :alt \"G\"}\n                       \"path/to/hg38.fa\" \"path/to/refGene.txt.gz\")\n;;=\u003e ({:coding-dna #clj-hgvs/hgvs \"NM_005228:c.2573T\u003eG\",\n;;     :protein #clj-hgvs/hgvs \"p.L858R\"})\n```\n\nUse `clj-hgvs.core/format` to obtain HGVS text.\n\n```clojure\n(require '[clj-hgvs.core :as hgvs])\n\n(def l858r (-\u003e (v2h/vcf-variant-\u003eprotein-hgvs {:chr \"chr7\", :pos 55191822, :ref \"T\", :alt \"G\"}\n                                              \"path/to/hg38.fa\" \"path/to/refGene.txt.gz\")\n               first))\n\n(hgvs/format l858r {:amino-acid-format :long})\n;;=\u003e \"p.Leu858Arg\"\n```\n\n### HGVS to VCF variants\n\n`varity.hgvs-to-vcf` provides functions to convert HGVS into VCF-style variants.\n\n```clojure\n(require '[varity.hgvs-to-vcf :as h2v]\n         '[clj-hgvs.core :as hgvs])\n\n(h2v/hgvs-\u003evcf-variants #clj-hgvs/hgvs \"NM_005228:c.2573T\u003eG\" \"path/to/hg38.fa\" \"path/to/refGene.txt.gz\")\n;;=\u003e ({:chr \"chr7\", :pos 55191822, :ref \"T\", :alt \"G\"})\n\n(h2v/hgvs-\u003evcf-variants #clj-hgvs/hgvs \"c.2573T\u003eG\" \"EGFR\" \"path/to/hg38.fa\" \"path/to/refGene.txt.gz\")\n;;=\u003e ({:chr \"chr7\", :pos 55191822, :ref \"T\", :alt \"G\"})\n\n(h2v/hgvs-\u003evcf-variants #clj-hgvs/hgvs \"p.A222V\" \"MTHFR\" \"path/to/hg38.fa\" \"path/to/refGene.txt.gz\")\n;;=\u003e ({:chr \"chr1\", :pos 11796320, :ref \"GG\", :alt \"CA\"}\n;;    {:chr \"chr1\", :pos 11796320, :ref \"GG\", :alt \"AA\"}\n;;    {:chr \"chr1\", :pos 11796320, :ref \"GG\", :alt \"TA\"}\n;;    {:chr \"chr1\", :pos 11796321, :ref \"G\", :alt \"A\"})\n```\n\n### Finding HGVS aliases\n\n`varity.hgvs/find-aliases` finds alternative HGVS expressions for the same\nvariant.\n\n```clojure\n(require '[varity.hgvs :as vhgvs])\n\n(vhgvs/find-aliases #clj-hgvs/hgvs \"NM_000059:c.162CAA[1]\"\n                    \"path/to/hg38.fa\" \"path/to/refGene.txt.gz\")\n;;=\u003e (#clj-hgvs/hgvs \"NM_000059:c.162CAA[1]\"\n;;    #clj-hgvs/hgvs \"NM_000059:c.165_167delCAA\")\n```\n\n### Conversion of a genomic coordinate between assemblies\n\nTo convert a genomic coordinate between assemblies,\n\n```clojure\n(require '[varity.lift :as lift])\n\n(lift/convert-coord {:chr \"chr1\", :pos 743267} \"path/to/hg19ToHg38.over.chain.gz\")\n;;=\u003e {:chr \"chr1\", :pos 807887}\n```\n\n## License\n\nCopyright 2017-2022 [Xcoo, Inc.](https://xcoo.jp/)\n\nLicensed under the [Apache License, Version 2.0](LICENSE).\n\n## Acknowledgements\n\nThe algorithm of `varity.fusion` was initially developed by Norio Tanaka at Cancer Precision Medicine Center, Japanese Foundation for Cancer Research. We thank him for his scientific insight and technical help.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrovis%2Fvarity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrovis%2Fvarity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrovis%2Fvarity/lists"}