Liking cljdoc? Tell your friends :D

clj-hgvs

Clojars Project Build Status codecov

Clojure(Script) library for handling HGVS.

Features

clj-hgvs provides:

  • Data structure of HGVS
  • Parser of HGVS text
  • Formatter to HGVS text

Installation

Clojure CLI/deps.edn:

clj-hgvs {:mvn/version "0.3.2"}

Leiningen/Boot:

[clj-hgvs "0.3.2"]

To use clj-hgvs with Clojure 1.8, you must include a dependency on clojure-future-spec.

Usage

Documentation

API Reference

Basics

(require '[clj-hgvs.core :as hgvs])

;; `parse` parses HGVS text, returning HGVS map.
(def hgvs1 (hgvs/parse "NM_005228.3:c.2573T>G"))

hgvs1
;;=> {:transcript "NM_005228.3"
;;    :kind :cdna
;;    :mutation #clj_hgvs.mutation.DNASubstitution
;;              {:coord #clj_hgvs.coordinate.CDNACoordinate {:position 2573
;;                                                           :offset 0
;;                                                           :region nil}
;;               :ref "T"
;;               :type ">"
;;               :alt "G"}}

;; `format` returns HGVS text.
(hgvs/format hgvs1)
;;=> "NM_005228.3:c.2573T>G"

License

Copyright 2017-2018 Xcoo, Inc.

Licensed under the Apache License, Version 2.0.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close