nix-env -i leiningen git screen
git clone git@github.com:knocean/knode.git
- Clone your desired project (for example,
git@github.com:IEDB/ONTIE.git
orgit@github.com:knocean/knode-example.git
) - Set up SSH keys using
ssh-keygen
(necessary forknode
to push edits to the ontology) - Create a named
screen
session withscreen -S knode
- Load your ontology into
knode
state (if you're setting up an ontology with aload.txt
file, you can just doKNODE_PROJECT_DIR=<your project directory> lein run load
. Otherwise, you'll need to pass in the project name and files in the proper order. For instancelein run load ONTIE ~/ONTIE/ontology/context.kn ~/ONTIE/ontology/external.tsv ~/ONTIE/ontology/predicates.tsv ~/ONTIE/ontology/index.tsv ~/ONTIE/ontology/templates.kn ~/ONTIE/ontology/ontie.kn
) KNODE_SSH_PASSPHRASE=<your key passphrase> KNODE_PROJECT_DIR=<your project dir> lein run serve
(the first time you run this, it will take a while because newJAR
s)
You may provide a set of configuration options via an EDN file. By default, this can be knode.edn
in the same directory that you run knode
in. In this file, you may specify a number of configurators:
:project-name
: name of the project:project-dir
: directory to house resources andknode.db
file:base-iri
: base IRI for ontology (defaulthttp://ontology.iedb.org/ontology/ONTIE_
):port
: port to run the server on (default3210
):database-url
: URL to database to store resources and states (defaultjdbc:sqlite:<absolute path>/knode.db
):git-repo
: path to git repository:ssh-identity
: SSH identity for git (default~/.ssh/id_rsa
):ssh-passphrase
: SSH passphrase for git:api-key
:write-file
:resources
: see below
To run KnODE from a configuration file (replace knode.edn
if necessary):
knode serve knode.edn
To view the configuration settings:
knode config knode.edn
To load resources from the configuration file (if you are using knode.edn
, you do not need to specify the path):
knode load-config
Or:
knode load-config <path to edn>
Resources should be provided as a vector of individual resources. Each resource needs, minimally:
:idspace
:type
You may also include:
:label
and/or:title
:description
:homepage
Valid types of resources are:
:local-file
: include a:path
or:paths
to local resources:obo-published-owl
: use the:idspace
to download an OBO published resource (must be the same as the OBO ID):direct-link
: include a:url
to point to the remote resource:obo-github-repo
: include a:repo
pointing to a.git
repository in the standard OBO directory layout
{:project-name "ONTIE",
:resources
[{:idspace "ONTIE",
:title "Ontology for Immune Epitopes",
:description
"ONTIE includes a range of terms to support the Immune Epitope Database.",
:homepage "https://ontology.iedb.org",
:type :local-file,
:paths
["ontology/context.kn"
"ontology/external.tsv"
"ontology/predicates.tsv"
"ontology/index.tsv"
"ontology/templates.kn"
"ontology/ontie.kn"]}
{:idspace "OBI",
:title "Ontology for Biomedical Investigations",
:homepage "http://obi-ontology.org",
:type :obo-published-owl}]}
Copyright © 2017 Knocean Inc.
Distributed under the BSD 3-Clause License.