OpenBEL / bel.rb

Process BEL (Biological Expression Language) with ruby.
Apache License 2.0
8 stars 6 forks source link

RDF Conversion for BEL Script Internal Annotations #106

Open juliakozlovsky opened 8 years ago

juliakozlovsky commented 8 years ago

Conversion to RDF for internal annotations (PATTERN and LIST annotations) was never implemented. As a result, those annotations can be in the source BEL file, but not in the converted RDF.

Question to discuss: how should those annotations be represented/modeled in RDF?

Example:

DEFINE ANNOTATION ExternalID AS LIST {"-12345","6789"} SET ExternalID = "-12345" SET Evidence = "Some Evidence String" SET Citation = {"PubMed","12-O-tetradecanoyl-phorbol-13-acetate-induced ACTH secretion in pituitary tumor cells.","6325215","","Heisler S","European journal of pharmacology 1984 Feb 17;98(2):177-83"}

abargnesi commented 8 years ago

For LIST we could model as a skos:ConceptScheme. This annotation resource could even be a blank node, document relative, or UUID URI since it is internal to the document.

In RDF turtle we might say:

@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

# Document relative URI for ExternalID concept scheme.
<#annotations-externalID>
        a               belv:AnnotationConceptScheme , skos:ConceptScheme ;
        belv:prefix     "ExternalID" ;
        skos:prefLabel  "External Identifiers" .

# Blank node representing the -12345 value as a concept.
_:externalID_1  a           belv:AnnotationConcept , skos:Concept , rdfs:Resource ;
        skos:inScheme       <#annotations-externalID> ;
        dcterms:identifier  "-12345" ;
        skos:prefLabel      "-12345" .

# Blank node representing the 6789 value as a concept.
_:externalID_2  a           belv:AnnotationConcept , skos:Concept , rdfs:Resource ;
        skos:inScheme       <#annotations-externalID> ;
        dcterms:identifier  "6789" ;
        skos:prefLabel      "6789" .

It starts to look the same as how we model external namespaces and annotation as SKOS Concept Schemes apart from the anonymous vs well-known resource URIs.


For PATTERN annotation it does not seem to fit in as a SKOS thesaurus. It feels like a type of belv Annotation but with a regular expression literal. For example identifiers.org created their own RDF property to convey a regular expression pattern:

@prefix dcat:    <http://www.w3.org/ns/dcat#> .
@prefix dcterms:  <http://purl.org/dc/terms/> .
@prefix idot:    <http://identifiers.org/terms#> .

<http://www.ebi.ac.uk/miriam/main/collections/MIR:00000022>
      a                                   dcat:CatalogRecord ;
      idot:idRegexPattern     "^GO:\\d{7}$"^^<http://www.w3.org/2001/XMLSchema#string> ;
      idot:namespace           "go"^^<http://www.w3.org/2001/XMLSchema#string> ;
      dcterms:alternative      "GO"^^<http://www.w3.org/2001/XMLSchema#string> ;
      dcat:title                       "Gene Ontology"^^<http://www.w3.org/2001/XMLSchema#string> .

The idRegexPattern name alone conveys the regular expression type since XML Schema doesn't offer a regular expression type.

Maybe there are other vocabularies that can represent regular expressions directly?

mhsano commented 8 years ago

We have BEL content where we do not have these custom annotations defined in a LIST It would be essential to link custom annotations to a statemente. e.g.

http://www.openbel.org/bel/A_increases_B http://www.openbel.org/vocabulary/hasAnnotation http://www.openbel.org/bel/annotation/ExternalID/-12345.

this would be similar to e.g. Species or Cell-Line annotations.