OpenBEL / belmgr

Website for managing BEL Evidences - based on Aurelia. Requires the OpenBEL Platform for the backend API/storage.
Apache License 2.0
2 stars 4 forks source link

Namespace/Annotation field and autocomplete workflow requirements #27

Closed wshayes closed 8 years ago

wshayes commented 8 years ago

Evidence json:

Annotation/Namespace search results:

Having to follow the _links.collection to get the collection name and prefix would necessitate many additional http queries for a single autocomplete request impacting the user experience

abargnesi commented 8 years ago

Regarding the evidence resource the annotations are present under the experiment_context property. This gist shows an experiment_context object with name/value. This response should also have conveyed the annotation's URI so I'll investigate why it does not.

Would the following experiment_context object be sufficient? This will allow you to present human-readable values and the identifier you can use on save.

{
    "experiment_context": [
        {
            "name": "Ncbi Taxonomy",
            "value": "Homo sapiens",
            "_links": {
                "self": {
                    "type": "annotation_value",
                    "href": "http://next.belframework.org/api/annotations/ncbi-taxonomy/values/9606"
                }
            }
        }
    ]
}

Adding the namespace and annotation resource to the respective value resource is a great idea, since they will frequently be used together. What about extending _annotationvalue and _namespacevalue resources to include annotation and namespace respectively? These will be included by default.

Example for Ncbi Taxonomy / Homo sapiens:

{
    "annotation_value": {
        "type": "SpeciesAnnotationConcept",
        "identifier": "9606",
        "name": "Homo sapiens",
        "annotation": {
            "name": "Ncbi Taxonomy",
            "prefix": "taxon",
            "domain": "species"
        },
        "_links": {
            "self": {
                "type": "annotation_value",
                "href": "http://next.belframework.org/api/annotations/ncbi-taxonomy/values/9606"
            },
            "collection": {
                "type": "annotation",
                "href": "http://next.belframework.org/api/annotations/ncbi-taxonomy"
            }
        }
    }
}

Regarding the _namespace_valuecollection links for a _namespacevalue resource I agree we should change these. Maybe something descriptive like _namespace_valueequivalents and _namespace_valueorthologs?

wshayes commented 8 years ago

Those example JSON responses look good and fit the need well. Using 'namespace_value_equivalents', etc to indicate the type of item works well.

What would be saved in the experiment_context of the BEL Evidence? Does the first JSON example get round-tripped back to the POST/PUT for that Evidence? maybe with a minimal form of

            "_links": {
                "self": {
                    "type": "annotation_value",
                    "href": "http://next.belframework.org/api/annotations/ncbi-taxonomy/values/9606"
                }
            }
abargnesi commented 8 years ago

The documentation for how _experimentcontext is mapped is lacking so I'll make a note.

The first example can be round-tripped using POST/PUT on that evidence link.

Each object in the _experimentcontext can have either name/value properties or a uri property. The evidence.schema.json describes the expected schema.

wshayes commented 8 years ago

Perfect - thanks!

abargnesi commented 8 years ago

On second thought the original evidence's Species annotation would not have a uri because Species does not map to the Ncbi Taxonomy.

However this evidence does have annotations with uri properties when they map correctly:

...
"experiment_context": [
    {
        "name": "Ncbi Taxonomy",
        "value": "Homo sapiens",
        "uri": "http://next.belframework.org/api/annotations/taxon/values/9606"
    },
    {
        "name": "CellularStructures",
        "value": "Cell Nucleus"
    },
    {
        "name": "Mesh Anatomy",
        "value": "Muscle, Smooth, Vascular",
        "uri": "http://next.belframework.org/api/annotations/mesha/values/D009131"
    }
],
...
wshayes commented 8 years ago

Very happy to shift to the NCBI Taxonomy and drop Species - this gains us the identifiers.org RDF mapping as well.

abargnesi commented 8 years ago

Deployed enhancement to next.belframework.org to address OpenBEL/openbel-server#38.

How do they look?

Affected routes with example:

wshayes commented 8 years ago

These look very good. What URI should I use for the Evidence.json? The self href? Thanks!

abargnesi commented 8 years ago

Yes. The self link with type annotation_value.

abargnesi commented 8 years ago

Would you mind if I moved this issue to the openbel-server project?

wshayes commented 8 years ago

Nope and it's ready to close as far as I'm concerned.

abargnesi commented 8 years ago

This issue was moved to OpenBEL/openbel-server#90

abargnesi commented 8 years ago

Wow, +1 for https://github-issue-mover.appspot.com/.