Matthias König and Jan Grzegorzewski
[^] AnnotateDB
(pronounced annotated bee
) is a database with web frontend for mapping of annotations found in computational models in biology.
AnnotateDB
is accessible via https://annotatedb.com.
AnnotateDB
provides a high quality mapping of annotations on each other based on existing resources.
Features are
qualifiers
, i.e., more detailed relationships between annotationspostgres
databasedocker
and docker-compose
scripts for easy local setup and deploymentREST
based web interfaceelastisearch
based indexing and search (The elasticsearch
end points are still in development and will be part of v0.2.0
)AnnotateDB
is accessible under the following licenses
[^] AnnotateDB
is distributed as docker
containers, requiring a working docker
and docker-compose
installation.
To install AnnotateDB
locally use
# clone or pull the latest source code
git clone https://github.com/matthiaskoenig/annotatedb.git
cd annotatedb
# set environment variables
set -a && source .env.local
# create/rebuild all docker containers
./docker-purge.sh
# restore database
./adb_restore.sh
# elasticsearch indexing
./elasticsearch.sh
This creates the following services
adb_postgres
http://localhost:5434/ - postgres databaseadb_backend
http://localhost:5434/ - django backendadb_frontend
http://localhost:8090/ - vue.js frontendadb_elasticsearch
http://localhost:9124/ - elasticsearch instanceIn later releases the installation will be simplified, i.e., prebuild docker containers will be available from dockerhub (see #32).
[^] AnnotateDB
provides REST
endpoints for querying the database at https://annotatedb.com/api/v1.
Some examples
collections
use: https://annotatedb.com/api/v1/collections/?format=json
.mappings
use: https://annotatedb.com/api/v1/mappings/?format=json
.collection
use https://annotatedb.com/api/v1/collections/sbo/?format=json
. This will return the information on the collection
, in this example for sbo
{
"namespace":"sbo",
"miriam":true,
"name":"Systems Biology Ontology",
"idpattern":"^SBO:\\d{7}$",
"urlpattern":"https://identifiers.org/sbo/{$id}"
}
Currently only basic REST
endpoints are available. With the introduction of the elasticsearch
endpoints in v0.3.0
the REST based search will largely improve.
For now users should directly interact with the postgres database to interact
with the mappings (see information below).
[^] The postgres database is accessible via
HOST: localhost
PORT: 5434
DB: adb
USER: adb
PASSWORD: adb
The database contains the following main tables (see schema below):
adb_collection
: A data source or miriam collection for annotation or xref informationadb_annotation
: The combination of a term from a collection and the given collectionadb_mapping
: Mapping between annotations, from source annotation to target annotation. The kind of mapping is defined by the qualifier. E.g. the qualifier BQM_IS
encodes that the source annotation is
the target annotation.adb_evidence
: Evidence for the given mapping between annotations.In addition the materialized view mapping_view
is provided which allows easy filtering and search of
mapped annotations and annotation synonyms. For most use cases the mapping_view
is the table to work with.
For instance query the bigg.metabolite
for a given chebi
identifier via
SELECT source_term FROM mapping_view
WHERE (target_term = 'CHEBI:698' AND
target_namespace = 'chebi' AND
source_namespace = 'bigg.metabolite' AND
qualifier = 'IS');
which results in
('10fthf',)
A more comprehensive list of SQL queries and use cases is provided here with output here.
[^] AnnotateDB
uses the following data sources:
Information on collections is based mainly on identifiers.org.
Collections were parsed with sbmlutils
.
A major source of annotation mappings is the BiGG Database
with information used from the latest database release. AnnotateDB
currently includes BiGG-v1.5
.
[^] This section provides an overview of major changes and releases
django-rest-swagger
with drf-yasg
[^] We acknowledge
for their input and discussions.
© 2019-2020 Matthias König & Jan Grzegorzewski