Skip to content
Permalink
Browse files

Release 0.4.2

  • Loading branch information
totakke committed Dec 27, 2019
1 parent b3cca5b commit 2c5343977523d7c47e58e5e3c529e7f1e425d480
Showing with 140 additions and 73 deletions.
  1. +3 −2 CHANGELOG.md
  2. +33 −2 README.md
  3. +22 −22 docs/clj-hgvs.coordinate.html
  4. +27 −9 docs/clj-hgvs.core.html
  5. +35 −35 docs/clj-hgvs.mutation.html
  6. +17 −0 docs/clj-hgvs.repairer.html
  7. +2 −2 docs/index.html
  8. +1 −1 project.clj
@@ -1,6 +1,6 @@
# Changelog

## [Unreleased]
## [0.4.2] - 2019-12-27

### Added

@@ -92,7 +92,8 @@

## 0.1.0 - 2017-04-17

[Unreleased]: https://github.com/chrovis/clj-hgvs/compare/0.4.1...HEAD
[Unreleased]: https://github.com/chrovis/clj-hgvs/compare/0.4.2...HEAD
[0.4.2]: https://github.com/chrovis/clj-hgvs/compare/0.4.1...0.4.2
[0.4.1]: https://github.com/chrovis/clj-hgvs/compare/0.4.0...0.4.1
[0.4.0]: https://github.com/chrovis/clj-hgvs/compare/0.3.1...0.4.0
[0.3.1]: https://github.com/chrovis/clj-hgvs/compare/0.3.0...0.3.1
@@ -19,13 +19,13 @@ clj-hgvs provides:
Clojure CLI/deps.edn:

```clojure
clj-hgvs {:mvn/version "0.4.1"}
clj-hgvs {:mvn/version "0.4.2"}
```

Leiningen/Boot:

```clojure
[clj-hgvs "0.4.1"]
[clj-hgvs "0.4.2"]
```

To use clj-hgvs with Clojure 1.8, you must include a dependency on
@@ -96,6 +96,37 @@ HGVS data.
See [API reference](https://chrovis.github.io/clj-hgvs/clj-hgvs.core.html#var-format)
for all formatter options.

### HGVS Repair

`repair-hgvs-str` attempts to repair an invalid HGVS text.

```clojure
(hgvs/repair-hgvs-str "c.123_124GC>AA")
;;=> "c.123_124delGCinsAA"
```

The repair rules are based on frequent mistakes in popular public-domain
databases such as dbSNP and ClinVar.

You may supply custom repair rules to the second argument:

```clojure
(require '[clojure.string :as string]
'[clj-hgvs.repairer :as repairer])
(defn lower-case-ext
[s kind]
(if (= kind :protein)
(string/replace s #"EXT" "ext")
s))
(def my-repairers (conj repairer/built-in-repairers
lower-case-ext))
(hgvs/repair-hgvs-str "p.*833EXT*?" my-repairers)
;;=> "p.*833ext*?"
```

## License

Copyright 2017-2019 [Xcoo, Inc.](https://xcoo.jp/)

Large diffs are not rendered by default.

@@ -1,8 +1,8 @@
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>clj-hgvs.core documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="highlight/solarized-light.css" /><script type="text/javascript" src="highlight/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a> with <a href="https://github.com/xsc/codox-theme-rdash">RDash UI</a> theme</h2><h1><a href="index.html"><span class="project-title"><span class="project-name">clj-hgvs</span> <span class="project-version">0.4.1</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clj-hgvs</span></div></div></li><li class="depth-2 branch"><a href="clj-hgvs.coordinate.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>coordinate</span></div></a></li><li class="depth-2 branch current"><a href="clj-hgvs.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="clj-hgvs.mutation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mutation</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clj-hgvs.core.html#var-data-readers"><div class="inner"><span>data-readers</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-format"><div class="inner"><span>format</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-hgvs"><div class="inner"><span>hgvs</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-normalize"><div class="inner"><span>normalize</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-parse"><div class="inner"><span>parse</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-plain"><div class="inner"><span>plain</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-restore"><div class="inner"><span>restore</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-with-validation-disabled"><div class="inner"><span>with-validation-disabled</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clj-hgvs.core</h1><div class="doc"><pre class="plaintext">Main functions for handling HGVS. See <a href="http://varnomen.hgvs.org/">http://varnomen.hgvs.org/</a> for the
<html><head><meta charset="UTF-8" /><title>clj-hgvs.core documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="highlight/solarized-light.css" /><script type="text/javascript" src="highlight/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a> with <a href="https://github.com/xsc/codox-theme-rdash">RDash UI</a> theme</h2><h1><a href="index.html"><span class="project-title"><span class="project-name">clj-hgvs</span> <span class="project-version">0.4.2</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clj-hgvs</span></div></div></li><li class="depth-2 branch"><a href="clj-hgvs.coordinate.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>coordinate</span></div></a></li><li class="depth-2 branch current"><a href="clj-hgvs.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="clj-hgvs.mutation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mutation</span></div></a></li><li class="depth-2"><a href="clj-hgvs.repairer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>repairer</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="clj-hgvs.core.html#var-data-readers"><div class="inner"><span>data-readers</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-format"><div class="inner"><span>format</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-hgvs"><div class="inner"><span>hgvs</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-normalize"><div class="inner"><span>normalize</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-parse"><div class="inner"><span>parse</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-plain"><div class="inner"><span>plain</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-repair-hgvs-str"><div class="inner"><span>repair-hgvs-str</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-restore"><div class="inner"><span>restore</span></div></a></li><li class="depth-1"><a href="clj-hgvs.core.html#var-with-validation-disabled"><div class="inner"><span>with-validation-disabled</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">clj-hgvs.core</h1><div class="doc"><pre class="plaintext">Main functions for handling HGVS. See <a href="http://varnomen.hgvs.org/">http://varnomen.hgvs.org/</a> for the
detail HGVS nomenclature.</pre></div><div class="public anchor" id="var-data-readers"><h3>data-readers</h3><div class="usage"></div><div class="doc"><pre class="plaintext">Tagged literal support if loader does not find "data_readers.clj".
</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.1/src/clj_hgvs/core.cljc#L201">view source</a></div></div><div class="public anchor" id="var-format"><h3>format</h3><div class="usage"><code>(format hgvs)</code><code>(format hgvs opts)</code></div><div class="doc"><pre class="plaintext">Returns a HGVS string representing the given HGVS map.
</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.2/src/clj_hgvs/core.cljc#L241">view source</a></div></div><div class="public anchor" id="var-format"><h3>format</h3><div class="usage"><code>(format hgvs)</code><code>(format hgvs opts)</code></div><div class="doc"><pre class="plaintext">Returns a HGVS string representing the given HGVS map.

The second argument is an optional map to specify style:

@@ -21,7 +21,7 @@
default false.

:ter-format Ter codon style of protein frame shift and extension,
default :long. &lt;:long|:short&gt;}</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.1/src/clj_hgvs/core.cljc#L88">view source</a></div></div><div class="public anchor" id="var-hgvs"><h3>hgvs</h3><div class="usage"><code>(hgvs transcript kind mutation)</code></div><div class="doc"><pre class="plaintext">Creates HGVS data represented as a record.
default :long. &lt;:long|:short&gt;}</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.2/src/clj_hgvs/core.cljc#L89">view source</a></div></div><div class="public anchor" id="var-hgvs"><h3>hgvs</h3><div class="usage"><code>(hgvs transcript kind mutation)</code></div><div class="doc"><pre class="plaintext">Creates HGVS data represented as a record.

transcript is nilable for conventional reasons, but you should supply it if
possible.
@@ -30,15 +30,33 @@
:circular-dna, :rna, and :protein.

mutation must be a clj-hgvs.mutation record or string. The string mutation
will be parsed by clj-hgvs.mutation/parse.</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.1/src/clj_hgvs/core.cljc#L40">view source</a></div></div><div class="public anchor" id="var-normalize"><h3>normalize</h3><div class="usage"><code>(normalize s)</code></div><div class="doc"><pre class="plaintext">Reformats the HGVS string s, returning the normalized HGVS string.
will be parsed by clj-hgvs.mutation/parse.</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.2/src/clj_hgvs/core.cljc#L41">view source</a></div></div><div class="public anchor" id="var-normalize"><h3>normalize</h3><div class="usage"><code>(normalize s)</code></div><div class="doc"><pre class="plaintext">Reformats the HGVS string s, returning the normalized HGVS string.

