Open IgorRodchenkov opened 5 years ago
@d2fong @jvwong @maxkfranz Does this JSON look good or do you (like me) think it would make sense to come up with a slightly more simple data model/schema that it's in the examples above; e.g., don't use arrays of arrays, "classes" field, etc.?
I strongly suggest not using the existing parsedMetadata structure.
IMO the key should not be parsedMetadata
it should just be metadata
.
Also the format for the parsedMetadata
is extremely frustrating to work with. It should be object key value pairs instead of nested arrays.
Regarding the biopax-sbgn-cytoscape conversion path (the second JSON "graph" example), it is in fact possible (and perfectly standard way) to inject own xml elements into e.g., glyph/extension element; e.g.:
<glyph class="macromolecule" id="http://pathwaycommons.org/pc2/Protein_refseq_XP_011530265_identity_1524631616617">
<extension>
<bp:Protein xmlns:bp="http://www.biopax.org/release/biopax-level3.owl#" uri="http://pathwaycommons.org/pc2/Protein_refseq_XP_011530265_identity_1524631616617"/>
</extension>
<label text="SMAD1"/>
<bbox w="48.0" h="25.0" x="0.0" y="0.0"/>
</glyph>
And PC v10 web service does currently inserts a biopax entity element with uri into SBGN-ML, which nobody's using at the moment (sbgnml-to-cytoscape js module ignores
Metadata could be also inserted there as JSON or text all at once using a single XML element and CDATA:
<extension>
<metadata>
<![CDATA[
{"class":"process","label":"","parent":"nucleoplasm","clonemarker":false,"stateVariables":[],"unitsOfInformation":[],"bbox":{"x":7.5,"y":7.5,"w":15,"h":15},"parsedMetadata":[["Type","bp:BiochemicalReaction"],["Data Source","http://pathwaycommons.org/pc2/reactome"],["Display Name","RUNX2 binds SMAD1 in the nucleus"],["Comment",["Edited: Orlic-Milacic, Marija, 2017-08-09","Reviewed: Ducy, Patricia, 2017-08-04","In response to BMP2 treatment, RUNX2 (presumably associated with CBFB) forms a complex with SMAD1 (Wang et al. 2006). Phosphorylation of SMAD1 in response to BMP signaling and formation of a heterotrimeric complex between phosphorylated SMAD1 and SMAD4 are prerequisites for SMAD1 retention in the nucleus (Qin et al. 2001, Xiao et al. 2001).<p>BMP2 signaling is implicated in promoting formation of a complex between RUNX2, SMAD1 and acetyltransferase EP300 (p300) and facilitating EP300-mediated acetylation of RUNX2, which activates RUNX2 transcriptional activity. This may involve ERK-mediated phosphorylation of RUNX2 and/or EP300 downstream of BMP2, but the exact mechanism has not been elucidated (Jun et al. 2010).","Authored: Orlic-Milacic, Marija, 2016-06-28"]],["Database IDs",[["pubmed","17215250"],["pubmed","11779505"],["pubmed","11509558"],["pubmed","20851880"],["reactome","R-HSA-8877941"]]]],"geneSynonyms":[]}
]]>
</metadata>
</extension>
PS:
try http://www.pathwaycommons.org/pc2/graph?source=SMAD1&pattern=IN_COMPLEX_WITH&kind=NEIGHBORHOOD&format=SBGN
Re: biopax-sbgn Pathways/Painter off the top of my head:
Entity pool glyphs
Process
Interaction or pathway object
We are to define and make /graph and /get web queries optionally generate rich JSON network/graph data (new OutputFormat), such as our web app uses internally:
and also make what is used here for the biopax-sbgn pathway views:
This should make Pathway Commons' Cytoscape.js based web app development easier.
Refs PathwayCommons/app-ui#916, PathwayCommons/app-ui#938, etc.