diff --git a/Dockerfile b/Dockerfile index b3be1ac9d..9fbf637ad 100755 --- a/Dockerfile +++ b/Dockerfile @@ -80,4 +80,5 @@ RUN cd $HOME/workspace/org.geppetto/utilities/source_setup && python update_serv EXPOSE 8080 +EXPOSE 8443 CMD [ "/bin/bash", "-c", "/startup.sh" ] diff --git a/components/VFBMain.js b/components/VFBMain.js index fe0bac0ad..608cf8523 100644 --- a/components/VFBMain.js +++ b/components/VFBMain.js @@ -840,6 +840,7 @@ export default class VFBMain extends React.Component { this.termInfoReference = ref} + queryBuilder={this.refs.querybuilderRef} showButtonBar={true} termInfoName={this.termInfoName} termInfoId={this.termInfoId} @@ -996,12 +997,6 @@ export default class VFBMain extends React.Component { }); } - // Query builder initialization - this.refs.querybuilderRef.setResultsColumnMeta(this.queryResultsColMeta); - this.refs.querybuilderRef.setResultsColumns(this.queryResultsColumns); - this.refs.querybuilderRef.setResultsControlsConfig(this.queryResultsControlConfig); - this.refs.querybuilderRef.addDataSource(this.queryBuilderDatasourceConfig); - // Loading ids passed through the browser's url if ((this.props.location.search.indexOf("id=") == -1) && (this.props.location.search.indexOf("i=") == -1)) { var that = this; @@ -1127,11 +1122,11 @@ export default class VFBMain extends React.Component { enableResizing={{ top: false, right: false, bottom: false, left: false, topRight: false, bottomRight: false, - bottomLeft: false, topLeft: false + bottomLeft: false, topLeft: false }} default={{ x: this.modalX, y: this.modalY, - height: 150, width: 150 + height: 150, width: 150 }} className="historyModal" disableDragging={true} @@ -1205,19 +1200,18 @@ export default class VFBMain extends React.Component { this.htmlToolbarRender = (this.state.htmlFromToolbar !== undefined) ? { - this.rnd2 = d; + this.rnd2 = d; }} >
@@ -1229,7 +1223,7 @@ export default class VFBMain extends React.Component { style={{ width: '100%', height: '100%', - float: 'center' + float: 'center' }} ref="htmlViewer" />
@@ -1237,19 +1231,19 @@ export default class VFBMain extends React.Component { return (
-
-
-
- +
{this.tutorialRender} diff --git a/components/interface/VFBTermInfo.js b/components/interface/VFBTermInfo.js index 06573ec60..d9449ba9e 100644 --- a/components/interface/VFBTermInfo.js +++ b/components/interface/VFBTermInfo.js @@ -570,6 +570,7 @@ export default class VFBTermInfoWidget extends React.Component { var otherId; var otherName; var target = widget; + var that = this; var meta = path + "." + path + "_meta"; if (n != undefined) { var metanode = Instances.getInstance(meta); @@ -599,12 +600,12 @@ export default class VFBTermInfoWidget extends React.Component { var entity = Model[path]; if (typeof (entity) != 'undefined' && entity instanceof Query) { // clear query builder unless ctrl pressed them add to compound. - GEPPETTO.QueryBuilder.open(); + this.props.queryBuilder.open(); if (!GEPPETTO.isKeyPressed("shift")) { - GEPPETTO.QueryBuilder.switchView(false, false); - GEPPETTO.QueryBuilder.clearAllQueryItems(); + this.props.queryBuilder.switchView(false, false); + this.props.queryBuilder.clearAllQueryItems(); } else { - GEPPETTO.QueryBuilder.switchView(false, false); + this.props.queryBuilder.switchView(false, false); } GEPPETTO.trigger('spin_logo'); @@ -612,25 +613,25 @@ export default class VFBTermInfoWidget extends React.Component { var callback = function () { // check if any results with count flag - if (GEPPETTO.QueryBuilder.props.model.count > 0) { + if (that.props.queryBuilder.props.model.count > 0) { // runQuery if any results - GEPPETTO.QueryBuilder.runQuery(); + that.props.queryBuilder.runQuery(); } else { - GEPPETTO.QueryBuilder.switchView(false); + that.props.queryBuilder.switchView(false); } // show query component - GEPPETTO.QueryBuilder.open(); + that.props.queryBuilder.open(); $("body").css("cursor", "default"); GEPPETTO.trigger('stop_spin_logo'); }; // add query item + selection if (window[otherId] == undefined) { window.fetchVariableThenRun(otherId, function () { - GEPPETTO.QueryBuilder.addQueryItem({ term: otherName, id: otherId, queryObj: entity }, callback) + that.props.queryBuilder.addQueryItem({ term: otherName, id: otherId, queryObj: entity }, callback) }); } else { setTimeout(function () { - GEPPETTO.QueryBuilder.addQueryItem({ term: otherName, id: otherId, queryObj: entity }, callback); + that.props.queryBuilder.addQueryItem({ term: otherName, id: otherId, queryObj: entity }, callback); }, 100); } } else { @@ -725,8 +726,6 @@ export default class VFBTermInfoWidget extends React.Component { } render () { - // var VFBTermInfoWidget = WidgetCapability.createWidget(VFBTermInfo); - return ( $SERVER_HOME/serviceability/logs/log.log + # re-deploy Geppetto cd $HOME/workspace/org.geppetto/utilities/source_setup && python update_server.py @@ -12,5 +16,8 @@ cd $HOME/workspace/org.geppetto/utilities/source_setup && python update_server.p sed 's/XX:MaxPermSize=512m/XX:MaxPermSize=$MAXSIZE/g' -i $SERVER_HOME/bin/dmk.sh sed 's/Xmx512m/Xmx$MAXSIZE/' -i $SERVER_HOME/bin/dmk.sh +# output log +tail -F --retry $SERVER_HOME/serviceability/logs/log.log & + # start virgo server $SERVER_HOME/bin/startup.sh diff --git a/model/vfb.xmi b/model/vfb.xmi index 076a3a79d..d7db54c76 100644 --- a/model/vfb.xmi +++ b/model/vfb.xmi @@ -360,7 +360,7 @@ name="Get term core info" description="Fetches term core details." query="MATCH (primary:Entity {short_form: '$ID'}) RETURN { core: { short_form: primary.short_form, label: primary.label, iri: primary.iri, types: labels(primary) }} as term" - countQuery="MATCH (primary {short_form: '$ID'} ) RETURN count(primary) as count"/> + countQuery="MATCH (primary:Entity {short_form: '$ID'} ) RETURN count(primary) as count"/> + query="MATCH (primary:Entity {short_form: '$ID' }) WHERE NOT primary:pub AND NOT primary:License AND NOT primary:Individual:Anatomy AND NOT primary:Class:Anatomy AND NOT primary:Template AND NOT primary:DataSet OPTIONAL MATCH (o:Class)<-[r:SUBCLASSOF|INSTANCEOF]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ short_form: o.short_form, label: o.label, iri: o.iri, types: labels(o) } ) END AS parents , primary OPTIONAL MATCH (o)<-[r { type: 'Related' }]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.uri, type: type(r) } , object: { short_form: o.short_form, label: o.label, iri: o.iri, types: labels(o) } }) END AS relationships , parents, primary OPTIONAL MATCH (s:Site)<-[dbx:hasDbXref]-(primary) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link: s.link_base + coalesce(dbx.accession, ''), link_text: s.label, site: { short_form: s.short_form, label: s.label, iri: s.iri, types: labels(s) } , icon: coalesce(s.link_icon_url, '') }) END AS xrefs, parents, relationships, primary OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'syn'}]->(p:pub:Individual) WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { core: { short_form: p.short_form, label: p.label, iri: p.iri, types: labels(p) } , PubMed: coalesce(p.PMID, ''), FlyBase: coalesce(p.FlyBase, ''), DOI: coalesce(p.DOI, '') } , synonym: { label: coalesce(rp.synonym, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.cat,'') } }) END AS pub_syn, parents, relationships, xrefs, primary OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'def'}]->(p:pub:Individual) WITH CASE WHEN p is null THEN [] ELSE collect({ core: { short_form: p.short_form, label: p.label, iri: p.iri, types: labels(p) } , PubMed: coalesce(p.PMID, ''), FlyBase: coalesce(p.FlyBase, ''), DOI: coalesce(p.DOI, '') } ) END AS def_pubs, parents, relationships, xrefs, pub_syn, primary RETURN { core: { short_form: primary.short_form, label: primary.label, iri: primary.iri, types: labels(primary) } , description: coalesce(primary.description, []), comment: coalesce(primary.`annotation-comment`, [])} as term ,parents,relationships,xrefs,pub_syn,def_pubs, 'Base' as query, 'manual' AS version" + countQuery="MATCH (primary:Entity {short_form: '$ID'} ) RETURN count(primary) as count"/> @@ -387,7 +387,7 @@ name="Get JSON for Individual:Anatomy" description="Fetches JSON for Individual:Anatomy." runForCount="false" - query="MATCH (primary:Individual:Anatomy) WHERE primary.short_form in ['$ID'] WITH primary OPTIONAL MATCH (primary)-[:has_source]->(ds:DataSet)-[:has_license]->(l:License) WITH COLLECT ({ dataset: { link : coalesce(ds.dataset_link, ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds) } }, license: { icon : coalesce(l.license_logo, ''), link : coalesce(l.license_url, ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l) } }}) AS dataset_license,primary OPTIONAL MATCH (o:Class)<-[r:SUBCLASSOF|INSTANCEOF]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o) } ) END AS parents ,primary,dataset_license OPTIONAL MATCH (o)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.uri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o) } }) END AS relationships ,primary,dataset_license,parents OPTIONAL MATCH (s:Site)<-[dbx:hasDbXref]-(primary) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: s.link_base, accession: coalesce(dbx.accession, ''), link_text: primary.label + ' on ' + s.label, site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s) } , icon: coalesce(s.link_icon_url, ''), link_postfix: coalesce(s.link_postfix, '')}) END AS xrefs,primary,dataset_license,parents,relationships OPTIONAL MATCH (primary)<-[:depicts]-(channel:Individual)-[irw:in_register_with]->(template:Individual)-[:depicts]->(template_anat:Individual) WITH template, channel, template_anat, irw, primary, dataset_license, parents, relationships, xrefs limit 5 OPTIONAL MATCH (channel)-[:is_specified_output_of]->(technique:Class) WITH CASE WHEN channel IS NULL THEN [] ELSE collect ({ channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel) } , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique) } ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template) } , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat) } ,image_folder: irw.folder, index: coalesce(irw.index, []) + [] }}) END AS channel_image,primary,dataset_license,parents,relationships,xrefs OPTIONAL MATCH (o:Individual)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.uri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o) } }) END AS related_individuals ,primary,dataset_license,parents,relationships,xrefs,channel_image RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary) } , description : coalesce(primary.description, []), comment : coalesce(primary.`annotation - comment`, []) } AS term, dataset_license, parents, relationships, xrefs, channel_image, related_individuals, 'Individual:Anatomy' as query" + query="MATCH (primary:Individual:Anatomy) WHERE primary.short_form in ['$ID'] WITH primary OPTIONAL MATCH (primary)-[:has_source]->(ds:DataSet)-[:has_license]->(l:License) WITH COLLECT ({ dataset: { link : coalesce(ds.dataset_link, ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds) } }, license: { icon : coalesce(l.license_logo, ''), link : coalesce(l.license_url, ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l) } }}) AS dataset_license,primary OPTIONAL MATCH (o:Class)<-[r:SUBCLASSOF|INSTANCEOF]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o) } ) END AS parents ,primary,dataset_license OPTIONAL MATCH (o)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.uri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o) } }) END AS relationships ,primary,dataset_license,parents OPTIONAL MATCH (s:Site { short_form: primary.self_xref }) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: s.link_base, accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s) } , icon: coalesce(s.link_icon_url, ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, dataset_license, parents, relationships OPTIONAL MATCH (s:Site)<-[dbx:hasDbXref]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: s.link_base, accession: coalesce(dbx.accession, ''), link_text: primary.label + ' on ' + s.label, site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s) } , icon: coalesce(s.link_icon_url, ''), link_postfix: coalesce(s.link_postfix, '')}) + self_xref END AS xrefs,primary,dataset_license,parents,relationships OPTIONAL MATCH (primary)<-[:depicts]-(channel:Individual)-[irw:in_register_with]->(template:Individual)-[:depicts]->(template_anat:Individual) WITH template, channel, template_anat, irw, primary, dataset_license, parents, relationships, xrefs OPTIONAL MATCH (channel)-[:is_specified_output_of]->(technique:Class) WITH CASE WHEN channel IS NULL THEN [] ELSE collect ({ channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel) } , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique) } ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template) } , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat) } ,image_folder: irw.folder, index: coalesce(irw.index, []) + [] }}) END AS channel_image,primary,dataset_license,parents,relationships,xrefs OPTIONAL MATCH (o:Individual)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.uri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o) } }) END AS related_individuals ,primary,dataset_license,parents,relationships,xrefs,channel_image RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary) } , description : coalesce(primary.description, []), comment : coalesce(primary.`annotation - comment`, []) } AS term, 'Get JSON for Individual:Anatomy' AS query, '6959794' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals" countQuery="MATCH (primary:Individual:Anatomy {short_form: '$ID'} ) RETURN count(primary) as count"> @@ -397,7 +397,7 @@ name="Get JSON for Template" description="Fetches JSON for Template." runForCount="false" - query="MATCH (primary:Template) WHERE primary.short_form in ['$ID'] WITH primary MATCH (channel:Individual)<-[irw:in_register_with]-(channel:Individual)-[:depicts]->(primary) WITH { index: coalesce(irw.index, []) + [], extent: irw.extent, center: irw.center, voxel: irw.voxel, orientation: irw.orientation, image_folder: irw.folder, channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel) } } as template_channel,primary OPTIONAL MATCH (technique:Class)<-[:is_specified_output_of]-(channel:Individual)-[irw:in_register_with]->(template:Individual)-[:depicts]->(primary) WHERE has(irw.index) WITH primary, template_channel, collect ({ channel: channel, irw: irw}) AS painted_domains UNWIND painted_domains AS pd MATCH (channel:Individual { short_form: pd.channel.short_form})-[:depicts]-(ai:Individual)-[:INSTANCEOF]->(c:Class) WITH collect({ anatomical_type: { short_form: c.short_form, label: coalesce(c.label,''), iri: c.iri, types: labels(c) } , anatomical_individual: { short_form: ai.short_form, label: coalesce(ai.label,''), iri: ai.iri, types: labels(ai) } , folder: pd.irw.folder, center: coalesce (pd.irw.center, []), index: [] + coalesce (pd.irw.index, []) }) AS template_domains,primary,template_channel OPTIONAL MATCH (primary)-[:has_source]->(ds:DataSet)-[:has_license]->(l:License) WITH COLLECT ({ dataset: { link : coalesce(ds.dataset_link, ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds) } }, license: { icon : coalesce(l.license_logo, ''), link : coalesce(l.license_url, ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l) } }}) AS dataset_license,primary,template_channel,template_domains OPTIONAL MATCH (o:Class)<-[r:SUBCLASSOF|INSTANCEOF]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o) } ) END AS parents ,primary,template_channel,template_domains,dataset_license OPTIONAL MATCH (o)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.uri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o) } }) END AS relationships ,primary,template_channel,template_domains,dataset_license,parents OPTIONAL MATCH (s:Site)<-[dbx:hasDbXref]-(primary) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: s.link_base, accession: coalesce(dbx.accession, ''), link_text: primary.label + ' on ' + s.label, site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s) } , icon: coalesce(s.link_icon_url, ''), link_postfix: coalesce(s.link_postfix, '')}) END AS xrefs,primary,template_channel,template_domains,dataset_license,parents,relationships OPTIONAL MATCH (o:Individual)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.uri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o) } }) END AS related_individuals ,primary,template_channel,template_domains,dataset_license,parents,relationships,xrefs RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary) } , description : coalesce(primary.description, []), comment : coalesce(primary.`annotation - comment`, []) } AS term, template_channel, template_domains, dataset_license, parents, relationships, xrefs, related_individuals" + query="MATCH (primary:Template:Individual) WHERE primary.short_form in ['$ID'] WITH primary MATCH (channel:Individual)<-[irw:in_register_with]-(channel:Individual)-[:depicts]->(primary) WITH { index: coalesce(irw.index, []) + [], extent: irw.extent, center: irw.center, voxel: irw.voxel, orientation: irw.orientation, image_folder: irw.folder, channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel) } } as template_channel,primary OPTIONAL MATCH (technique:Class)<-[:is_specified_output_of]-(channel:Individual)-[irw:in_register_with]->(template:Individual)-[:depicts]->(primary) WHERE has(irw.index) WITH primary, template_channel, collect ({ channel: channel, irw: irw}) AS painted_domains UNWIND painted_domains AS pd MATCH (channel:Individual { short_form: pd.channel.short_form})-[:depicts]-(ai:Individual)-[:INSTANCEOF]->(c:Class) WITH collect({ anatomical_type: { short_form: c.short_form, label: coalesce(c.label,''), iri: c.iri, types: labels(c) } , anatomical_individual: { short_form: ai.short_form, label: coalesce(ai.label,''), iri: ai.iri, types: labels(ai) } , folder: pd.irw.folder, center: coalesce (pd.irw.center, []), index: [] + coalesce (pd.irw.index, []) }) AS template_domains,primary,template_channel OPTIONAL MATCH (primary)-[:has_source]->(ds:DataSet)-[:has_license]->(l:License) WITH COLLECT ({ dataset: { link : coalesce(ds.dataset_link, ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds) } }, license: { icon : coalesce(l.license_logo, ''), link : coalesce(l.license_url, ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l) } }}) AS dataset_license,primary,template_channel,template_domains OPTIONAL MATCH (o:Class)<-[r:SUBCLASSOF|INSTANCEOF]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o) } ) END AS parents ,primary,template_channel,template_domains,dataset_license OPTIONAL MATCH (o)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.uri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o) } }) END AS relationships ,primary,template_channel,template_domains,dataset_license,parents OPTIONAL MATCH (s:Site { short_form: primary.self_xref }) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: s.link_base, accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s) } , icon: coalesce(s.link_icon_url, ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, template_channel, template_domains, dataset_license, parents, relationships OPTIONAL MATCH (s:Site)<-[dbx:hasDbXref]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: s.link_base, accession: coalesce(dbx.accession, ''), link_text: primary.label + ' on ' + s.label, site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s) } , icon: coalesce(s.link_icon_url, ''), link_postfix: coalesce(s.link_postfix, '')}) + self_xref END AS xrefs,primary,template_channel,template_domains,dataset_license,parents,relationships OPTIONAL MATCH (o:Individual)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.uri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o) } }) END AS related_individuals ,primary,template_channel,template_domains,dataset_license,parents,relationships,xrefs RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary) } , description : coalesce(primary.description, []), comment : coalesce(primary.`annotation - comment`, []) } AS term, 'Get JSON for Template' AS query, '6959794' AS version , template_channel, template_domains, dataset_license, parents, relationships, xrefs, related_individuals" countQuery="MATCH (primary:Template {short_form: '$ID'} ) RETURN count(primary) as count"> @@ -407,7 +407,7 @@ name="Get JSON for DataSet" description="Fetches JSON for DataSet." runForCount="false" - query="MATCH (primary:DataSet:Individual) WHERE primary.short_form in ['$ID'] WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with]->(template:Individual)-[:depicts]->(template_anat:Individual) WITH template, channel, template_anat, irw, primary , i limit 5 OPTIONAL MATCH (channel)-[:is_specified_output_of]->(technique:Class) WITH CASE WHEN channel IS NULL THEN [] ELSE COLLECT({ anatomy: { short_form: i.short_form, label: coalesce(i.label,''), iri: i.iri, types: labels(i) } , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel) } , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique) } ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template) } , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat) } ,image_folder: irw.folder, index: coalesce(irw.index, []) + [] }} }) END AS anatomy_channel_image ,primary OPTIONAL MATCH (s:Site:Individual)<-[dbx:hasDbXref]-(primary) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: s.link_base, accession: coalesce(dbx.accession, ''), link_text: primary.label + ' on ' + s.label, site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s) } , icon: coalesce(s.link_icon_url, ''), link_postfix: coalesce(s.link_postfix, '')}) END AS xrefs,primary,anatomy_channel_image OPTIONAL MATCH (primary)-[:has_license]->(l:License:Individual) WITH collect ({ icon : coalesce(l.license_logo, ''), link : coalesce(l.license_url, ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l) } }) as license,primary,anatomy_channel_image,xrefs OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub:Individual) WITH CASE WHEN p is null THEN [] ELSE collect({ core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p) } , PubMed: coalesce(p.PMID, ''), FlyBase: coalesce(p.FlyBase, ''), DOI: coalesce(p.DOI, '') } ) END AS def_pubs,primary,anatomy_channel_image,xrefs,license RETURN { link : coalesce(primary.dataset_link, ''), core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary) } , description : coalesce(primary.description, []), comment : coalesce(primary.`annotation - comment`, []) } AS term, anatomy_channel_image, xrefs, license, def_pubs, 'DataSet' as query" + query="MATCH (primary:DataSet:Individual) WHERE primary.short_form in ['$ID'] WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with]->(template:Individual)-[:depicts]->(template_anat:Individual) WITH template, channel, template_anat, irw, primary , i limit 5 OPTIONAL MATCH (channel)-[:is_specified_output_of]->(technique:Class) WITH CASE WHEN channel IS NULL THEN [] ELSE COLLECT({ anatomy: { short_form: i.short_form, label: coalesce(i.label,''), iri: i.iri, types: labels(i) } , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel) } , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique) } ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template) } , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat) } ,image_folder: irw.folder, index: coalesce(irw.index, []) + [] }} }) END AS anatomy_channel_image ,primary OPTIONAL MATCH (s:Site { short_form: primary.self_xref }) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: s.link_base, accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s) } , icon: coalesce(s.link_icon_url, ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, anatomy_channel_image OPTIONAL MATCH (s:Site)<-[dbx:hasDbXref]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: s.link_base, accession: coalesce(dbx.accession, ''), link_text: primary.label + ' on ' + s.label, site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s) } , icon: coalesce(s.link_icon_url, ''), link_postfix: coalesce(s.link_postfix, '')}) + self_xref END AS xrefs,primary,anatomy_channel_image OPTIONAL MATCH (primary)-[:has_license]->(l:License) WITH collect ({ icon : coalesce(l.license_logo, ''), link : coalesce(l.license_url, ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l) } }) as license,primary,anatomy_channel_image,xrefs OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) WITH CASE WHEN p is null THEN [] ELSE collect({ core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p) } , PubMed: coalesce(p.PMID, ''), FlyBase: coalesce(p.FlyBase, ''), DOI: coalesce(p.DOI, '') } ) END AS def_pubs,primary,anatomy_channel_image,xrefs,license RETURN { link : coalesce(primary.dataset_link, ''), core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary) } , description : coalesce(primary.description, []), comment : coalesce(primary.`annotation - comment`, []) } AS term, 'Get JSON for DataSet' AS query, '6959794' AS version , anatomy_channel_image, xrefs, license, def_pubs" countQuery="MATCH (primary:DataSet {short_form: '$ID'} ) RETURN count(primary) as count"> @@ -417,7 +417,7 @@ name="Get JSON for License" description="Fetches JSON for License." runForCount="false" - query="MATCH (primary:License:Individual {short_form: '$ID' }) OPTIONAL MATCH (o:DataSet)-[r:has_license]->(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.uri, type: 'applies_to' } , object: { short_form: o.short_form, label: o.label, iri: o.iri, types: labels(o) } }) END AS relationships , primary RETURN { core: { short_form: primary.short_form, label: primary.label, iri: primary.iri, types: labels(primary) } , description: coalesce(primary.description, []), comment: coalesce(primary.`annotation-comment`, [])} as term, relationships, 'License' as query" + query="MATCH (primary:License:Individual) WHERE primary.short_form in ['$ID'] WITH primary RETURN { icon : coalesce(primary.license_logo, ''), link : coalesce(primary.license_url, ''), core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary) } , description : coalesce(primary.description, []), comment : coalesce(primary.`annotation - comment`, []) } AS term, 'Get JSON for License' AS query, '6959794' AS version " countQuery="MATCH (primary:License {short_form: '$ID'} ) RETURN count(primary) as count"> @@ -427,7 +427,7 @@ name="Get JSON for pub" description="Fetches JSON for pub." runForCount="false" - query="MATCH (primary:pub:Individual {short_form: '$ID' }) OPTIONAL MATCH (o)-[r:has_reference]->(primary) WHERE o:DataSet OR o:Class WITH primary, r, o ORDER BY labels(o)[0] DESC, o.label ASC WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT (DISTINCT { relation: { label: r.label, iri: r.uri, type: type(r) }, object: { short_form: o.short_form, label: o.label, iri: o.iri, types: labels(o) } }) END AS relationships, primary RETURN { core: { short_form: primary.short_form, label: primary.label, iri: primary.iri, types: labels(primary) } , description: coalesce(primary.description, []), comment: coalesce(primary.`annotation-comment`, [])} as term, relationships, 'pub' as query" + query="MATCH (primary:pub:Individual {short_form: '$ID' }) OPTIONAL MATCH (o)-[r:has_reference]->(primary) WHERE o:DataSet OR o:Class WITH primary, r, o ORDER BY labels(o)[0] DESC, o.label ASC WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT (DISTINCT { relation: { label: r.label, iri: r.uri, type: type(r) }, object: { short_form: o.short_form, label: o.label, iri: o.iri, types: labels(o) } }) END AS relationships, primary RETURN { core: { short_form: primary.short_form, label: primary.label, iri: primary.iri, types: labels(primary) } , description: coalesce(primary.description, []), comment: coalesce(primary.`annotation-comment`, [])} as term, relationships, 'pub' as query, 'manual' AS version" countQuery="MATCH (primary:pub:Individual {short_form: '$ID'} ) RETURN count(primary) as count"> @@ -642,7 +642,7 @@ name="Expression overlapping selected anatomy" description="Transgenes expressed in the $NAME" returnType="//@libraries.3/@types.1" - queryChain="//@dataSources.2/@queries.11 //@dataSources.2/@queries.12 //@dataSources.0/@queries.9"> + queryChain="//@dataSources.2/@queries.11 //@dataSources.2/@queries.14 //@dataSources.0/@queries.8 //@dataSources.2/@queries.0 //@dataSources.2/@queries.12 //@dataSources.0/@queries.9">