The default style will be used for reformatting. See clj-hgvs.core/format
document for further details of the style options.</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.1/src/clj_hgvs/core.cljc#L173">view source</a></div></div><div class="public anchor" id="var-parse"><h3>parse</h3><div class="usage"><code>(parse s)</code></div><div class="doc"><pre class="plaintext">Parses a HGVS string s, returning a map representing the HGVS.
</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.1/src/clj_hgvs/core.cljc#L68">view source</a></div></div><div class="public anchor" id="var-plain"><h3>plain</h3><div class="usage"><code>(plain hgvs)</code></div><div class="doc"><pre class="plaintext">Returns a plain map representing the given HGVS. This function is useful for
document for further details of the style options.</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.2/src/clj_hgvs/core.cljc#L174">view source</a></div></div><div class="public anchor" id="var-parse"><h3>parse</h3><div class="usage"><code>(parse s)</code></div><div class="doc"><pre class="plaintext">Parses a HGVS string s, returning a map representing the HGVS.
</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.2/src/clj_hgvs/core.cljc#L69">view source</a></div></div><div class="public anchor" id="var-plain"><h3>plain</h3><div class="usage"><code>(plain hgvs)</code></div><div class="doc"><pre class="plaintext">Returns a plain map representing the given HGVS. This function is useful for
sending data through another codec. Use clj-hgvs.core/restore to retrieve
original HGVS data.</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.1/src/clj_hgvs/core.cljc#L134">view source</a></div></div><div class="public anchor" id="var-restore"><h3>restore</h3><div class="usage"><code>(restore m)</code></div><div class="doc"><pre class="plaintext">Restores a plain map to a suitable HGVS data structure. This function is
useful for sending data through another codec.</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.1/src/clj_hgvs/core.cljc#L160">view source</a></div></div><div class="public anchor" id="var-with-validation-disabled"><h3>with-validation-disabled</h3><h4 class="type">macro</h4><div class="usage"><code>(with-validation-disabled &amp; body)</code></div><div class="doc"><pre class="plaintext">Disables validation within a scope.
original HGVS data.</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.2/src/clj_hgvs/core.cljc#L135">view source</a></div></div><div class="public anchor" id="var-repair-hgvs-str"><h3>repair-hgvs-str</h3><div class="usage"><code>(repair-hgvs-str s)</code><code>(repair-hgvs-str s repairers)</code></div><div class="doc"><pre class="plaintext">Attempts to repair an invalid HGVS string, returning a correct HGVS string.

The repair rules are based on frequent mistakes in popular public-domain
databases such as dbSNP and ClinVar. See clj-hgvs.repairer/built-in-repairers
for details of the built-in repair rules.

You may supply custom repair rules to the second argument:

(defn lower-case-ext
[s kind]
(if (= kind :protein)
(clojure.string/replace s #"EXT" "ext")
s))

(def my-repairers (conj clj-hgvs.repairer/built-in-repairers
lower-case-ext))

(repair-hgvs-str "p.*833EXT*?" my-repairers)
=&gt; "p.*833ext*?"</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.2/src/clj_hgvs/core.cljc#L186">view source</a></div></div><div class="public anchor" id="var-restore"><h3>restore</h3><div class="usage"><code>(restore m)</code></div><div class="doc"><pre class="plaintext">Restores a plain map to a suitable HGVS data structure. This function is
useful for sending data through another codec.</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.2/src/clj_hgvs/core.cljc#L161">view source</a></div></div><div class="public anchor" id="var-with-validation-disabled"><h3>with-validation-disabled</h3><h4 class="type">macro</h4><div class="usage"><code>(with-validation-disabled &amp; body)</code></div><div class="doc"><pre class="plaintext">Disables validation within a scope.

HGVS data are checked upon interpretation phases by default, but in the scope,
all validations will be skipped. This macro may improve the performance on
handling HGVS which validity is already known.</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.1/src/clj_hgvs/core.cljc#L10">view source</a></div></div></div></body></html>
handling HGVS which validity is already known.</pre></div><div class="src-link"><a href="https://github.com/chrovis/clj-hgvs/blob/0.4.2/src/clj_hgvs/core.cljc#L11">view source</a></div></div></div></body></html>

0 comments on commit 2c53439

Please sign in to comment.
You can’t perform that action at this time.