Curation forms - WormBase/db-prototypes GitHub Wiki
These are built into the main web application, but only accessible when TRACE_ENABLE_CURATION_FORMS
is set.
Test instance https://curation.wormbase.org:8131/curate/gene/new
Patching
https://curation.wormbase.org:8131/curate/patch
It's possible to patch the database using either .ace files or EDN-formatted Datomic transaction data.
Patching with .ace format
Pretty much any ace file should work, including those containing -D and -R lines.
Ace files containing timestamps are supported, but the timestamps will be ignored when using this interface. If you need to patch-with-timestamps, will need to use a REPL and the pseudoace.ts-import
namespace (but NB it's not possible to insert facts "in the past" into a running Datomic database).
As an extension, it's possible to use __ALLOCATE__
(or any string beginning __ALLOCATE__
) instead of an object name. If the database knows how to generate IDs for that class of object (currently supported for Gene, Variation, and Feature), this will be replaced with a newly minted identifier.
A string consisting of __ALLOCATE__
followed by some additional characters is a temporary object tag. When used as an object name, it will be replaced with a newly-generated ID. However, it can also be used elsewhere in .ace file data, allowing creation of graphs of interlinked objects, e.g.:
Gene: __ALLOCATE__Gene1
Public_name "test-gene"
Allele __ALLOCATE__Var1 Remark "Something remarkable"
Variation: __ALLOCATE__Var1
Gene __ALLOCATE__Gene1 Silent "This is a silent change..."
(Note that the gene-variation link is interesting because it has different hashes on each end of the link. The above example correctly stores #Evidence on the gene end and #Molecular_change data on the variation end).
Patching with .edn format
In this mode, EDN formatted data is passed (almost) directly to the Datomic transactor. Any legal Datomic transaction data should work here.
There are two minor extensions to the "map" form of transaction-data:
- In simple cases, a
:db/id
field is not required (although still encouraged -- and necessary once you start interlinking newly created objects) - The keyword :allocate may be used in place of a string value for :gene/id, :variation/id, and :feature/id
There is no direct equivalent to using named temporary object tags in EDN. Instead, you can use Datomic temporary ID literals (e.g. #db/id[:wb.part/gene -10001]
) to specify object graphs without knowing the object names in advance. E.g.:
{:db/id #db/id[:wb.part/gene -10001]
:gene/id :allocate
:gene/public-name "test-gene"}
{:db/id #db/id[:wb.part/variation -20001]
:variation/id :allocate
:variation/gene {:variation.gene/gene #db/id[:wb.part/gene -10001]
:evidence/remark "Something remarkable"
:molecular-change/silent "Silent change"}}