Skip to content

Commit

Permalink
Merge pull request #198 from WormBase/270-variation-production-method
Browse files Browse the repository at this point in the history
add production_method to engineered allele
  • Loading branch information
adamjohnwright authored Apr 17, 2019
2 parents 249ab1c + 2a0a8e4 commit c30e6cd
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/rest_api/classes/variation/widgets/overview.clj
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@
(pack-obj new-var))
:description (str "the variation " (:variation/id v) " was merged into, if it was")})

(defn production-method [variation]
{:data (if-let [method (-> (:variation/production-method variation)
(first))]
(case (name method)
"crispr-cas9" "CRISPR-Cas9"
"homologous-recombination" "Homologous recombination"
"mosdel" "MosDEL"
"mossci" "MosSci"
"nhej" "NHEJ"
"talens" "TALENs"
"zfnhr-repair" "ZFNHR repair"
"zfnnhej-repair" "ZFNNHEJ repair"
(obj/humanize-ident method)))
:description "the production method of the engineered allele"})

(def widget
{:name generic/name-field
:status generic/status
Expand All @@ -70,4 +85,5 @@
:variation_type variation-type
:remarks generic/remarks
:merged_into merged-into
:other_names generic/other-names})
:other_names generic/other-names
:production_method production-method})

0 comments on commit c30e6cd

Please sign in to comment.