Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for identifiers and colors to SBGN-ML #48

Open
cannin opened this issue Jun 25, 2019 · 0 comments
Open

Add support for identifiers and colors to SBGN-ML #48

cannin opened this issue Jun 25, 2019 · 0 comments

Comments

@cannin
Copy link

cannin commented Jun 25, 2019

Color and identifier support will allow third-party tools (like Newt, newteditor.org) to modify the figures for alternative uses and pairing with analyses.

Example file with color and identifiers

https://bitbucket.org/vtoure/sbgn-extension/src/master/SBGNextension/examples/glycolysis.sbgn

Colors

SBGNML color information is stored as SBML Render content:

http://otto.bioquant.uni-heidelberg.de/sbml/#specifications

<style idList="glyph2 glyph7 glyph13 ">
  <g stroke="Color_2" stroke-width="5" fill="yelloComp"  />			
</style>

Identifiers

SBGNML identifier information is stored as SBML annotations:

https://semanticsbml.org/semanticSBML/static/documentation/annotate.html

<extension>
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
    <rdf:Description rdf:about="#glyph10">
      <bqbiol:is>
        <rdf:Bag>
          <rdf:li rdf:resource="http://identifiers.org/chebi/CHEBI:16761"/>
          <rdf:li rdf:resource="http://identifiers.org/kegg.compound/C00008"/>
        </rdf:Bag>
      </bqbiol:is>
    </rdf:Description>
  </rdf:RDF>
</extension>

libSBGN Support

Support for identifiers is provided in the Java libSBGN library (functions by @fbergmann).

Element getAnnotation(SBGNBase sbgnElement, String namespaceURI)
String getAnnotationString(SBGNBase sbgnElement, String namespaceURI)
String wrapRdf(String content) (with all the overloads up to)
String wrapRdf(String content, boolean includeBiol, boolean includeModel, boolean includeDc,
                boolean includeVcard)
void addAnnotation(SBGNBase sbgnElement, Reader r)  and overloads

that way adding new entries becomes relatively easy:

addAnnotation(glyph, 
        wrapRdf("<bqbiol:is><rdf:Bag><rdf:li rdf:resource='http://identifiers.org/uniprot/Q96RR4'/></rdf:Bag></bqbiol:is>", true));

and retrieving them is simple enough:

String annotationString = getAnnotationString(map, "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant