Skip to content

Commit

Permalink
Merge branch 'master' into feature/iss-304-other-names
Browse files Browse the repository at this point in the history
  • Loading branch information
mluypaert committed Sep 7, 2020
2 parents bb3df6e + 2fc1495 commit da65b93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Change-log

## [current-beta]
- Fixed batch split API new-biotype argument processing (#319)

## [1.4.3]
- Improved & complemented docs
Expand Down
12 changes: 5 additions & 7 deletions ids/src/wormbase/ids/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,9 @@
xs)]
(some->> xs
(mapcat (fn [{:keys [from-id new-biotype product-sequence-name]}]
(let [from-gene (pull-from-gene from-id)
curr-bt (d/entid db (->> (find pull-attr-specs :gene/biotype)
(flatten)
(get-in from-gene)))
new-bt (or (d/entid db new-biotype) curr-bt)]
[[:db/add from-id :gene/splits product-sequence-name]
[:db/add from-id :gene/biotype curr-bt new-bt]])))
(let [new-split-tx [[:db/add from-id :gene/splits product-sequence-name]]]
(if-let [new-bt (d/entid db new-biotype)]
(conj new-split-tx
[:db/add from-id :gene/biotype new-bt])
new-split-tx))))
(cons ['wormbase.ids.core/new id-template :gene/id new-data]))))

0 comments on commit da65b93

Please sign in to comment.