Date: Wed, 7 Oct 2020 11:26:14 +0100
Subject: [PATCH 16/27] fixed 2 issues, 1st if the component was opened before
the model loaded the component was broken, second switch between components
and this was keeping this in constant loading mode
---
components/interface/VFBGraph/VFBGraph.js | 60 +++++++++++++++++------
1 file changed, 44 insertions(+), 16 deletions(-)
diff --git a/components/interface/VFBGraph/VFBGraph.js b/components/interface/VFBGraph/VFBGraph.js
index 7a295215a..5aed48f8b 100644
--- a/components/interface/VFBGraph/VFBGraph.js
+++ b/components/interface/VFBGraph/VFBGraph.js
@@ -122,8 +122,8 @@ class VFBGraph extends Component {
constructor (props) {
super(props);
- this.state = {
- graph : { nodes : [], links : [] },
+ this.state = {
+ graph : { nodes : [], links : [] },
currentQuery : this.props.instance != null ? this.props.instance.id : "",
dropDownAnchorEl : null,
optionsIconColor : stylingConfiguration.defaultRefreshIconColor,
@@ -157,6 +157,7 @@ class VFBGraph extends Component {
this.focusedInstance = { id : "" };
this.selectedDropDownQuery = -1;
this.loading = true;
+ this.firstLoad = true;
}
componentDidMount () {
@@ -164,14 +165,13 @@ class VFBGraph extends Component {
this.__isMounted = true;
if (this.state.currentQuery !== undefined && this.state.currentQuery !== "" && this.state.currentQuery !== null){
- if ( this.props.instance != null ) {
+ if ( this.props.instance !== null ) {
if (this.props.instance.getParent() !== null) {
this.focusedInstance = this.props.instance.getParent();
} else {
this.focusedInstance = this.props.instance;
}
}
-
this.updateGraph();
}
@@ -186,11 +186,34 @@ class VFBGraph extends Component {
if (event.isComposing || event.keyCode === 16) {
self.shiftOn = false;
}
- });
+ });
}
componentDidUpdate () {
let self = this;
+
+ if (this.loading && this.firstLoad) {
+ if (this.state.currentQuery === undefined || this.state.currentQuery === "" || this.state.currentQuery === null){
+ if (this.props.instance !== null && this.props.instance !== undefined) {
+ if (this.props.instance.getParent() !== null) {
+ this.focusedInstance = this.props.instance.getParent();
+ } else {
+ this.focusedInstance = this.props.instance;
+ }
+ this.firstLoad = false;
+ this.updateGraph();
+ } else if (this.props.instanceOnFocus !== null && this.props.instanceOnFocus !== undefined) {
+ if (this.props.instanceOnFocus.getParent() !== null) {
+ this.focusedInstance = this.props.instanceOnFocus.getParent();
+ } else {
+ this.focusedInstance = this.props.instanceOnFocus;
+ }
+ this.firstLoad = false;
+ this.updateGraph();
+ }
+ }
+ }
+
// Reset camera if graph component is visible, not focused or has been resized
if ( this.props.visible && ( !this.focused || this.graphResized ) ) {
/*
@@ -211,7 +234,7 @@ class VFBGraph extends Component {
}
});
// Reset camera view after graph component becomes visible
- setTimeout( function () {
+ setTimeout( function () {
self.resetCamera();
self.focused = true;
self.loading = false;
@@ -219,7 +242,6 @@ class VFBGraph extends Component {
}, (self.objectsLoaded * 20));
} else if ( !this.props.visible ) {
this.focused = false;
- this.loading = true;
this.selectedDropDownQuery = -1;
}
}
@@ -234,7 +256,7 @@ class VFBGraph extends Component {
this.focused = true;
}
}
-
+
resize (){
this.graphResized = true;
this.setState( { reload : !this.state.reload } );
@@ -424,18 +446,24 @@ class VFBGraph extends Component {
render () {
let self = this;
const { instanceOnFocus, graphQueryIndex } = this.props;
-
+
let syncColor = this.state.optionsIconColor;
-
+
+ if (Object.keys(instanceOnFocus).length === 0 && instanceOnFocus.constructor === Object) {
+ return (
+ Model not loaded, graph not available yet
+ );
+ }
+
if ( this.focusedInstance.id !== "" && !instanceOnFocus.id.includes(this.focusedInstance.id) ) {
this.instanceFocusChange(instanceOnFocus);
-
+
if ( this.state.graph.nodes.length === 0 && this.state.graph.links.length === 0 && this.focusedInstance.id !== this.state.currentQuery ){
let idToSearch = this.focusedInstance.id;
if (this.focusedInstance.getParent() !== null) {
idToSearch = this.focusedInstance.getParent().id;
}
-
+
syncColor = stylingConfiguration.defaultRefreshIconColor;
// Perform cypher query
this.loading = true;
@@ -445,7 +473,7 @@ class VFBGraph extends Component {
syncColor = stylingConfiguration.outOfSyncIconColor;
}
}
-
+
if ( !this.state.currentQuery.includes(this.focusedInstance.id) ) {
syncColor = stylingConfiguration.outOfSyncIconColor;
}
@@ -537,7 +565,7 @@ class VFBGraph extends Component {
linkWidth={1.25}
controls = {
- Reset View}>
+ Reset View}>
- Zoom In}>
+ Zoom In}>
- Zoom Out}>
+ Zoom Out}>
Date: Wed, 7 Oct 2020 15:12:42 -0700
Subject: [PATCH 17/27] Fix 'Term Info - graph links appended each time we move
the focus on that specific instance' and 'Layer - Instances not listed in the
layer component when added through the term info thumbnail'
---
.../controlsMenuConfiguration.js | 7 ++-
.../interface/VFBListViewer/VFBListViewer.js | 2 +-
.../interface/VFBTermInfo/VFBTermInfo.js | 47 ++++++++++++++-----
reducers/generals.js | 13 ++---
4 files changed, 45 insertions(+), 24 deletions(-)
diff --git a/components/configuration/VFBListViewer/controlsMenuConfiguration.js b/components/configuration/VFBListViewer/controlsMenuConfiguration.js
index 48a7f770b..9b1997469 100644
--- a/components/configuration/VFBListViewer/controlsMenuConfiguration.js
+++ b/components/configuration/VFBListViewer/controlsMenuConfiguration.js
@@ -91,6 +91,7 @@ const controlsMenuConf = {
{
toggle : {
condition : entity => entity.isSelected(),
+ isVisible : entity => entity.isVisible(),
options : {
false : {
label: "Select",
@@ -131,7 +132,8 @@ const controlsMenuConf = {
{
label: "Zoom To",
icon: "fa fa-search-plus",
- action: { handlerAction: ACTIONS.ZOOM_TO }
+ action: { handlerAction: ACTIONS.ZOOM_TO },
+ isVisible : entity => entity.isVisible()
},
{
label: "Show Volume",
@@ -201,7 +203,8 @@ const controlsMenuConf = {
{
label: "Color",
icon: "fa fa-tint",
- action: { handlerAction: ACTIONS.COLOR }
+ action: { handlerAction: ACTIONS.COLOR },
+ isVisible : entity => entity.isVisible()
},
]
}
diff --git a/components/interface/VFBListViewer/VFBListViewer.js b/components/interface/VFBListViewer/VFBListViewer.js
index dd2ded1cc..6f0ff6d4e 100644
--- a/components/interface/VFBListViewer/VFBListViewer.js
+++ b/components/interface/VFBListViewer/VFBListViewer.js
@@ -61,7 +61,7 @@ class VFBListViewer extends Component {
handler={this}
filter={() => true}
columnConfiguration={this.getColumnConfiguration()}
- showPagination={false}
+ infiniteScroll={true}
/>
}
diff --git a/components/interface/VFBTermInfo/VFBTermInfo.js b/components/interface/VFBTermInfo/VFBTermInfo.js
index 889e210a2..456302d63 100644
--- a/components/interface/VFBTermInfo/VFBTermInfo.js
+++ b/components/interface/VFBTermInfo/VFBTermInfo.js
@@ -126,14 +126,26 @@ class VFBTermInfo extends React.Component {
// Look for root node, create a Variable object with the graphs configuration, and attach it to root type object
if (type.getMetaType() == GEPPETTO.Resources.COMPOSITE_TYPE_NODE) {
- var graphType = new Type({ wrappedObj : { name : GRAPHS, eClass : GRAPHS } })
+ let variables = type.getVariables();
+ let present = false;
- // Variable object holding the information for the graph links
- var graphsVariable = new Variable({ wrappedObj : { name : "Graph for" }, values : graphs });
- graphsVariable.setTypes([graphType]);
+ // Check if link has been added already, if it has, don't add it again
+ for ( var i = 0; i < variables.length; i++ ){
+ if ( variables[i].types[0].wrappedObj.name === GRAPHS ){
+ present = true;
+ }
+ }
+
+ if ( !present ) {
+ var graphType = new Type({ wrappedObj : { name : GRAPHS, eClass : GRAPHS } })
- // Add graphs Variable to root node
- type.getVariables().push(graphsVariable);
+ // Variable object holding the information for the graph links
+ var graphsVariable = new Variable({ wrappedObj : { name : "Graph for" }, values : graphs });
+ graphsVariable.setTypes([graphType]);
+
+ // Add graphs Variable to root node
+ type.getVariables().push(graphsVariable);
+ }
}
}
@@ -153,14 +165,25 @@ class VFBTermInfo extends React.Component {
// Look for root node, create a Variable object with the graphs configuration, and attach it to root type object
if (type.getMetaType() == GEPPETTO.Resources.COMPOSITE_TYPE_NODE) {
- var circuitBrowserType = new Type({ wrappedObj : { name : CIRCUIT_BROWSER, eClass : CIRCUIT_BROWSER } })
+ let variables = type.getVariables();
+ let present = false;
+ // Check if link has been added already, if it has, don't add it again
+ for ( var i = 0; i < variables.length; i++ ){
+ if ( variables[i].types[0].wrappedObj.name === CIRCUIT_BROWSER ){
+ present = true;
+ }
+ }
+
+ if ( !present ) {
+ var circuitBrowserType = new Type({ wrappedObj : { name : CIRCUIT_BROWSER, eClass : CIRCUIT_BROWSER } })
- // Variable object holding the information for the graph links
- var circuitBrowserVariable = new Variable({ wrappedObj : { name : "Circuit Browser for" }, values : circuitBrowser });
- circuitBrowserVariable.setTypes([circuitBrowserType]);
+ // Variable object holding the information for the graph links
+ var circuitBrowserVariable = new Variable({ wrappedObj : { name : "Circuit Browser for" }, values : circuitBrowser });
+ circuitBrowserVariable.setTypes([circuitBrowserType]);
- // Add graphs Variable to root node
- type.getVariables().push(circuitBrowserVariable);
+ // Add graphs Variable to root node
+ type.getVariables().push(circuitBrowserVariable);
+ }
}
}
diff --git a/reducers/generals.js b/reducers/generals.js
index 50350b189..be6dd301e 100644
--- a/reducers/generals.js
+++ b/reducers/generals.js
@@ -140,13 +140,6 @@ function generalReducer (state, action) {
var idsLoaded = state.idsLoaded;
var newMap = { ...state.idsMap };
- if (newMap[action.data.id] === undefined ) {
- return {
- ...state,
- error: "instance " + action.data.id + "is not present anymore in the map"
- };
- }
-
if (newMap[action.data.id] !== undefined && newMap[action.data.id].components[action.data.component]) {
var newComponents = { ...newMap[action.data.id].components };
newMap[action.data.id].components = newComponents;
@@ -195,7 +188,8 @@ function generalReducer (state, action) {
stepsToLoad: 0,
stepsLoaded: 0,
idsMap: newMap,
- loading: loading
+ loading: loading,
+ idsList : !state.idsList.includes(action.data.id) ? [ ...state.idsList, action.data.id ] : [ ...state.idsList ]
};
}
case VFB_UI_UPDATED:
@@ -239,7 +233,8 @@ function generalReducer (state, action) {
}
return {
...state,
- idsMap: newMap
+ idsMap: newMap,
+ idsList : !state.idsList.includes(action.data) ? [ ...state.idsList, action.data ] : [ ...state.idsList ]
};
case INSTANCE_SELECTED:
return {
From 3d6d9a5710370e5ea08fd8028bbf8e44e3abb910 Mon Sep 17 00:00:00 2001
From: jrmartin
Date: Fri, 9 Oct 2020 15:20:42 -0700
Subject: [PATCH 18/27] Fixing sync bug
---
components/interface/VFBGraph/VFBGraph.js | 10 +++++++---
reducers/generals.js | 6 ++++--
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/components/interface/VFBGraph/VFBGraph.js b/components/interface/VFBGraph/VFBGraph.js
index 5aed48f8b..d115ca081 100644
--- a/components/interface/VFBGraph/VFBGraph.js
+++ b/components/interface/VFBGraph/VFBGraph.js
@@ -158,6 +158,7 @@ class VFBGraph extends Component {
this.selectedDropDownQuery = -1;
this.loading = true;
this.firstLoad = true;
+ this.nodeSelectedID = "";
}
componentDidMount () {
@@ -171,6 +172,7 @@ class VFBGraph extends Component {
} else {
this.focusedInstance = this.props.instance;
}
+ this.nodeSelectedID = this.focusedInstance.id;
}
this.updateGraph();
}
@@ -285,6 +287,7 @@ class VFBGraph extends Component {
*/
handleNodeLeftClick (node, event) {
this.queryNewInstance(node);
+ this.nodeSelectedID = node.title;
}
/**
@@ -345,6 +348,7 @@ class VFBGraph extends Component {
} else {
this.focusedInstance = instance;
}
+ this.nodeSelectedID = this.focusedInstance.id;
}
/**
@@ -469,12 +473,12 @@ class VFBGraph extends Component {
this.loading = true;
this.queryResults(cypherQuery(idToSearch), idToSearch)
}
- if ( this.focusedInstance.id !== this.state.currentQuery ) {
+ if ( this.focusedInstance.id !== this.state.currentQuery && this.nodeSelectedID !== this.state.currentQuery ) {
syncColor = stylingConfiguration.outOfSyncIconColor;
}
}
- if ( !this.state.currentQuery.includes(this.focusedInstance.id) ) {
+ if ( !this.state.currentQuery.includes(this.focusedInstance.id) && this.nodeSelectedID !== this.state.currentQuery ) {
syncColor = stylingConfiguration.outOfSyncIconColor;
}
return (
@@ -607,7 +611,7 @@ class VFBGraph extends Component {
onClick={self.zoomOut }>
- Refresh}>
+ Refresh for {this.focusedInstance.name} }>
Date: Mon, 12 Oct 2020 13:17:56 -0700
Subject: [PATCH 19/27] Save bug fix attempt
---
.../VFBCircuitBrowser/VFBCircuitBrowser.js | 2 +-
components/interface/VFBGraph/VFBGraph.js | 74 +++++++++++--------
2 files changed, 43 insertions(+), 33 deletions(-)
diff --git a/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js b/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js
index 56de50645..4a148490a 100644
--- a/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js
+++ b/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js
@@ -234,7 +234,7 @@ class VFBCircuitBrowser extends Component {
}
}
- resize(){
+ resize (){
this.graphResized = true;
this.setState( { reload : !this.state.reload } );
}
diff --git a/components/interface/VFBGraph/VFBGraph.js b/components/interface/VFBGraph/VFBGraph.js
index d115ca081..d9be957e0 100644
--- a/components/interface/VFBGraph/VFBGraph.js
+++ b/components/interface/VFBGraph/VFBGraph.js
@@ -142,6 +142,7 @@ class VFBGraph extends Component {
this.zoomOut = this.zoomOut.bind(this);
this.selectedNodeLoaded = this.selectedNodeLoaded.bind(this);
this.resize = this.resize.bind(this);
+ this.sync = this.sync.bind(this);
this.highlightNodes = new Set();
this.highlightLinks = new Set();
@@ -193,29 +194,7 @@ class VFBGraph extends Component {
componentDidUpdate () {
let self = this;
-
- if (this.loading && this.firstLoad) {
- if (this.state.currentQuery === undefined || this.state.currentQuery === "" || this.state.currentQuery === null){
- if (this.props.instance !== null && this.props.instance !== undefined) {
- if (this.props.instance.getParent() !== null) {
- this.focusedInstance = this.props.instance.getParent();
- } else {
- this.focusedInstance = this.props.instance;
- }
- this.firstLoad = false;
- this.updateGraph();
- } else if (this.props.instanceOnFocus !== null && this.props.instanceOnFocus !== undefined) {
- if (this.props.instanceOnFocus.getParent() !== null) {
- this.focusedInstance = this.props.instanceOnFocus.getParent();
- } else {
- this.focusedInstance = this.props.instanceOnFocus;
- }
- this.firstLoad = false;
- this.updateGraph();
- }
- }
- }
-
+
// Reset camera if graph component is visible, not focused or has been resized
if ( this.props.visible && ( !this.focused || this.graphResized ) ) {
/*
@@ -223,7 +202,7 @@ class VFBGraph extends Component {
* with specific configuration dropdown query.
*/
stylingConfiguration.dropDownQueries.map((item, index) => {
- if ( self.selectedDropDownQuery === -1 || self.selectedDropDownQuery !== parseInt(self.props.graphQueryIndex) ) {
+ if ( (self.selectedDropDownQuery < 0 ) && this.firstLoad ) {
if ( parseInt(self.props.graphQueryIndex) === index ) {
self.selectedDropDownQuery = index;
self.loading = true;
@@ -246,6 +225,28 @@ class VFBGraph extends Component {
this.focused = false;
this.selectedDropDownQuery = -1;
}
+
+ if (this.loading && this.firstLoad) {
+ if (this.state.currentQuery === undefined || this.state.currentQuery === "" || this.state.currentQuery === null){
+ if (this.props.instance !== null && this.props.instance !== undefined) {
+ if (this.props.instance.getParent() !== null) {
+ this.focusedInstance = this.props.instance.getParent();
+ } else {
+ this.focusedInstance = this.props.instance;
+ }
+ this.firstLoad = false;
+ this.updateGraph();
+ } else if (this.props.instanceOnFocus !== null && this.props.instanceOnFocus !== undefined) {
+ if (this.props.instanceOnFocus.getParent() !== null) {
+ this.focusedInstance = this.props.instanceOnFocus.getParent();
+ } else {
+ this.focusedInstance = this.props.instanceOnFocus;
+ }
+ this.firstLoad = false;
+ this.updateGraph();
+ }
+ }
+ }
}
componentWillUnmount () {
@@ -297,6 +298,11 @@ class VFBGraph extends Component {
this.graphRef.current.ggv.current.centerAt(node.x , node.y, 1000);
this.graphRef.current.ggv.current.zoom(2, 1000);
}
+
+ sync () {
+ this.instanceFocusChange(this.props.instanceOnFocus);
+ this.updateGraph();
+ }
/**
* Handle Menu drop down clicks
@@ -405,6 +411,7 @@ class VFBGraph extends Component {
switch (e.data.resultMessage) {
case "OK":
self.loading = false;
+ self.focusedInstance = e.data.params;
self.setState( { graph : e.data.params.results, currentQuery : e.data.params.id });
self.objectsLoaded = e.data.params.results.nodes.length;
setTimeout( function () {
@@ -449,19 +456,18 @@ class VFBGraph extends Component {
render () {
let self = this;
- const { instanceOnFocus, graphQueryIndex } = this.props;
+ const { graphQueryIndex } = this.props;
let syncColor = this.state.optionsIconColor;
- if (Object.keys(instanceOnFocus).length === 0 && instanceOnFocus.constructor === Object) {
+ if (Object.keys(this.props.instanceOnFocus).length === 0 && this.props.instanceOnFocus.constructor === Object) {
return (
Model not loaded, graph not available yet
);
}
- if ( this.focusedInstance.id !== "" && !instanceOnFocus.id.includes(this.focusedInstance.id) ) {
- this.instanceFocusChange(instanceOnFocus);
-
+ if ( this.focusedInstance.id !== "" && !this.props.instanceOnFocus.id.includes(this.focusedInstance.id) ) {
+ // If the length of the graph is 0, request a new query using the instanceOnFocus
if ( this.state.graph.nodes.length === 0 && this.state.graph.links.length === 0 && this.focusedInstance.id !== this.state.currentQuery ){
let idToSearch = this.focusedInstance.id;
if (this.focusedInstance.getParent() !== null) {
@@ -473,14 +479,18 @@ class VFBGraph extends Component {
this.loading = true;
this.queryResults(cypherQuery(idToSearch), idToSearch)
}
- if ( this.focusedInstance.id !== this.state.currentQuery && this.nodeSelectedID !== this.state.currentQuery ) {
+
+ // Out of sync if instanceOnFocus is not what's on display
+ if ( this.focusedInstance.id !== this.state.currentQuery ) {
syncColor = stylingConfiguration.outOfSyncIconColor;
}
}
- if ( !this.state.currentQuery.includes(this.focusedInstance.id) && this.nodeSelectedID !== this.state.currentQuery ) {
+ // Out of sync if instanceOnFocus is not what's on display
+ if ( !this.props.instanceOnFocus.id.includes(this.focusedInstance.id) ) {
syncColor = stylingConfiguration.outOfSyncIconColor;
}
+
return (
this.loading
?
+ onClick={self.sync}>
Options}>
From 163ebe0387e1e3f90945a293dc8b776b52544d6c Mon Sep 17 00:00:00 2001
From: jrmartin
Date: Tue, 13 Oct 2020 10:05:05 -0700
Subject: [PATCH 20/27] Save work in progress
---
.../interface/VFBCircuitBrowser/Controls.js | 37 +++++++------------
.../VFBCircuitBrowser/VFBCircuitBrowser.js | 8 +---
reducers/generals.js | 4 +-
3 files changed, 16 insertions(+), 33 deletions(-)
diff --git a/components/interface/VFBCircuitBrowser/Controls.js b/components/interface/VFBCircuitBrowser/Controls.js
index f3dea2a64..40ae0e305 100644
--- a/components/interface/VFBCircuitBrowser/Controls.js
+++ b/components/interface/VFBCircuitBrowser/Controls.js
@@ -230,32 +230,20 @@ class Controls extends Component {
*/
getUpdatedNeuronFields () {
let neuronFields = this.state.neuronFields;
- let neuronMatch = false;
- // Query preselected
- let queriesPassed = Object.keys(this.circuitQuerySelected).length > 0;
- if ( queriesPassed) {
- // If query is preselected and is not on the list already
- if ( !this.state.neuronFields.includes(this.circuitQuerySelected) ) {
- for ( var i = 0 ; i < neuronFields.length ; i++ ) {
- if ( this.state.neuronFields[i] === "" ) {
- neuronFields[i] = this.circuitQuerySelected;
- neuronMatch = true;
- break;
- }
- }
- } else if ( queriesPassed && neuronFields.includes(this.circuitQuerySelected) ) {
- neuronMatch = true;
- }
- }
-
- // If preselected query is not on list of existing queries
- if ( !neuronMatch ) {
- if ( queriesPassed ) {
- if ( neuronFields.length < configuration.maxNeurons ) {
- neuronFields.push(this.circuitQuerySelected);
+ for ( var i = 0; i < this.circuitQuerySelected.length; i++ ){
+ if ( !this.state.neuronFields.includes(this.circuitQuerySelected[i])) {
+ for ( var j = 0 ; j < neuronFields.length ; j++ ) {
+ if ( this.state.neuronFields[j] === "" ) {
+ neuronFields[j] = this.circuitQuerySelected[i];
+ break;
+ }
+ }
+ } else if ( neuronFields.includes(this.circuitQuerySelected[i]) ) {
+ if ( neuronFields.length < configuration.maxNeurons ) {
+ neuronFields.push(this.circuitQuerySelected);
+ }
}
- }
}
return neuronFields;
@@ -264,6 +252,7 @@ class Controls extends Component {
render () {
let self = this;
const { classes } = this.props;
+
let neuronFields = this.getUpdatedNeuronFields()
let expanded = this.state.expanded;
diff --git a/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js b/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js
index 4a148490a..13169a7f2 100644
--- a/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js
+++ b/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js
@@ -356,13 +356,7 @@ class VFBCircuitBrowser extends Component {
const { classes } = this.props;
// Detect when the first load of the Graph component happens
- if ( !this.state.loading && this.firstLoad ) {
- // Reset CircuitQuerySelected value after first load
- this.circuitQuerySelected = "";
- }
- if ( !this.state.loading && !this.firstLoad ) {
- this.firstLoad = true;
- }
+ this.circuitQuerySelected = this.props.circuitQuerySelected;
return (
this.state.loading
diff --git a/reducers/generals.js b/reducers/generals.js
index af5e1b2a1..67b62496d 100644
--- a/reducers/generals.js
+++ b/reducers/generals.js
@@ -33,7 +33,7 @@ export const GENERAL_DEFAULT_STATE = {
termInfoVisible : false,
listViewerInfoVisible : true,
circuitBrowserSelected : false,
- circuitQuerySelected : {},
+ circuitQuerySelected : [],
layout: {
"ThreeDViewer": true,
"StackViewer": true,
@@ -213,7 +213,7 @@ function generalReducer (state, action) {
case LOAD_CIRCUIT_BROWSER:
return {
...state,
- circuitQuerySelected : action.data.instance,
+ circuitQuerySelected : !state.circuitQuerySelected.includes(action.data.instance) ? [...state.circuitQuerySelected, action.data.instance] : [...state.circuitQuerySelected] ,
circuitBrowserSelected : true
};
case INSTANCE_ADDED:
From f376cd04d7afd5e37546278d11db4ad110e43c56 Mon Sep 17 00:00:00 2001
From: jrmartin
Date: Wed, 14 Oct 2020 00:21:08 -0700
Subject: [PATCH 21/27] Cleaning
---
components/interface/VFBCircuitBrowser/Controls.js | 8 ++++----
components/interface/VFBGraph/VFBGraph.js | 13 +++++--------
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/components/interface/VFBCircuitBrowser/Controls.js b/components/interface/VFBCircuitBrowser/Controls.js
index 714cb8e19..e492aeca5 100644
--- a/components/interface/VFBCircuitBrowser/Controls.js
+++ b/components/interface/VFBCircuitBrowser/Controls.js
@@ -257,10 +257,10 @@ class Controls extends Component {
}
if ( this.circuitQuerySelected.length > neuronFields.length && !this.state.neuronFields.includes(this.circuitQuerySelected[i])) {
- if ( neuronFields.length < configuration.maxNeurons && this.circuitQuerySelected !== "" ) {
- neuronFields.push(this.circuitQuerySelected[i]);
- }
- }
+ if ( neuronFields.length < configuration.maxNeurons && this.circuitQuerySelected !== "" ) {
+ neuronFields.push(this.circuitQuerySelected[i]);
+ }
+ }
}
}
diff --git a/components/interface/VFBGraph/VFBGraph.js b/components/interface/VFBGraph/VFBGraph.js
index e331dde2a..e272726b8 100644
--- a/components/interface/VFBGraph/VFBGraph.js
+++ b/components/interface/VFBGraph/VFBGraph.js
@@ -128,7 +128,6 @@ class VFBGraph extends Component {
currentQuery : this.props.instance != null ? this.props.instance.id : "",
dropDownAnchorEl : null,
optionsIconColor : stylingConfiguration.defaultRefreshIconColor,
- nodeSelected : { title : "", id : "" },
reload : false
}
this.updateGraph = this.updateGraph.bind(this);
@@ -174,7 +173,6 @@ class VFBGraph extends Component {
} else {
this.focusedInstance = this.props.instance;
}
- this.nodeSelectedID = this.focusedInstance.id;
}
this.updateGraph();
}
@@ -293,8 +291,8 @@ class VFBGraph extends Component {
* Handle Left click on Nodes
*/
handleNodeLeftClick (node, event) {
- this.queryNewInstance(node);
this.nodeSelectedID = node.title;
+ this.queryNewInstance(node);
}
/**
@@ -329,7 +327,7 @@ class VFBGraph extends Component {
queryNewInstance (node) {
window.addVfbId(node.title);
this.loading = true;
- this.setState({ nodeSelected : node, optionsIconColor : stylingConfiguration.defaultRefreshIconColor });
+ this.setState({ optionsIconColor : stylingConfiguration.defaultRefreshIconColor });
// Perform cypher query
this.queryResults(cypherQuery(node.title), node.title)
}
@@ -340,8 +338,8 @@ class VFBGraph extends Component {
loadedId = instance.getParent().id;
}
- if ( this.state.nodeSselected ) {
- if ( this.state.nodeSelected.title === loadedId ) {
+ if ( this.nodeSselected ) {
+ if ( this.nodeSelectedID === loadedId ) {
return true;
}
}
@@ -360,7 +358,6 @@ class VFBGraph extends Component {
} else {
this.focusedInstance = instance;
}
- this.nodeSelectedID = this.focusedInstance.id;
}
/**
@@ -466,7 +463,7 @@ class VFBGraph extends Component {
const { graphQueryIndex } = this.props;
let syncColor = this.state.optionsIconColor;
-
+
if (Object.keys(this.props.instanceOnFocus).length === 0 && this.props.instanceOnFocus.constructor === Object) {
return (
Model not loaded, graph not available yet
From 7d24df42494318b51b51af8f5621d0b04f62073f Mon Sep 17 00:00:00 2001
From: jrmartin
Date: Wed, 14 Oct 2020 10:44:24 -0700
Subject: [PATCH 22/27] Fixing couple bugs after merge
---
components/VFBMain.js | 4 ++--
.../interface/VFBCircuitBrowser/Controls.js | 18 ++++++++----------
.../VFBCircuitBrowser/VFBCircuitBrowser.js | 5 ++---
3 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/components/VFBMain.js b/components/VFBMain.js
index 688c5925d..8d5c10d46 100644
--- a/components/VFBMain.js
+++ b/components/VFBMain.js
@@ -17,7 +17,7 @@ import VFBQuickHelp from './interface/VFBOverview/QuickHelp';
import VFBGraph from './interface/VFBGraph/VFBGraph';
import VFBCircuitBrowser from './interface/VFBCircuitBrowser/VFBCircuitBrowser';
import { connect } from "react-redux";
-import { SHOW_GRAPH, LOAD_CIRCUIT_BROWSER, VFB_LOAD_TERM_INFO, SHOW_LIST_VIEWER } from './../actions/generals';
+import { SHOW_GRAPH, UPDATE_CIRCUIT_QUERY, VFB_LOAD_TERM_INFO, SHOW_LIST_VIEWER } from './../actions/generals';
require('../css/base.less');
require('../css/VFBMain.less');
@@ -1109,7 +1109,7 @@ class VFBMain extends React.Component {
}
}
- if ( this.props.generals.type == LOAD_CIRCUIT_BROWSER ) {
+ if ( this.props.generals.type == UPDATE_CIRCUIT_QUERY ) {
if ( !this.state.circuitBrowserVisible ) {
this.setState({
UIUpdated: true,
diff --git a/components/interface/VFBCircuitBrowser/Controls.js b/components/interface/VFBCircuitBrowser/Controls.js
index e492aeca5..16dbb0323 100644
--- a/components/interface/VFBCircuitBrowser/Controls.js
+++ b/components/interface/VFBCircuitBrowser/Controls.js
@@ -142,9 +142,7 @@ class Controls extends Component {
this.circuitQuerySelected = this.props.circuitQuerySelected;
}
- componentDidUpdate () {
- this.circuitQuerySelected = this.props.circuitQuerySelected;
- }
+ componentDidUpdate () {}
/**
* Deletes neuron field, updates control component right after
@@ -246,19 +244,19 @@ class Controls extends Component {
getUpdatedNeuronFields () {
let neuronFields = this.state.neuronFields;
let added = false;
- for ( var i = 0; i < this.circuitQuerySelected.length; i++ ){
- if ( !this.state.neuronFields.includes(this.circuitQuerySelected[i])) {
+ for ( var i = 0; i < this.props.circuitQuerySelected.length; i++ ){
+ if ( !this.state.neuronFields.includes(this.props.circuitQuerySelected[i])) {
for ( var j = 0 ; j < neuronFields.length ; j++ ) {
if ( this.state.neuronFields[j] === "" ) {
- neuronFields[j] = this.circuitQuerySelected[i];
+ neuronFields[j] = this.props.circuitQuerySelected[i];
added = true;
break;
}
}
- if ( this.circuitQuerySelected.length > neuronFields.length && !this.state.neuronFields.includes(this.circuitQuerySelected[i])) {
- if ( neuronFields.length < configuration.maxNeurons && this.circuitQuerySelected !== "" ) {
- neuronFields.push(this.circuitQuerySelected[i]);
+ if ( this.props.circuitQuerySelected.length > neuronFields.length && !this.state.neuronFields.includes(this.circuitQuerySelected[i])) {
+ if ( neuronFields.length < configuration.maxNeurons && this.props.circuitQuerySelected !== "" ) {
+ neuronFields.push(this.props.circuitQuerySelected[i]);
}
}
}
@@ -274,7 +272,7 @@ class Controls extends Component {
render () {
let self = this;
const { classes } = this.props;
-
+ this.circuitQuerySelected = this.props.circuitQuerySelected;
let neuronFields = this.getUpdatedNeuronFields()
let expanded = this.state.expanded;
diff --git a/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js b/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js
index e5df3795f..74bd3229f 100644
--- a/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js
+++ b/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js
@@ -373,9 +373,8 @@ class VFBCircuitBrowser extends Component {
let self = this;
// Detect when the first load of the Graph component happens
- this.circuitQuerySelected = this.props.circuitQuerySelected;
- const { classes } = this.props;
-
+ const { classes, circuitQuerySelected } = this.props;
+ this.circuitQuerySelected = circuitQuerySelected;
return (
this.state.loading
?
Date: Wed, 14 Oct 2020 10:46:52 -0700
Subject: [PATCH 23/27] Remove debug log statement
---
components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js b/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js
index 74bd3229f..b2810b8bd 100644
--- a/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js
+++ b/components/interface/VFBCircuitBrowser/VFBCircuitBrowser.js
@@ -287,7 +287,6 @@ class VFBCircuitBrowser extends Component {
*/
updateGraph (neurons, hops) {
if (this.__isMounted){
- console.log("Graph updated", this.state.neurons);
// Show loading spinner while cypher query search occurs
this.setState({ loading : true , neurons : neurons, hops : hops, queryLoaded : false });
// Perform cypher query
From a497f6b09aed1ccc7b25b0c821bfa2a3f5dfcd64 Mon Sep 17 00:00:00 2001
From: jrmartin
Date: Wed, 14 Oct 2020 14:33:37 -0700
Subject: [PATCH 24/27] merge development and overwrite development branch
vfb.xmi
---
model/vfb.xmi | 74 +++++++++++++++++++++++++--------------------------
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/model/vfb.xmi b/model/vfb.xmi
index d78879c05..8dbb71010 100644
--- a/model/vfb.xmi
+++ b/model/vfb.xmi
@@ -168,15 +168,15 @@
runForCount="false">
+ queryProcessorId="vfbCreateImagesForQueryResultsQueryProcessor"/>
+ queryProcessorId="vfbCreateResultListForIndividualsForQueryResultsQueryProcessor"/>
+ query=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual)-[:INSTANCEOF]->(d:Class) WHERE has(r.index) RETURN DISTINCT di.short_form as id, di.label as name, coalesce(di.description[0],d.description[0]) as def, COLLECT(DISTINCT d.label) as type, replace(r.folder,'http:','https:') + '/thumbnailT.png' as file", "parameters" : { "ID" : "$ID" }"
+ countQuery=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual)-[:INSTANCEOF]->(d:Class) WHERE has(r.index) RETURN count(di) as count", "parameters" : { "ID" : "$ID" }"/>
+ query=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual) WHERE not has(r.index) OPTIONAL MATCH (di)-[:INSTANCEOF]->(d:Class) RETURN distinct di.short_form as id, di.label as name, coalesce(di.description[0],d.description[0]) as def, COLLECT(DISTINCT d.label) as type, replace(r.folder,'http:','https:') + '/thumbnailT.png' as file", "parameters" : { "ID" : "$ID" }"
+ countQuery=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual) WHERE not has(r.index) RETURN count(di) as count", "parameters" : { "ID" : "$ID" }"/>
+ query=""statement": "MATCH (ep:Class:Expression_pattern)<-[ar:overlaps|part_of]-(:Individual)-[:INSTANCEOF]->(anat:Class) WHERE anat.short_form in {ARRAY_ID_RESULTS} WITH DISTINCT collect(DISTINCT ar.pub) as pubs, anat, ep UNWIND pubs as p MATCH (pub:pub { short_form: p}) WITH anat, ep, collect({ core: { short_form: pub.short_form, label: coalesce(pub.label,''), iri: pub.iri, types: labels(pub) } , PubMed: coalesce(pub.PMID, ''), FlyBase: coalesce(pub.FlyBase, ''), DOI: coalesce(pub.DOI, '') }) as pubs OPTIONAL MATCH (ep)<-[: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, anat, ep, pubs , i 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 ,anat,ep,pubs RETURN {short_form: anat.short_form, label: coalesce(anat.label,''), iri: anat.iri, types: labels(anat) } as anatomy, { short_form: ep.short_form, label: coalesce(ep.label,''), iri: ep.iri, types: labels(ep) } AS expression_pattern, 'Get JSON for anat_2_ep query' AS query, 'ca9ab19' AS version , pubs, anatomy_channel_image", "parameters" : { "ARRAY_ID_RESULTS" : $ARRAY_ID_RESULTS}"
+ countQuery=""statement": "MATCH (anat:Class) WHERE anat.short_form IN {ARRAY_ID_RESULTS} OPTIONAL MATCH (ep:Class)<-[ar:overlaps|part_of]-(:Individual)-[:INSTANCEOF]->(anat) RETURN count(ep) as count", "parameters" : { "ARRAY_ID_RESULTS" : $ARRAY_ID_RESULTS}"/>
+ query=""statement": "MATCH (ep:Expression_pattern:Class)<-[ar:overlaps|part_of]-(anoni:Individual)-[:INSTANCEOF]->(anat:Class) WHERE ep.short_form in [{ID}] WITH anoni, anat, ar OPTIONAL MATCH (p:pub { short_form: ar.pub}) WITH anat, anoni, { 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, '') } AS pub OPTIONAL MATCH (anoni)-[r:Related]->(o:FBdv) 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 stages ,anoni,anat,pub OPTIONAL MATCH (anat:Synaptic_neuropil)<-[: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, anoni, anat, pub, stages , i 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 ,anoni,anat,pub,stages RETURN { short_form: anat.short_form, label: coalesce(anat.label,''), iri: anat.iri, types: labels(anat) } AS anatomy, 'Get JSON for ep_2_anat query' AS query, 'ca9ab19' AS version , pub, stages, anatomy_channel_image", "parameters" : { "ID" : "$ID" }"
+ countQuery=""statement": "MATCH (ep:Class:Expression_pattern)<-[ar:overlaps|part_of]-(anoni:Individual)-[:INSTANCEOF]->(anat:Class) WHERE ep.short_form in [{ID}] RETURN count(anat) as count", "parameters" : { "ID" : "$ID" }"/>
@@ -485,7 +485,7 @@
name="Get JSON for Neuron Class"
description="Get JSON for Neuron Class"
runForCount="false"
- query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS relationships ,primary,parents OPTIONAL MATCH (o:Individual)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS related_individuals ,primary,parents,relationships OPTIONAL MATCH (s:Site { short_form: primary.self_xref }) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, parents, relationships, related_individuals OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) + self_xref END AS xrefs,primary,parents,relationships,related_individuals CALL apoc.cypher.run('WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]->(template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {primary:primary}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, primary, parents, relationships, related_individuals, xrefs 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) END AS anatomy_channel_image ,primary,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) where rp.typ = 'syn' WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } , synonym: { label: coalesce(rp.value, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.has_synonym_type,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) WHERE rp.typ = 'def' 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), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } ) END AS def_pubs,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(ep:Class)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(primary) WITH CASE WHEN ep IS NULL THEN [] ELSE COLLECT({ short_form: ep.short_form, label: coalesce(ep.label,''), iri: ep.iri, types: labels(ep), symbol: coalesce(ep.`IAO_0000028`[0], '')} ) END AS targeting_splits,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Neuron Class' AS query, '58214d4' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, targeting_splits", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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 OPTIONAL MATCH (o:Class)<-[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,parents 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,parents,relationships 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, parents, relationships, related_individuals 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,parents,relationships,related_individuals 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, parents, relationships, related_individuals, xrefs , 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,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'syn'}]->(p:pub) WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { 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, '') } , synonym: { label: coalesce(rp.synonym, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.cat,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'def'}]->(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,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(ep:Class)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(primary) WITH COLLECT({ short_form: ep.short_form, label: coalesce(ep.label,''), iri: ep.iri, types: labels(ep) } ) as targeting_splits,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs 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 Neuron Class' AS query, '2e501bd' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, targeting_splits", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Class {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -495,7 +495,7 @@
name="Get JSON for Split Class"
description="Get JSON for Split Class"
runForCount="false"
- query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS relationships ,primary,parents OPTIONAL MATCH (o:Individual)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS related_individuals ,primary,parents,relationships OPTIONAL MATCH (s:Site { short_form: primary.self_xref }) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, parents, relationships, related_individuals OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) + self_xref END AS xrefs,primary,parents,relationships,related_individuals CALL apoc.cypher.run('WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]->(template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {primary:primary}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, primary, parents, relationships, related_individuals, xrefs 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) END AS anatomy_channel_image ,primary,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) where rp.typ = 'syn' WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } , synonym: { label: coalesce(rp.value, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.has_synonym_type,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) WHERE rp.typ = 'def' 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), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } ) END AS def_pubs,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(primary)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(n:Neuron) WITH CASE WHEN n IS NULL THEN [] ELSE COLLECT({ short_form: n.short_form, label: coalesce(n.label,''), iri: n.iri, types: labels(n), symbol: coalesce(n.`IAO_0000028`[0], '')} ) END AS target_neurons,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Split Class' AS query, '58214d4' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, target_neurons", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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 OPTIONAL MATCH (o:Class)<-[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,parents 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,parents,relationships 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, parents, relationships, related_individuals 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,parents,relationships,related_individuals 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, parents, relationships, related_individuals, xrefs , 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,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'syn'}]->(p:pub) WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { 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, '') } , synonym: { label: coalesce(rp.synonym, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.cat,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'def'}]->(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,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(primary)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(n:Neuron) WITH COLLECT({ short_form: n.short_form, label: coalesce(n.label,''), iri: n.iri, types: labels(n) } ) as target_neurons,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs 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 Split Class' AS query, '2e501bd' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, target_neurons", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Class {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -505,7 +505,7 @@
name="Get JSON for Individual"
description="Get JSON for Individual:Anatomy"
runForCount="false"
- query=""statement": "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[0], ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), symbol: coalesce(ds.`IAO_0000028`[0], '')} }, license: { icon : coalesce(l.license_logo[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }}) 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, dataset_license, parents, relationships OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), 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), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }}) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Individual:Anatomy' AS query, '58214d4' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "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:Class)<-[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, 'ca9ab19' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Individual {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -515,7 +515,7 @@
name="Get JSON for Template"
description="Get JSON for Template"
runForCount="false"
- query=""statement": "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(apoc.convert.toInteger(irw.index), []) + [], extent: irw.extent[0], center: irw.center[0], voxel: irw.voxel[0], orientation: coalesce(irw.orientation[0], ''), image_folder: coalesce(irw.folder[0],''), channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} } as template_channel,primary OPTIONAL MATCH (technique:Class)<-[:is_specified_output_of]-(channel:Individual)-[irw:in_register_with]->(template:Individual)-[:depicts]->(primary) WHERE technique.short_form = 'FBbi_00000224' AND exists(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), symbol: coalesce(c.`IAO_0000028`[0], '')} , anatomical_individual: { short_form: ai.short_form, label: coalesce(ai.label,''), iri: ai.iri, types: labels(ai), symbol: coalesce(ai.`IAO_0000028`[0], '')} , folder: pd.irw.folder[0], 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[0], ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), symbol: coalesce(ds.`IAO_0000028`[0], '')} }, license: { icon : coalesce(l.license_logo[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }}) 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, template_channel, template_domains, dataset_license, parents, relationships OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Template' AS query, '58214d4' AS version , template_channel, template_domains, dataset_license, parents, relationships, xrefs, related_individuals", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "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:Class)<-[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, 'ca9ab19' AS version , template_channel, template_domains, dataset_license, parents, relationships, xrefs, related_individuals", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Template {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -525,7 +525,7 @@
name="Get JSON for pub"
description="Fetches JSON for pub."
runForCount="false"
- query=""statement": "MATCH (primary:Individual:pub) WHERE primary.short_form in [{ID}] WITH primary OPTIONAL MATCH (primary)-[:has_reference]-(ds:DataSet)-[:has_license]->(l:License) WITH COLLECT ({ dataset: { link : coalesce(ds.dataset_link[0], ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), symbol: coalesce(ds.`IAO_0000028`[0], '')} }, license: { icon : coalesce(l.license_logo[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }}) AS dataset_license,primary RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, '58214d4' AS version , dataset_license, {title: coalesce(primary.title[0], '') ,PubMed: coalesce(primary.PMID[0], ''), FlyBase: coalesce(primary.FlyBase[0], ''), DOI: coalesce(primary.DOI[0], '') }AS pub_specific_content", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "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", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:pub:Individual {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -535,7 +535,7 @@
name="Get JSON for DataSet"
description="Get JSON for DataSet"
runForCount="false"
- query=""statement": "MATCH (primary:DataSet) WHERE primary.short_form in [{ID}] WITH primary CALL apoc.cypher.run('WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]->(template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {primary:primary}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, primary 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) 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: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, anatomy_channel_image OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), 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[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }) 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), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } ) END AS pubs,primary,anatomy_channel_image,xrefs,license OPTIONAL MATCH (primary)<-[:has_source]-(i:Individual) WITH i, primary, anatomy_channel_image, xrefs, license, pubs OPTIONAL MATCH (i)-[:INSTANCEOF]-(c:Class) WITH DISTINCT { images: count(distinct i),types: count(distinct c) } as dataset_counts,primary,anatomy_channel_image,xrefs,license,pubs RETURN { link : coalesce(primary.dataset_link[0], ''), core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for DataSet' AS query, '58214d4' AS version , anatomy_channel_image, xrefs, license, pubs, dataset_counts", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:DataSet) 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, '2e501bd' AS version , anatomy_channel_image, xrefs, license, def_pubs", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:DataSet {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -545,7 +545,7 @@
name="Get JSON for License"
description="Get JSON for License"
runForCount="false"
- query=""statement": "MATCH (primary:License) WHERE primary.short_form in [{ID}] WITH primary RETURN { icon : coalesce(primary.license_logo[0], ''), link : coalesce(primary.license_url[0], ''), core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for License' AS query, '58214d4' AS version", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:License) 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, '2e501bd' AS version", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:License {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -555,7 +555,7 @@
name="Get JSON for Cluster"
description="Get JSON for Cluster"
runForCount="false"
- query=""statement": "MATCH (primary:Cluster) 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[0], ''), link : coalesce(l.license_url[0], ''), 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:Class)<-[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[0], 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[0], ''), 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[0], 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[0], ''), 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[0], index: coalesce(irw.index[0], []) + [] }}) 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, 'ca9ab19' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Cluster) 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:Class)<-[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, 'ca9ab19' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Cluster {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
From 535873ab62d5f0974ab0194de1a0d19bf9881219 Mon Sep 17 00:00:00 2001
From: Rob Court
Date: Thu, 15 Oct 2020 08:24:44 +0100
Subject: [PATCH 25/27] Revert "Merge pull request #690 from
VirtualFlyBrain/pipeline2"
This reverts commit 9e820520e05339e38558ced7d12b9bde4a9336fc, reversing
changes made to 31e325f8400f42d47ca2b32ff80003d869cd0a99.
---
.travis.yml | 60 ++++++---------
Dockerfile | 2 +-
components/VFBMain.js | 1 -
.../circuitBrowserConfiguration.js | 20 ++---
.../VFBGraph/graphConfiguration.js | 35 ++++-----
components/configuration/VFBMain/colours.json | 2 +-
.../VFBMain/queryBuilderConfiguration.js | 15 +---
.../VFBMain/searchConfiguration.js | 29 ++------
.../VFBTree/VFBTreeConfiguration.js | 16 ++--
css/VFBMain.less | 1 -
model/vfb.xmi | 74 +++++++++----------
tests/jest/vfb/batch3/tree-browser-tests.js | 25 ++-----
.../layer-component-tests.js | 0
13 files changed, 112 insertions(+), 168 deletions(-)
rename tests/jest/vfb/{batch2 => review}/layer-component-tests.js (100%)
diff --git a/.travis.yml b/.travis.yml
index 07732a67d..7af7db28b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,21 +19,21 @@ services:
stages:
- build
- name: debug
- if: branch = debug OR branch = pipeline2 OR branch =~ ^(fix|feature).*
+ if: branch = vfb_geppetto_application OR branch =~ ^(fix|feature).*
- test
- deploy
- name: review
- if: branch = debug OR branch = development OR branch = pipeline2 OR branch =~ ^(fix|feature).*
+ if: branch = vfb_geppetto_application OR branch = development OR branch =~ ^(fix|feature).*
jobs:
fast_finish: true
allow_failures:
- - if: branch = debug OR branch = development
+ - if: branch = vfb_geppetto_application OR branch = development
name: review
include:
- stage: build
install:
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
@@ -57,11 +57,6 @@ jobs:
export VFB_R_SERVER=http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast;
export SOLR_SERVER=https://solr.virtualflybrain.org/solr/ontology/select;
fi;
- export VFB_TREE_PDB_SERVER=https://pdb.p2.virtualflybrain.org;
- export VFB_PDB_SERVER=http://pdb.p2.virtualflybrain.org;
- export VFB_OWL_SERVER=http://owl.p2.virtualflybrain.org/kbs/vfb/;
- export VFB_R_SERVER=http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast;
- export SOLR_SERVER=https://solr.p2.virtualflybrain.org/solr/ontology/select;
- export TAG="$TAG-TEST"
before_script:
- docker login -u $DOCKER_USER -p $DOCKER_PASS;
@@ -76,7 +71,7 @@ jobs:
- stage: test
before_install:
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
@@ -116,7 +111,7 @@ jobs:
- stage: test
before_install:
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
@@ -156,7 +151,7 @@ jobs:
- stage: test
before_install:
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
@@ -196,7 +191,7 @@ jobs:
- stage: deploy
install:
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
@@ -220,40 +215,29 @@ jobs:
export VFB_TREE_PDB_SERVER=https://pdb.virtualflybrain.org;
export SOLR_SERVER=https://solr.virtualflybrain.org/solr/ontology/select;
fi;
- export VFB_TREE_PDB_SERVER=https://pdb.p2.virtualflybrain.org;
- export VFB_PDB_SERVER=http://pdb.p2.virtualflybrain.org;
- export VFB_OWL_SERVER=http://owl.p2.virtualflybrain.org/kbs/vfb/;
- export VFB_R_SERVER=http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast;
- export SOLR_SERVER=https://solr.p2.virtualflybrain.org/solr/ontology/select;
docker build --cache-from metacell/java-virgo-maven:development -t=$REPO:$TAG.wss --build-arg VFB_TREE_PDB_SERVER_ARG=$VFB_TREE_PDB_SERVER --build-arg SOLR_SERVER_ARG=$SOLR_SERVER --build-arg VFB_R_SERVER_ARG=$VFB_R_SERVER --build-arg VFB_OWL_SERVER_ARG=$VFB_OWL_SERVER --build-arg VFB_PDB_SERVER_ARG=$VFB_PDB_SERVER --build-arg build_type=$BUILD_TYPE --build-arg targetBranch=$TRAVIS_BRANCH --build-arg originBranch=$BRANCH --build-arg defaultBranch=$DEFAULT_BRANCH --build-arg finalBuild=true $DOCKER_FOLDER && docker push $REPO:$TAG.wss;
fi;
- stage: debug
install:
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
- - if [ "$BUILD_TYPE" == "development" ]; then export TAG=$TAG-development; fi;
- export VFB_PDB_SERVER=http://pdb:7474;
- export VFB_OWL_SERVER=http://owl:8080/kbs/vfb/;
- export VFB_R_SERVER=http://ocpu:80/ocpu/library/vfbr/R/vfb_nblast;
- # - if [ "$BUILD_TYPE" == "development" ]; then
- # export VFB_TREE_PDB_SERVER=https://pdb-dev.virtualflybrain.org;
- # export SOLR_SERVER=https://solr-dev.virtualflybrain.org/solr/ontology/select;
- # export TAG=$TAG-development;
- # elif [ "$BUILD_TYPE" == "staging" ]; then
- # export VFB_TREE_PDB_SERVER=https://pdb-alpha.virtualflybrain.org;
- # export SOLR_SERVER=https://solr-alpha.virtualflybrain.org/solr/ontology/select;
- # else
- # export VFB_TREE_PDB_SERVER=https://pdb.virtualflybrain.org;
- # export SOLR_SERVER=https://solr.virtualflybrain.org/solr/ontology/select;
- # fi;
- - export VFB_TREE_PDB_SERVER=https://pdb.p2.virtualflybrain.org;
- - export VFB_PDB_SERVER=http://pdb.p2.virtualflybrain.org;
- - export VFB_OWL_SERVER=http://owl.p2.virtualflybrain.org/kbs/vfb/;
- - export VFB_R_SERVER=http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast;
- - export SOLR_SERVER=https://solr.p2.virtualflybrain.org/solr/ontology/select;
+ - if [ "$BUILD_TYPE" == "development" ]; then
+ export VFB_TREE_PDB_SERVER=https://pdb-dev.virtualflybrain.org;
+ export SOLR_SERVER=https://solr-dev.virtualflybrain.org/solr/ontology/select;
+ export TAG=$TAG-development;
+ elif [ "$BUILD_TYPE" == "staging" ]; then
+ export VFB_TREE_PDB_SERVER=https://pdb-alpha.virtualflybrain.org;
+ export SOLR_SERVER=https://solr-alpha.virtualflybrain.org/solr/ontology/select;
+ else
+ export VFB_TREE_PDB_SERVER=https://pdb.virtualflybrain.org;
+ export SOLR_SERVER=https://solr.virtualflybrain.org/solr/ontology/select;
+ fi;
before_script:
- cd $TRAVIS_BUILD_DIR;
- docker login -u $DOCKER_USER -p $DOCKER_PASS;
@@ -265,7 +249,7 @@ jobs:
- stage: review
before_install:
- if [ $(ls tests/jest/vfb/review/*.js | wc -l) -lt 1 ]; then travis_terminate 0; fi
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
@@ -301,4 +285,4 @@ jobs:
- echo -e "travis_fold:start:Cleanup" || true
- docker stop $(docker ps -a -q)
- docker rm $(docker ps -a -q)
- - echo -e "travis_fold:end:Cleanup" || true
+ - echo -e "travis_fold:end:Cleanup" || true
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 9d81decc6..b3fea6831 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,7 +15,7 @@ ARG geppettoDatasourceRelease=vfb_20200604_a
ARG geppettoModelSwcRelease=v1.0.1
ARG geppettoFrontendRelease=development
ARG geppettoClientRelease=VFBv2.2.0.5
-ARG ukAcVfbGeppettoRelease=pipeline2
+ARG ukAcVfbGeppettoRelease=development
ARG mvnOpt="-Dhttps.protocols=TLSv1.2 -DskipTests --quiet -Pmaster"
diff --git a/components/VFBMain.js b/components/VFBMain.js
index 27fd1ebe4..688c5925d 100644
--- a/components/VFBMain.js
+++ b/components/VFBMain.js
@@ -913,7 +913,6 @@ class VFBMain extends React.Component {
focusTermRef={this.focusTermReference}
exclude={["ClassQueriesFrom", "Debug"]}
order={['Name',
- 'Title',
'Label',
'Alternative Names',
'Types',
diff --git a/components/configuration/VFBCircuitBrowser/circuitBrowserConfiguration.js b/components/configuration/VFBCircuitBrowser/circuitBrowserConfiguration.js
index 35b522323..d71f2fc1b 100644
--- a/components/configuration/VFBCircuitBrowser/circuitBrowserConfiguration.js
+++ b/components/configuration/VFBCircuitBrowser/circuitBrowserConfiguration.js
@@ -57,6 +57,14 @@ var styling = {
defaultNodeDescriptionBackgroundColor : "white",
nodeColorsByLabel : {
"Template" : "#ff6cc8",
+ "DataSet" : "#b700b5",
+ "Anatomy" : "#00a2aa",
+ "Synaptic_neuropil" : "#00a2aa",
+ "_Class" : "#0164d8",
+ "License" : "#0164d8",
+ "Person" : "#023f00",
+ "Neuron" : "#7f2100",
+ "Neuron_projection_bundle" : "#d6007d",
"Ganglion" : "#d6007d",
"Neuromere" : "#d6007d",
"GABAergic" : "#9551ff",
@@ -71,19 +79,11 @@ var styling = {
"Glial_cell" : "#ff6a3a",
"Cell" : "#ff6a3a",
"Clone" : "#d6007d",
- "Synaptic_neuropil" : "#00a2aa",
- "License" : "#0164d8",
- "Person" : "#023f00",
- "Neuron" : "#7f2100",
- "Neuron_projection_bundle" : "#d6007d",
+ "Property" : "#005f1d",
"Resource" : "#005f1d",
"Site" : "#005f1d",
"Expression_pattern" : "#534700",
- "Split" : "#e012e3",
- "DataSet" : "#b700b5",
- "Anatomy" : "#00a2aa",
- "Property" : "#005f1d",
- "_Class" : "#0164d8"
+ "Split" : "#e012e3"
},
controlIcons : {
home : "fa fa-home",
diff --git a/components/configuration/VFBGraph/graphConfiguration.js b/components/configuration/VFBGraph/graphConfiguration.js
index 77d0b7037..8819d61f8 100644
--- a/components/configuration/VFBGraph/graphConfiguration.js
+++ b/components/configuration/VFBGraph/graphConfiguration.js
@@ -1,21 +1,9 @@
var locationCypherQuery = instance => ({
"statements": [
{
- "statement": "MATCH p=(n:Entity {short_form:'" + instance + "'})-[r:INSTANCEOF|part_of|has_synaptic_terminal_in|has_presynaptic_terminal_in|"
- + "has_postsynaptic_terminal_in|overlaps*..]->(x) "
- + "RETURN distinct n,r,x,n.short_form as root",
- "resultDataContents": ["graph"]
- }
- ]
-});
-
-var whatCypherQuery = instance => ({
- "statements": [
- {
- "statement": "MATCH p=(n:Entity {short_form:'" + instance + "'})-[:INSTANCEOF|:SUBCLASSOF*..]->(x) "
- + "WHERE (('Cell' IN labels(x)) OR ('synaptic neuropil' IN labels(x))) "
- + " OR (('Ganglion' IN labels(x)) OR ('Neuron_projection_bundle' IN labels(x))) "
- + "RETURN p, n.short_form as root",
+ "statement": "MATCH p=(n:Entity)-[r:INSTANCEOF|part_of|has_synaptic_terminal_in|has_presynaptic_terminal_in"
+ + "has_postsynaptic_terminal_in|overlaps*..]->(x)"
+ + "WHERE n.short_form = '" + instance + "' return distinct n,r,x,n.short_form as root",
"resultDataContents": ["graph"]
}
]
@@ -74,7 +62,17 @@ var styling = {
},
{
label : instance => "Show classification of " + instance,
- query : instance => whatCypherQuery(instance)
+ query : instance => ({
+ "statements": [
+ {
+ "statement": "MATCH p=(n:Entity)-[:INSTANCEOF|:SUBCLASSOF*..]->(x)"
+ + "WHERE 'Anatomy' IN labels(x)"
+ + "AND n.short_form = '" + instance + "'"
+ + "RETURN p, n.short_form as root",
+ "resultDataContents": ["graph"]
+ }
+ ]
+ })
}
],
dropDownHoverBackgroundColor : "#11bffe",
@@ -84,7 +82,7 @@ var styling = {
}
var restPostConfig = {
- url: "https://pdb.p2.virtualflybrain.org/db/data/transaction/commit",
+ url: "https://pdb.virtualflybrain.org/db/data/transaction/commit",
contentType: "application/json"
};
@@ -92,6 +90,5 @@ module.exports = {
configuration,
styling,
restPostConfig,
- locationCypherQuery,
- whatCypherQuery
+ locationCypherQuery
};
diff --git a/components/configuration/VFBMain/colours.json b/components/configuration/VFBMain/colours.json
index a16bf2ea5..287f5ed53 100644
--- a/components/configuration/VFBMain/colours.json
+++ b/components/configuration/VFBMain/colours.json
@@ -3,6 +3,7 @@
"0x00ff00",
"0xff00ff",
"0x0000ff",
+ "0xffd300",
"0x0084f6",
"0x008d46",
"0xa7613e",
@@ -198,6 +199,5 @@
"0x8d35f6",
"0x5800a7",
"0xed8dff",
- "0xffd300",
"0x969696"
]
diff --git a/components/configuration/VFBMain/queryBuilderConfiguration.js b/components/configuration/VFBMain/queryBuilderConfiguration.js
index c6eb2062f..8de4bf6d9 100644
--- a/components/configuration/VFBMain/queryBuilderConfiguration.js
+++ b/components/configuration/VFBMain/queryBuilderConfiguration.js
@@ -25,19 +25,6 @@ var queryResultsColMeta = [
"cssClassName": "query-results-name-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
- {
- "columnName": "type",
- "order": 2,
- "locked": false,
- "visible": true,
- "customComponent": QueryLinkComponent,
- "actions": "window.addVfbId('$entity$');",
- "entityIndex": 1,
- "entityDelimiter": "----",
- "displayName": "Type",
- "cssClassName": "query-results-type-column",
- "sortDirectionCycle": ['asc', 'desc', null]
- },
{
"columnName": "expressed_in",
"order": 3,
@@ -176,7 +163,7 @@ var queryResultsControlConfig = {
var queryBuilderDatasourceConfig = {
VFB: {
- url: 'https://solr.p2.virtualflybrain.org/solr/ontology/select?q=$SEARCH_TERM$+OR+$SEARCH_TERM$*+OR+*$SEARCH_TERM$*&defType=edismax&qf=label^100+synonym^100+label_autosuggest_ws+label_autosuggest_e+label_autosuggest+synonym_autosuggest_ws+synonym_autosuggest+shortform_autosuggest&indent=true&fl=short_form+label+synonym+id+facets_annotation+type:"class"&start=0&pf=true&rows=100&wt=json&bq=shortform_autosuggest:VFB*^110.0+shortform_autosuggest:FBbt*^100.0+label_s:""^2+synonym_s:""+short_form=FBbt_00003982^2+facets_annotation:Deprecated^0.001',
+ url: "https://solr.virtualflybrain.org/solr/ontology/select?fl=short_form,label,synonym,id,type,has_narrow_synonym_annotation,has_broad_synonym_annotation&start=0&fq=type%3Aclass+OR+type%3Aindividual+OR+type%3Aproperty&fq=ontology_name:(vfb)&fq=shortform_autosuggest:VFB*%20OR%20shortform_autosuggest:FB*%20OR%20is_defining_ontology:true&rows=100&bq=is_obsolete:false%5E100.0%20shortform_autosuggest:VFB*%5E110.0%20shortform_autosuggest:FBbt*%5E100.0%20is_defining_ontology:true%5E100.0%20label_s:%22%22%5E2%20synonym_s:%22%22%20in_subset_annotation:BRAINNAME%5E3%20short_form:FBbt_00003982%5E2&q=$SEARCH_TERM$%20OR%20$SEARCH_TERM$*%20OR%20*$SEARCH_TERM$*&defType=edismax&qf=label%20synonym%20label_autosuggest_ws%20label_autosuggest_e%20label_autosuggest%20synonym_autosuggest_ws%20synonym_autosuggest_e%20synonym_autosuggest%20shortform_autosuggest%20has_narrow_synonym_annotation%20has_broad_synonym_annotation&wt=json&indent=true",
crossDomain: true,
id: "short_form",
label: { field: "label", formatting: "$VALUE$" },
diff --git a/components/configuration/VFBMain/searchConfiguration.js b/components/configuration/VFBMain/searchConfiguration.js
index 2b33818d5..e7032751d 100644
--- a/components/configuration/VFBMain/searchConfiguration.js
+++ b/components/configuration/VFBMain/searchConfiguration.js
@@ -84,22 +84,23 @@ var searchStyle = {
};
var datasourceConfiguration = {
- "url": "https://solr.p2.virtualflybrain.org/solr/ontology/select",
+ "url": "https://solr-dev.virtualflybrain.org/solr/ontology/select",
"query_settings":
{
"q": "$SEARCH_TERM$ OR $SEARCH_TERM$* OR *$SEARCH_TERM$*",
"defType": "edismax",
- "qf": "label^100 synonym^100 label_autosuggest_ws label_autosuggest_e label_autosuggest synonym_autosuggest_ws synonym_autosuggest shortform_autosuggest",
+ "qf": "label synonym label_autosuggest_ws label_autosuggest_e label_autosuggest synonym_autosuggest_ws synonym_autosuggest_e synonym_autosuggest shortform_autosuggest has_narrow_synonym_annotation has_broad_synonym_annotation",
"indent": "true",
- "fl": "short_form,label,synonym,id,facets_annotation",
+ "fl": "short_form,label,synonym,id,type,has_narrow_synonym_annotation,has_broad_synonym_annotation,facets_annotation",
"start": "0",
- "pf":"true",
"fq": [
- "shortform_autosuggest:VFB* OR shortform_autosuggest:FB*"
+ "type:class OR type:individual OR type:property",
+ "ontology_name:(vfb)",
+ "shortform_autosuggest:VFB* OR shortform_autosuggest:FB* OR is_defining_ontology:true"
],
"rows": "100",
"wt": "json",
- "bq": "shortform_autosuggest:VFB*^110.0 shortform_autosuggest:FBbt*^100.0 label_s:\"\"^2 synonym_s:\"\" short_form:FBbt_00003982^2 facets_annotation:Deprecated^0.001"
+ "bq": "is_obsolete:false^100.0 shortform_autosuggest:VFB*^110.0 shortform_autosuggest:FBbt*^100.0 is_defining_ontology:true^100.0 label_s:\"\"^2 synonym_s:\"\" in_subset_annotation:BRAINNAME^3 short_form:FBbt_00003982^2"
}
};
@@ -112,7 +113,7 @@ var searchConfiguration = {
"filters": [
{
"key": "facets_annotation",
- "filter_name": "Filters",
+ "filter_name": "Type",
"type": "array",
"enabled": "disabled",
"disableGlobal": true,
@@ -176,13 +177,6 @@ var searchConfiguration = {
if (InputString == b.label) {
return 1;
}
- // move exact matches to top ['XX ('ID/Label)]
- if (a.label.indexOf(InputString + " (") == 0) {
- return -1;
- }
- if (b.label.indexOf(InputString + " (") == 0) {
- return 1;
- }
// close match without case matching
if (InputString.toLowerCase() == a.label.toLowerCase()) {
return -1;
@@ -190,13 +184,6 @@ var searchConfiguration = {
if (InputString.toLowerCase() == b.label.toLowerCase()) {
return 1;
}
- // close match without case matching ['xx ('ID/Label)]
- if (a.label.toLowerCase().indexOf(InputString.toLowerCase()) == 0) {
- return -1;
- }
- if (b.label.toLowerCase().indexOf(InputString.toLowerCase()) == 0) {
- return 1;
- }
// match ignoring joinging nonwords
if (InputString.toLowerCase().split(/\W+/).join(' ') == a.label.toLowerCase().split(/\W+/).join(' ')) {
return -1;
diff --git a/components/configuration/VFBTree/VFBTreeConfiguration.js b/components/configuration/VFBTree/VFBTreeConfiguration.js
index 57d8f63af..00a4802ab 100644
--- a/components/configuration/VFBTree/VFBTreeConfiguration.js
+++ b/components/configuration/VFBTree/VFBTreeConfiguration.js
@@ -1,15 +1,15 @@
var restPostConfig = {
- url: "https://pdb.p2.virtualflybrain.org/db/data/transaction/commit",
+ url: "https://pdb.virtualflybrain.org/db/data/transaction/commit",
contentType: "application/json"
};
var treeCypherQuery = instance => ({
"statements": [
{
- "statement": "MATCH (root:Class)<-[:INSTANCEOF]-(t:Template {short_form:'" + instance + "'})"
- + "<-[:depicts]-(tc:Template)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:"
- + "Individual)-[r:INSTANCEOF]->(anat:Class:Nervous_system) WHERE exists(ie.index) WITH root, anat,r,image"
- + " MATCH p=allshortestpaths((root)<-[:SUBCLASSOF|part_of*..]-(anat)) "
+ "statement": "MATCH (root:Class)<-[:INSTANCEOF]-(t:Individual {short_form:'" + instance + "'})"
+ + "<-[:depicts]-(tc:Individual)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:"
+ + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE has(ie.index) WITH root, anat,r,image"
+ + " MATCH p=(root)<-[:SUBCLASSOF|part_of*..]-(anat) "
+ "RETURN collect(distinct { node_id: id(anat), short_form: anat.short_form, image: image.short_form })"
+ " AS image_nodes, id(root) AS root, collect(p)",
"resultDataContents": ["row", "graph"]
@@ -32,7 +32,7 @@ var styling = {
{
"statement": "MATCH (root:Class)<-[:INSTANCEOF]-(t:Individual {short_form:'FBbt_00007145'})"
+ "<-[:depicts]-(tc:Individual)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:"
- + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE exists(ie.index) WITH root, anat,r,image"
+ + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE has(ie.index) WITH root, anat,r,image"
+ " MATCH p=allShortestPaths((root)<-[:SUBCLASSOF|part_of*..]-(anat)) "
+ "RETURN collect(distinct { node_id: id(anat), short_form: anat.short_form, image: image.short_form })"
+ " AS image_nodes, id(root) AS root, collect(p)",
@@ -48,7 +48,7 @@ var styling = {
{
"statement": "MATCH (root:Class)<-[:INSTANCEOF]-(t:Individual {short_form:'VFB_00017894'})"
+ "<-[:depicts]-(tc:Individual)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:"
- + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE exists(ie.index) WITH root, anat,r,image"
+ + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE has(ie.index) WITH root, anat,r,image"
+ " MATCH p=allShortestPaths((root)<-[:SUBCLASSOF|part_of*..]-(anat)) "
+ "RETURN collect(distinct { node_id: id(anat), short_form: anat.short_form, image: image.short_form })"
+ " AS image_nodes, id(root) AS root, collect(p)",
@@ -64,7 +64,7 @@ var styling = {
{
"statement": "MATCH (root:Class)<-[:INSTANCEOF]-(t:Individual {short_form:'FBbt_00007050'})"
+ "<-[:depicts]-(tc:Individual)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:"
- + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE exists(ie.index) WITH root, anat,r,image"
+ + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE has(ie.index) WITH root, anat,r,image"
+ " MATCH p=allShortestPaths((root)<-[:SUBCLASSOF|part_of*..]-(anat)) "
+ "RETURN collect(distinct { node_id: id(anat), short_form: anat.short_form, image: image.short_form })"
+ " AS image_nodes, id(root) AS root, collect(p)",
diff --git a/css/VFBMain.less b/css/VFBMain.less
index e17e5d2f4..c426b6408 100644
--- a/css/VFBMain.less
+++ b/css/VFBMain.less
@@ -1662,4 +1662,3 @@
-o-user-select: text;
user-select: text;
}
-
diff --git a/model/vfb.xmi b/model/vfb.xmi
index d78879c05..8dbb71010 100644
--- a/model/vfb.xmi
+++ b/model/vfb.xmi
@@ -168,15 +168,15 @@
runForCount="false">
+ queryProcessorId="vfbCreateImagesForQueryResultsQueryProcessor"/>
+ queryProcessorId="vfbCreateResultListForIndividualsForQueryResultsQueryProcessor"/>
+ query=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual)-[:INSTANCEOF]->(d:Class) WHERE has(r.index) RETURN DISTINCT di.short_form as id, di.label as name, coalesce(di.description[0],d.description[0]) as def, COLLECT(DISTINCT d.label) as type, replace(r.folder,'http:','https:') + '/thumbnailT.png' as file", "parameters" : { "ID" : "$ID" }"
+ countQuery=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual)-[:INSTANCEOF]->(d:Class) WHERE has(r.index) RETURN count(di) as count", "parameters" : { "ID" : "$ID" }"/>
+ query=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual) WHERE not has(r.index) OPTIONAL MATCH (di)-[:INSTANCEOF]->(d:Class) RETURN distinct di.short_form as id, di.label as name, coalesce(di.description[0],d.description[0]) as def, COLLECT(DISTINCT d.label) as type, replace(r.folder,'http:','https:') + '/thumbnailT.png' as file", "parameters" : { "ID" : "$ID" }"
+ countQuery=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual) WHERE not has(r.index) RETURN count(di) as count", "parameters" : { "ID" : "$ID" }"/>
+ query=""statement": "MATCH (ep:Class:Expression_pattern)<-[ar:overlaps|part_of]-(:Individual)-[:INSTANCEOF]->(anat:Class) WHERE anat.short_form in {ARRAY_ID_RESULTS} WITH DISTINCT collect(DISTINCT ar.pub) as pubs, anat, ep UNWIND pubs as p MATCH (pub:pub { short_form: p}) WITH anat, ep, collect({ core: { short_form: pub.short_form, label: coalesce(pub.label,''), iri: pub.iri, types: labels(pub) } , PubMed: coalesce(pub.PMID, ''), FlyBase: coalesce(pub.FlyBase, ''), DOI: coalesce(pub.DOI, '') }) as pubs OPTIONAL MATCH (ep)<-[: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, anat, ep, pubs , i 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 ,anat,ep,pubs RETURN {short_form: anat.short_form, label: coalesce(anat.label,''), iri: anat.iri, types: labels(anat) } as anatomy, { short_form: ep.short_form, label: coalesce(ep.label,''), iri: ep.iri, types: labels(ep) } AS expression_pattern, 'Get JSON for anat_2_ep query' AS query, 'ca9ab19' AS version , pubs, anatomy_channel_image", "parameters" : { "ARRAY_ID_RESULTS" : $ARRAY_ID_RESULTS}"
+ countQuery=""statement": "MATCH (anat:Class) WHERE anat.short_form IN {ARRAY_ID_RESULTS} OPTIONAL MATCH (ep:Class)<-[ar:overlaps|part_of]-(:Individual)-[:INSTANCEOF]->(anat) RETURN count(ep) as count", "parameters" : { "ARRAY_ID_RESULTS" : $ARRAY_ID_RESULTS}"/>
+ query=""statement": "MATCH (ep:Expression_pattern:Class)<-[ar:overlaps|part_of]-(anoni:Individual)-[:INSTANCEOF]->(anat:Class) WHERE ep.short_form in [{ID}] WITH anoni, anat, ar OPTIONAL MATCH (p:pub { short_form: ar.pub}) WITH anat, anoni, { 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, '') } AS pub OPTIONAL MATCH (anoni)-[r:Related]->(o:FBdv) 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 stages ,anoni,anat,pub OPTIONAL MATCH (anat:Synaptic_neuropil)<-[: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, anoni, anat, pub, stages , i 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 ,anoni,anat,pub,stages RETURN { short_form: anat.short_form, label: coalesce(anat.label,''), iri: anat.iri, types: labels(anat) } AS anatomy, 'Get JSON for ep_2_anat query' AS query, 'ca9ab19' AS version , pub, stages, anatomy_channel_image", "parameters" : { "ID" : "$ID" }"
+ countQuery=""statement": "MATCH (ep:Class:Expression_pattern)<-[ar:overlaps|part_of]-(anoni:Individual)-[:INSTANCEOF]->(anat:Class) WHERE ep.short_form in [{ID}] RETURN count(anat) as count", "parameters" : { "ID" : "$ID" }"/>
@@ -485,7 +485,7 @@
name="Get JSON for Neuron Class"
description="Get JSON for Neuron Class"
runForCount="false"
- query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS relationships ,primary,parents OPTIONAL MATCH (o:Individual)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS related_individuals ,primary,parents,relationships OPTIONAL MATCH (s:Site { short_form: primary.self_xref }) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, parents, relationships, related_individuals OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) + self_xref END AS xrefs,primary,parents,relationships,related_individuals CALL apoc.cypher.run('WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]->(template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {primary:primary}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, primary, parents, relationships, related_individuals, xrefs 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) END AS anatomy_channel_image ,primary,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) where rp.typ = 'syn' WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } , synonym: { label: coalesce(rp.value, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.has_synonym_type,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) WHERE rp.typ = 'def' 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), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } ) END AS def_pubs,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(ep:Class)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(primary) WITH CASE WHEN ep IS NULL THEN [] ELSE COLLECT({ short_form: ep.short_form, label: coalesce(ep.label,''), iri: ep.iri, types: labels(ep), symbol: coalesce(ep.`IAO_0000028`[0], '')} ) END AS targeting_splits,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Neuron Class' AS query, '58214d4' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, targeting_splits", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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 OPTIONAL MATCH (o:Class)<-[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,parents 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,parents,relationships 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, parents, relationships, related_individuals 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,parents,relationships,related_individuals 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, parents, relationships, related_individuals, xrefs , 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,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'syn'}]->(p:pub) WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { 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, '') } , synonym: { label: coalesce(rp.synonym, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.cat,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'def'}]->(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,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(ep:Class)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(primary) WITH COLLECT({ short_form: ep.short_form, label: coalesce(ep.label,''), iri: ep.iri, types: labels(ep) } ) as targeting_splits,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs 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 Neuron Class' AS query, '2e501bd' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, targeting_splits", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Class {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -495,7 +495,7 @@
name="Get JSON for Split Class"
description="Get JSON for Split Class"
runForCount="false"
- query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS relationships ,primary,parents OPTIONAL MATCH (o:Individual)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS related_individuals ,primary,parents,relationships OPTIONAL MATCH (s:Site { short_form: primary.self_xref }) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, parents, relationships, related_individuals OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) + self_xref END AS xrefs,primary,parents,relationships,related_individuals CALL apoc.cypher.run('WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]->(template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {primary:primary}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, primary, parents, relationships, related_individuals, xrefs 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) END AS anatomy_channel_image ,primary,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) where rp.typ = 'syn' WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } , synonym: { label: coalesce(rp.value, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.has_synonym_type,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) WHERE rp.typ = 'def' 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), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } ) END AS def_pubs,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(primary)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(n:Neuron) WITH CASE WHEN n IS NULL THEN [] ELSE COLLECT({ short_form: n.short_form, label: coalesce(n.label,''), iri: n.iri, types: labels(n), symbol: coalesce(n.`IAO_0000028`[0], '')} ) END AS target_neurons,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Split Class' AS query, '58214d4' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, target_neurons", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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 OPTIONAL MATCH (o:Class)<-[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,parents 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,parents,relationships 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, parents, relationships, related_individuals 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,parents,relationships,related_individuals 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, parents, relationships, related_individuals, xrefs , 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,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'syn'}]->(p:pub) WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { 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, '') } , synonym: { label: coalesce(rp.synonym, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.cat,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'def'}]->(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,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(primary)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(n:Neuron) WITH COLLECT({ short_form: n.short_form, label: coalesce(n.label,''), iri: n.iri, types: labels(n) } ) as target_neurons,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs 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 Split Class' AS query, '2e501bd' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, target_neurons", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Class {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -505,7 +505,7 @@
name="Get JSON for Individual"
description="Get JSON for Individual:Anatomy"
runForCount="false"
- query=""statement": "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[0], ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), symbol: coalesce(ds.`IAO_0000028`[0], '')} }, license: { icon : coalesce(l.license_logo[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }}) 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, dataset_license, parents, relationships OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), 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), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }}) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Individual:Anatomy' AS query, '58214d4' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "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:Class)<-[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, 'ca9ab19' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Individual {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -515,7 +515,7 @@
name="Get JSON for Template"
description="Get JSON for Template"
runForCount="false"
- query=""statement": "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(apoc.convert.toInteger(irw.index), []) + [], extent: irw.extent[0], center: irw.center[0], voxel: irw.voxel[0], orientation: coalesce(irw.orientation[0], ''), image_folder: coalesce(irw.folder[0],''), channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} } as template_channel,primary OPTIONAL MATCH (technique:Class)<-[:is_specified_output_of]-(channel:Individual)-[irw:in_register_with]->(template:Individual)-[:depicts]->(primary) WHERE technique.short_form = 'FBbi_00000224' AND exists(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), symbol: coalesce(c.`IAO_0000028`[0], '')} , anatomical_individual: { short_form: ai.short_form, label: coalesce(ai.label,''), iri: ai.iri, types: labels(ai), symbol: coalesce(ai.`IAO_0000028`[0], '')} , folder: pd.irw.folder[0], 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[0], ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), symbol: coalesce(ds.`IAO_0000028`[0], '')} }, license: { icon : coalesce(l.license_logo[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }}) 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, template_channel, template_domains, dataset_license, parents, relationships OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Template' AS query, '58214d4' AS version , template_channel, template_domains, dataset_license, parents, relationships, xrefs, related_individuals", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "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:Class)<-[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, 'ca9ab19' AS version , template_channel, template_domains, dataset_license, parents, relationships, xrefs, related_individuals", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Template {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -525,7 +525,7 @@
name="Get JSON for pub"
description="Fetches JSON for pub."
runForCount="false"
- query=""statement": "MATCH (primary:Individual:pub) WHERE primary.short_form in [{ID}] WITH primary OPTIONAL MATCH (primary)-[:has_reference]-(ds:DataSet)-[:has_license]->(l:License) WITH COLLECT ({ dataset: { link : coalesce(ds.dataset_link[0], ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), symbol: coalesce(ds.`IAO_0000028`[0], '')} }, license: { icon : coalesce(l.license_logo[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }}) AS dataset_license,primary RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, '58214d4' AS version , dataset_license, {title: coalesce(primary.title[0], '') ,PubMed: coalesce(primary.PMID[0], ''), FlyBase: coalesce(primary.FlyBase[0], ''), DOI: coalesce(primary.DOI[0], '') }AS pub_specific_content", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "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", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:pub:Individual {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -535,7 +535,7 @@
name="Get JSON for DataSet"
description="Get JSON for DataSet"
runForCount="false"
- query=""statement": "MATCH (primary:DataSet) WHERE primary.short_form in [{ID}] WITH primary CALL apoc.cypher.run('WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]->(template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {primary:primary}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, primary 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) 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: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, anatomy_channel_image OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), 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[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }) 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), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } ) END AS pubs,primary,anatomy_channel_image,xrefs,license OPTIONAL MATCH (primary)<-[:has_source]-(i:Individual) WITH i, primary, anatomy_channel_image, xrefs, license, pubs OPTIONAL MATCH (i)-[:INSTANCEOF]-(c:Class) WITH DISTINCT { images: count(distinct i),types: count(distinct c) } as dataset_counts,primary,anatomy_channel_image,xrefs,license,pubs RETURN { link : coalesce(primary.dataset_link[0], ''), core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for DataSet' AS query, '58214d4' AS version , anatomy_channel_image, xrefs, license, pubs, dataset_counts", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:DataSet) 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, '2e501bd' AS version , anatomy_channel_image, xrefs, license, def_pubs", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:DataSet {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -545,7 +545,7 @@
name="Get JSON for License"
description="Get JSON for License"
runForCount="false"
- query=""statement": "MATCH (primary:License) WHERE primary.short_form in [{ID}] WITH primary RETURN { icon : coalesce(primary.license_logo[0], ''), link : coalesce(primary.license_url[0], ''), core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for License' AS query, '58214d4' AS version", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:License) 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, '2e501bd' AS version", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:License {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -555,7 +555,7 @@
name="Get JSON for Cluster"
description="Get JSON for Cluster"
runForCount="false"
- query=""statement": "MATCH (primary:Cluster) 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[0], ''), link : coalesce(l.license_url[0], ''), 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:Class)<-[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[0], 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[0], ''), 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[0], 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[0], ''), 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[0], index: coalesce(irw.index[0], []) + [] }}) 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, 'ca9ab19' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Cluster) 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:Class)<-[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, 'ca9ab19' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Cluster {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
diff --git a/tests/jest/vfb/batch3/tree-browser-tests.js b/tests/jest/vfb/batch3/tree-browser-tests.js
index cf36bff45..b9f1e9232 100644
--- a/tests/jest/vfb/batch3/tree-browser-tests.js
+++ b/tests/jest/vfb/batch3/tree-browser-tests.js
@@ -72,7 +72,7 @@ describe('VFB Tree Browser Component Tests', () => {
});
// Check that the Tree Browser is visible
- await wait4selector(page, 'div.rst__tree', { visible: true, timeout : 800000 });
+ await wait4selector(page, 'div.rst__tree', { visible: true, timeout : 500000 });
})
it('First node in Tree Browser is correctly named', async () => {
@@ -99,24 +99,15 @@ describe('VFB Tree Browser Component Tests', () => {
// Click on third node of tree browser, 'adult cerebral ganglion'
await page.evaluate(async () => document.getElementsByClassName("rst__rowContents rst__rowContentsDragDisabled")[2].click());
// Check tree now expanded with adult cerebral ganglion name
- let firstNode = await page.evaluate(async () => {
+ let thirdNode = await page.evaluate(async () => {
return document.getElementsByClassName("nodeSelected")[3].innerText;
});
- expect(firstNode).toEqual("adult protocerebrum");
+ expect(thirdNode).toEqual("adult optic lobe");
})
- it('Expand node "adult protocerebrum"', async () => {
- // Click on third node of tree browser, 'adult cerebral ganglion'
- await page.evaluate(async () => document.getElementsByClassName("rst__rowContents rst__rowContentsDragDisabled")[3].click());
- // Check tree now expanded with adult cerebral ganglion name
- let sixthNode = await page.evaluate(async () => {
- return document.getElementsByClassName("nodeSelected")[6].innerText;
- });
- expect(sixthNode).toEqual("adult optic lobe");
- })
it('Click on Node "adult optic lobe"', async () => {
- await page.evaluate(async () => document.getElementsByClassName("nodeSelected")[6].click());
+ await page.evaluate(async () => document.getElementsByClassName("nodeSelected")[3].click());
// Check Term Info is now populated with adult cerebral ganglion name
let element = await findElementByText(page, "adult optic lobe");
expect(element).toBe("adult optic lobe");
@@ -151,11 +142,11 @@ describe('VFB Tree Browser Component Tests', () => {
})
it('Click on "eye" icon to render "adult optic lobe" mesh', async () => {
- await page.evaluate(() => document.querySelectorAll('.rst__tree i.fa-eye-slash')[3].click());
+ await page.evaluate(() => document.querySelectorAll('.rst__tree i.fa-eye-slash')[1].click());
// Wait for 'color picker' selector to show, this is the sign that the click on the eye button worked and the mesh was rendered
- await wait4selector(page, 'i.fa-tint', { visible: true, timeout : 500000 });
+ await wait4selector(page, '.rst__tree i.fa-tint', { visible: true, timeout : 500000 });
})
-
+
it('Mesh for "adult optic lobe" rendered in canvas after clicking on eye icon next to node', async () => {
expect(
await page.evaluate(async () => CanvasContainer.engine.getRealMeshesForInstancePath('VFB_00030870.VFB_00030870_obj').length)
@@ -163,7 +154,7 @@ describe('VFB Tree Browser Component Tests', () => {
})
it('Color Picker Appears for "adult optic lobe"', async () => {
- await page.evaluate(async () => document.querySelectorAll('.rst__tree i.fa-tint')[0].click());
+ await page.evaluate(async () => document.querySelectorAll('.rst__tree i.fa-tint')[1].click());
// Wait for color picker to show
await wait4selector(page, '#tree-color-picker', { visible: true, timeout : 500000 })
})
diff --git a/tests/jest/vfb/batch2/layer-component-tests.js b/tests/jest/vfb/review/layer-component-tests.js
similarity index 100%
rename from tests/jest/vfb/batch2/layer-component-tests.js
rename to tests/jest/vfb/review/layer-component-tests.js
From 9b520e40821545767c807bce078136c566dd6061 Mon Sep 17 00:00:00 2001
From: Rob Court
Date: Thu, 15 Oct 2020 08:56:26 +0100
Subject: [PATCH 26/27] Revert "Revert "Merge pull request #690 from
VirtualFlyBrain/pipeline2""
This reverts commit 535873ab62d5f0974ab0194de1a0d19bf9881219.
---
.travis.yml | 60 +++++++++------
Dockerfile | 2 +-
components/VFBMain.js | 1 +
.../circuitBrowserConfiguration.js | 20 ++---
.../VFBGraph/graphConfiguration.js | 35 +++++----
components/configuration/VFBMain/colours.json | 2 +-
.../VFBMain/queryBuilderConfiguration.js | 15 +++-
.../VFBMain/searchConfiguration.js | 29 ++++++--
.../VFBTree/VFBTreeConfiguration.js | 16 ++--
css/VFBMain.less | 1 +
model/vfb.xmi | 74 +++++++++----------
.../layer-component-tests.js | 0
tests/jest/vfb/batch3/tree-browser-tests.js | 25 +++++--
13 files changed, 168 insertions(+), 112 deletions(-)
rename tests/jest/vfb/{review => batch2}/layer-component-tests.js (100%)
diff --git a/.travis.yml b/.travis.yml
index 7af7db28b..07732a67d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,21 +19,21 @@ services:
stages:
- build
- name: debug
- if: branch = vfb_geppetto_application OR branch =~ ^(fix|feature).*
+ if: branch = debug OR branch = pipeline2 OR branch =~ ^(fix|feature).*
- test
- deploy
- name: review
- if: branch = vfb_geppetto_application OR branch = development OR branch =~ ^(fix|feature).*
+ if: branch = debug OR branch = development OR branch = pipeline2 OR branch =~ ^(fix|feature).*
jobs:
fast_finish: true
allow_failures:
- - if: branch = vfb_geppetto_application OR branch = development
+ - if: branch = debug OR branch = development
name: review
include:
- stage: build
install:
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
@@ -57,6 +57,11 @@ jobs:
export VFB_R_SERVER=http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast;
export SOLR_SERVER=https://solr.virtualflybrain.org/solr/ontology/select;
fi;
+ export VFB_TREE_PDB_SERVER=https://pdb.p2.virtualflybrain.org;
+ export VFB_PDB_SERVER=http://pdb.p2.virtualflybrain.org;
+ export VFB_OWL_SERVER=http://owl.p2.virtualflybrain.org/kbs/vfb/;
+ export VFB_R_SERVER=http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast;
+ export SOLR_SERVER=https://solr.p2.virtualflybrain.org/solr/ontology/select;
- export TAG="$TAG-TEST"
before_script:
- docker login -u $DOCKER_USER -p $DOCKER_PASS;
@@ -71,7 +76,7 @@ jobs:
- stage: test
before_install:
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
@@ -111,7 +116,7 @@ jobs:
- stage: test
before_install:
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
@@ -151,7 +156,7 @@ jobs:
- stage: test
before_install:
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
@@ -191,7 +196,7 @@ jobs:
- stage: deploy
install:
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
@@ -215,29 +220,40 @@ jobs:
export VFB_TREE_PDB_SERVER=https://pdb.virtualflybrain.org;
export SOLR_SERVER=https://solr.virtualflybrain.org/solr/ontology/select;
fi;
+ export VFB_TREE_PDB_SERVER=https://pdb.p2.virtualflybrain.org;
+ export VFB_PDB_SERVER=http://pdb.p2.virtualflybrain.org;
+ export VFB_OWL_SERVER=http://owl.p2.virtualflybrain.org/kbs/vfb/;
+ export VFB_R_SERVER=http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast;
+ export SOLR_SERVER=https://solr.p2.virtualflybrain.org/solr/ontology/select;
docker build --cache-from metacell/java-virgo-maven:development -t=$REPO:$TAG.wss --build-arg VFB_TREE_PDB_SERVER_ARG=$VFB_TREE_PDB_SERVER --build-arg SOLR_SERVER_ARG=$SOLR_SERVER --build-arg VFB_R_SERVER_ARG=$VFB_R_SERVER --build-arg VFB_OWL_SERVER_ARG=$VFB_OWL_SERVER --build-arg VFB_PDB_SERVER_ARG=$VFB_PDB_SERVER --build-arg build_type=$BUILD_TYPE --build-arg targetBranch=$TRAVIS_BRANCH --build-arg originBranch=$BRANCH --build-arg defaultBranch=$DEFAULT_BRANCH --build-arg finalBuild=true $DOCKER_FOLDER && docker push $REPO:$TAG.wss;
fi;
- stage: debug
install:
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
+ - if [ "$BUILD_TYPE" == "development" ]; then export TAG=$TAG-development; fi;
- export VFB_PDB_SERVER=http://pdb:7474;
- export VFB_OWL_SERVER=http://owl:8080/kbs/vfb/;
- export VFB_R_SERVER=http://ocpu:80/ocpu/library/vfbr/R/vfb_nblast;
- - if [ "$BUILD_TYPE" == "development" ]; then
- export VFB_TREE_PDB_SERVER=https://pdb-dev.virtualflybrain.org;
- export SOLR_SERVER=https://solr-dev.virtualflybrain.org/solr/ontology/select;
- export TAG=$TAG-development;
- elif [ "$BUILD_TYPE" == "staging" ]; then
- export VFB_TREE_PDB_SERVER=https://pdb-alpha.virtualflybrain.org;
- export SOLR_SERVER=https://solr-alpha.virtualflybrain.org/solr/ontology/select;
- else
- export VFB_TREE_PDB_SERVER=https://pdb.virtualflybrain.org;
- export SOLR_SERVER=https://solr.virtualflybrain.org/solr/ontology/select;
- fi;
+ # - if [ "$BUILD_TYPE" == "development" ]; then
+ # export VFB_TREE_PDB_SERVER=https://pdb-dev.virtualflybrain.org;
+ # export SOLR_SERVER=https://solr-dev.virtualflybrain.org/solr/ontology/select;
+ # export TAG=$TAG-development;
+ # elif [ "$BUILD_TYPE" == "staging" ]; then
+ # export VFB_TREE_PDB_SERVER=https://pdb-alpha.virtualflybrain.org;
+ # export SOLR_SERVER=https://solr-alpha.virtualflybrain.org/solr/ontology/select;
+ # else
+ # export VFB_TREE_PDB_SERVER=https://pdb.virtualflybrain.org;
+ # export SOLR_SERVER=https://solr.virtualflybrain.org/solr/ontology/select;
+ # fi;
+ - export VFB_TREE_PDB_SERVER=https://pdb.p2.virtualflybrain.org;
+ - export VFB_PDB_SERVER=http://pdb.p2.virtualflybrain.org;
+ - export VFB_OWL_SERVER=http://owl.p2.virtualflybrain.org/kbs/vfb/;
+ - export VFB_R_SERVER=http://r.virtualflybrain.org/ocpu/library/vfbr/R/vfb_nblast;
+ - export SOLR_SERVER=https://solr.p2.virtualflybrain.org/solr/ontology/select;
before_script:
- cd $TRAVIS_BUILD_DIR;
- docker login -u $DOCKER_USER -p $DOCKER_PASS;
@@ -249,7 +265,7 @@ jobs:
- stage: review
before_install:
- if [ $(ls tests/jest/vfb/review/*.js | wc -l) -lt 1 ]; then travis_terminate 0; fi
- - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "vfb_geppetto_application" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
+ - export BUILD_TYPE=`if [ "$TRAVIS_BRANCH" == "debug" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "pipeline2" ]; then echo "development"; elif [ "$TRAVIS_BRANCH" == "development" ]; then echo "staging"; else echo "release"; fi`
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
@@ -285,4 +301,4 @@ jobs:
- echo -e "travis_fold:start:Cleanup" || true
- docker stop $(docker ps -a -q)
- docker rm $(docker ps -a -q)
- - echo -e "travis_fold:end:Cleanup" || true
\ No newline at end of file
+ - echo -e "travis_fold:end:Cleanup" || true
diff --git a/Dockerfile b/Dockerfile
index b3fea6831..9d81decc6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,7 +15,7 @@ ARG geppettoDatasourceRelease=vfb_20200604_a
ARG geppettoModelSwcRelease=v1.0.1
ARG geppettoFrontendRelease=development
ARG geppettoClientRelease=VFBv2.2.0.5
-ARG ukAcVfbGeppettoRelease=development
+ARG ukAcVfbGeppettoRelease=pipeline2
ARG mvnOpt="-Dhttps.protocols=TLSv1.2 -DskipTests --quiet -Pmaster"
diff --git a/components/VFBMain.js b/components/VFBMain.js
index 688c5925d..27fd1ebe4 100644
--- a/components/VFBMain.js
+++ b/components/VFBMain.js
@@ -913,6 +913,7 @@ class VFBMain extends React.Component {
focusTermRef={this.focusTermReference}
exclude={["ClassQueriesFrom", "Debug"]}
order={['Name',
+ 'Title',
'Label',
'Alternative Names',
'Types',
diff --git a/components/configuration/VFBCircuitBrowser/circuitBrowserConfiguration.js b/components/configuration/VFBCircuitBrowser/circuitBrowserConfiguration.js
index d71f2fc1b..35b522323 100644
--- a/components/configuration/VFBCircuitBrowser/circuitBrowserConfiguration.js
+++ b/components/configuration/VFBCircuitBrowser/circuitBrowserConfiguration.js
@@ -57,14 +57,6 @@ var styling = {
defaultNodeDescriptionBackgroundColor : "white",
nodeColorsByLabel : {
"Template" : "#ff6cc8",
- "DataSet" : "#b700b5",
- "Anatomy" : "#00a2aa",
- "Synaptic_neuropil" : "#00a2aa",
- "_Class" : "#0164d8",
- "License" : "#0164d8",
- "Person" : "#023f00",
- "Neuron" : "#7f2100",
- "Neuron_projection_bundle" : "#d6007d",
"Ganglion" : "#d6007d",
"Neuromere" : "#d6007d",
"GABAergic" : "#9551ff",
@@ -79,11 +71,19 @@ var styling = {
"Glial_cell" : "#ff6a3a",
"Cell" : "#ff6a3a",
"Clone" : "#d6007d",
- "Property" : "#005f1d",
+ "Synaptic_neuropil" : "#00a2aa",
+ "License" : "#0164d8",
+ "Person" : "#023f00",
+ "Neuron" : "#7f2100",
+ "Neuron_projection_bundle" : "#d6007d",
"Resource" : "#005f1d",
"Site" : "#005f1d",
"Expression_pattern" : "#534700",
- "Split" : "#e012e3"
+ "Split" : "#e012e3",
+ "DataSet" : "#b700b5",
+ "Anatomy" : "#00a2aa",
+ "Property" : "#005f1d",
+ "_Class" : "#0164d8"
},
controlIcons : {
home : "fa fa-home",
diff --git a/components/configuration/VFBGraph/graphConfiguration.js b/components/configuration/VFBGraph/graphConfiguration.js
index 8819d61f8..77d0b7037 100644
--- a/components/configuration/VFBGraph/graphConfiguration.js
+++ b/components/configuration/VFBGraph/graphConfiguration.js
@@ -1,9 +1,21 @@
var locationCypherQuery = instance => ({
"statements": [
{
- "statement": "MATCH p=(n:Entity)-[r:INSTANCEOF|part_of|has_synaptic_terminal_in|has_presynaptic_terminal_in"
- + "has_postsynaptic_terminal_in|overlaps*..]->(x)"
- + "WHERE n.short_form = '" + instance + "' return distinct n,r,x,n.short_form as root",
+ "statement": "MATCH p=(n:Entity {short_form:'" + instance + "'})-[r:INSTANCEOF|part_of|has_synaptic_terminal_in|has_presynaptic_terminal_in|"
+ + "has_postsynaptic_terminal_in|overlaps*..]->(x) "
+ + "RETURN distinct n,r,x,n.short_form as root",
+ "resultDataContents": ["graph"]
+ }
+ ]
+});
+
+var whatCypherQuery = instance => ({
+ "statements": [
+ {
+ "statement": "MATCH p=(n:Entity {short_form:'" + instance + "'})-[:INSTANCEOF|:SUBCLASSOF*..]->(x) "
+ + "WHERE (('Cell' IN labels(x)) OR ('synaptic neuropil' IN labels(x))) "
+ + " OR (('Ganglion' IN labels(x)) OR ('Neuron_projection_bundle' IN labels(x))) "
+ + "RETURN p, n.short_form as root",
"resultDataContents": ["graph"]
}
]
@@ -62,17 +74,7 @@ var styling = {
},
{
label : instance => "Show classification of " + instance,
- query : instance => ({
- "statements": [
- {
- "statement": "MATCH p=(n:Entity)-[:INSTANCEOF|:SUBCLASSOF*..]->(x)"
- + "WHERE 'Anatomy' IN labels(x)"
- + "AND n.short_form = '" + instance + "'"
- + "RETURN p, n.short_form as root",
- "resultDataContents": ["graph"]
- }
- ]
- })
+ query : instance => whatCypherQuery(instance)
}
],
dropDownHoverBackgroundColor : "#11bffe",
@@ -82,7 +84,7 @@ var styling = {
}
var restPostConfig = {
- url: "https://pdb.virtualflybrain.org/db/data/transaction/commit",
+ url: "https://pdb.p2.virtualflybrain.org/db/data/transaction/commit",
contentType: "application/json"
};
@@ -90,5 +92,6 @@ module.exports = {
configuration,
styling,
restPostConfig,
- locationCypherQuery
+ locationCypherQuery,
+ whatCypherQuery
};
diff --git a/components/configuration/VFBMain/colours.json b/components/configuration/VFBMain/colours.json
index 287f5ed53..a16bf2ea5 100644
--- a/components/configuration/VFBMain/colours.json
+++ b/components/configuration/VFBMain/colours.json
@@ -3,7 +3,6 @@
"0x00ff00",
"0xff00ff",
"0x0000ff",
- "0xffd300",
"0x0084f6",
"0x008d46",
"0xa7613e",
@@ -199,5 +198,6 @@
"0x8d35f6",
"0x5800a7",
"0xed8dff",
+ "0xffd300",
"0x969696"
]
diff --git a/components/configuration/VFBMain/queryBuilderConfiguration.js b/components/configuration/VFBMain/queryBuilderConfiguration.js
index 8de4bf6d9..c6eb2062f 100644
--- a/components/configuration/VFBMain/queryBuilderConfiguration.js
+++ b/components/configuration/VFBMain/queryBuilderConfiguration.js
@@ -25,6 +25,19 @@ var queryResultsColMeta = [
"cssClassName": "query-results-name-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
+ {
+ "columnName": "type",
+ "order": 2,
+ "locked": false,
+ "visible": true,
+ "customComponent": QueryLinkComponent,
+ "actions": "window.addVfbId('$entity$');",
+ "entityIndex": 1,
+ "entityDelimiter": "----",
+ "displayName": "Type",
+ "cssClassName": "query-results-type-column",
+ "sortDirectionCycle": ['asc', 'desc', null]
+ },
{
"columnName": "expressed_in",
"order": 3,
@@ -163,7 +176,7 @@ var queryResultsControlConfig = {
var queryBuilderDatasourceConfig = {
VFB: {
- url: "https://solr.virtualflybrain.org/solr/ontology/select?fl=short_form,label,synonym,id,type,has_narrow_synonym_annotation,has_broad_synonym_annotation&start=0&fq=type%3Aclass+OR+type%3Aindividual+OR+type%3Aproperty&fq=ontology_name:(vfb)&fq=shortform_autosuggest:VFB*%20OR%20shortform_autosuggest:FB*%20OR%20is_defining_ontology:true&rows=100&bq=is_obsolete:false%5E100.0%20shortform_autosuggest:VFB*%5E110.0%20shortform_autosuggest:FBbt*%5E100.0%20is_defining_ontology:true%5E100.0%20label_s:%22%22%5E2%20synonym_s:%22%22%20in_subset_annotation:BRAINNAME%5E3%20short_form:FBbt_00003982%5E2&q=$SEARCH_TERM$%20OR%20$SEARCH_TERM$*%20OR%20*$SEARCH_TERM$*&defType=edismax&qf=label%20synonym%20label_autosuggest_ws%20label_autosuggest_e%20label_autosuggest%20synonym_autosuggest_ws%20synonym_autosuggest_e%20synonym_autosuggest%20shortform_autosuggest%20has_narrow_synonym_annotation%20has_broad_synonym_annotation&wt=json&indent=true",
+ url: 'https://solr.p2.virtualflybrain.org/solr/ontology/select?q=$SEARCH_TERM$+OR+$SEARCH_TERM$*+OR+*$SEARCH_TERM$*&defType=edismax&qf=label^100+synonym^100+label_autosuggest_ws+label_autosuggest_e+label_autosuggest+synonym_autosuggest_ws+synonym_autosuggest+shortform_autosuggest&indent=true&fl=short_form+label+synonym+id+facets_annotation+type:"class"&start=0&pf=true&rows=100&wt=json&bq=shortform_autosuggest:VFB*^110.0+shortform_autosuggest:FBbt*^100.0+label_s:""^2+synonym_s:""+short_form=FBbt_00003982^2+facets_annotation:Deprecated^0.001',
crossDomain: true,
id: "short_form",
label: { field: "label", formatting: "$VALUE$" },
diff --git a/components/configuration/VFBMain/searchConfiguration.js b/components/configuration/VFBMain/searchConfiguration.js
index e7032751d..2b33818d5 100644
--- a/components/configuration/VFBMain/searchConfiguration.js
+++ b/components/configuration/VFBMain/searchConfiguration.js
@@ -84,23 +84,22 @@ var searchStyle = {
};
var datasourceConfiguration = {
- "url": "https://solr-dev.virtualflybrain.org/solr/ontology/select",
+ "url": "https://solr.p2.virtualflybrain.org/solr/ontology/select",
"query_settings":
{
"q": "$SEARCH_TERM$ OR $SEARCH_TERM$* OR *$SEARCH_TERM$*",
"defType": "edismax",
- "qf": "label synonym label_autosuggest_ws label_autosuggest_e label_autosuggest synonym_autosuggest_ws synonym_autosuggest_e synonym_autosuggest shortform_autosuggest has_narrow_synonym_annotation has_broad_synonym_annotation",
+ "qf": "label^100 synonym^100 label_autosuggest_ws label_autosuggest_e label_autosuggest synonym_autosuggest_ws synonym_autosuggest shortform_autosuggest",
"indent": "true",
- "fl": "short_form,label,synonym,id,type,has_narrow_synonym_annotation,has_broad_synonym_annotation,facets_annotation",
+ "fl": "short_form,label,synonym,id,facets_annotation",
"start": "0",
+ "pf":"true",
"fq": [
- "type:class OR type:individual OR type:property",
- "ontology_name:(vfb)",
- "shortform_autosuggest:VFB* OR shortform_autosuggest:FB* OR is_defining_ontology:true"
+ "shortform_autosuggest:VFB* OR shortform_autosuggest:FB*"
],
"rows": "100",
"wt": "json",
- "bq": "is_obsolete:false^100.0 shortform_autosuggest:VFB*^110.0 shortform_autosuggest:FBbt*^100.0 is_defining_ontology:true^100.0 label_s:\"\"^2 synonym_s:\"\" in_subset_annotation:BRAINNAME^3 short_form:FBbt_00003982^2"
+ "bq": "shortform_autosuggest:VFB*^110.0 shortform_autosuggest:FBbt*^100.0 label_s:\"\"^2 synonym_s:\"\" short_form:FBbt_00003982^2 facets_annotation:Deprecated^0.001"
}
};
@@ -113,7 +112,7 @@ var searchConfiguration = {
"filters": [
{
"key": "facets_annotation",
- "filter_name": "Type",
+ "filter_name": "Filters",
"type": "array",
"enabled": "disabled",
"disableGlobal": true,
@@ -177,6 +176,13 @@ var searchConfiguration = {
if (InputString == b.label) {
return 1;
}
+ // move exact matches to top ['XX ('ID/Label)]
+ if (a.label.indexOf(InputString + " (") == 0) {
+ return -1;
+ }
+ if (b.label.indexOf(InputString + " (") == 0) {
+ return 1;
+ }
// close match without case matching
if (InputString.toLowerCase() == a.label.toLowerCase()) {
return -1;
@@ -184,6 +190,13 @@ var searchConfiguration = {
if (InputString.toLowerCase() == b.label.toLowerCase()) {
return 1;
}
+ // close match without case matching ['xx ('ID/Label)]
+ if (a.label.toLowerCase().indexOf(InputString.toLowerCase()) == 0) {
+ return -1;
+ }
+ if (b.label.toLowerCase().indexOf(InputString.toLowerCase()) == 0) {
+ return 1;
+ }
// match ignoring joinging nonwords
if (InputString.toLowerCase().split(/\W+/).join(' ') == a.label.toLowerCase().split(/\W+/).join(' ')) {
return -1;
diff --git a/components/configuration/VFBTree/VFBTreeConfiguration.js b/components/configuration/VFBTree/VFBTreeConfiguration.js
index 00a4802ab..57d8f63af 100644
--- a/components/configuration/VFBTree/VFBTreeConfiguration.js
+++ b/components/configuration/VFBTree/VFBTreeConfiguration.js
@@ -1,15 +1,15 @@
var restPostConfig = {
- url: "https://pdb.virtualflybrain.org/db/data/transaction/commit",
+ url: "https://pdb.p2.virtualflybrain.org/db/data/transaction/commit",
contentType: "application/json"
};
var treeCypherQuery = instance => ({
"statements": [
{
- "statement": "MATCH (root:Class)<-[:INSTANCEOF]-(t:Individual {short_form:'" + instance + "'})"
- + "<-[:depicts]-(tc:Individual)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:"
- + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE has(ie.index) WITH root, anat,r,image"
- + " MATCH p=(root)<-[:SUBCLASSOF|part_of*..]-(anat) "
+ "statement": "MATCH (root:Class)<-[:INSTANCEOF]-(t:Template {short_form:'" + instance + "'})"
+ + "<-[:depicts]-(tc:Template)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:"
+ + "Individual)-[r:INSTANCEOF]->(anat:Class:Nervous_system) WHERE exists(ie.index) WITH root, anat,r,image"
+ + " MATCH p=allshortestpaths((root)<-[:SUBCLASSOF|part_of*..]-(anat)) "
+ "RETURN collect(distinct { node_id: id(anat), short_form: anat.short_form, image: image.short_form })"
+ " AS image_nodes, id(root) AS root, collect(p)",
"resultDataContents": ["row", "graph"]
@@ -32,7 +32,7 @@ var styling = {
{
"statement": "MATCH (root:Class)<-[:INSTANCEOF]-(t:Individual {short_form:'FBbt_00007145'})"
+ "<-[:depicts]-(tc:Individual)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:"
- + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE has(ie.index) WITH root, anat,r,image"
+ + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE exists(ie.index) WITH root, anat,r,image"
+ " MATCH p=allShortestPaths((root)<-[:SUBCLASSOF|part_of*..]-(anat)) "
+ "RETURN collect(distinct { node_id: id(anat), short_form: anat.short_form, image: image.short_form })"
+ " AS image_nodes, id(root) AS root, collect(p)",
@@ -48,7 +48,7 @@ var styling = {
{
"statement": "MATCH (root:Class)<-[:INSTANCEOF]-(t:Individual {short_form:'VFB_00017894'})"
+ "<-[:depicts]-(tc:Individual)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:"
- + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE has(ie.index) WITH root, anat,r,image"
+ + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE exists(ie.index) WITH root, anat,r,image"
+ " MATCH p=allShortestPaths((root)<-[:SUBCLASSOF|part_of*..]-(anat)) "
+ "RETURN collect(distinct { node_id: id(anat), short_form: anat.short_form, image: image.short_form })"
+ " AS image_nodes, id(root) AS root, collect(p)",
@@ -64,7 +64,7 @@ var styling = {
{
"statement": "MATCH (root:Class)<-[:INSTANCEOF]-(t:Individual {short_form:'FBbt_00007050'})"
+ "<-[:depicts]-(tc:Individual)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:"
- + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE has(ie.index) WITH root, anat,r,image"
+ + "Individual)-[r:INSTANCEOF]->(anat:Class) WHERE exists(ie.index) WITH root, anat,r,image"
+ " MATCH p=allShortestPaths((root)<-[:SUBCLASSOF|part_of*..]-(anat)) "
+ "RETURN collect(distinct { node_id: id(anat), short_form: anat.short_form, image: image.short_form })"
+ " AS image_nodes, id(root) AS root, collect(p)",
diff --git a/css/VFBMain.less b/css/VFBMain.less
index c426b6408..e17e5d2f4 100644
--- a/css/VFBMain.less
+++ b/css/VFBMain.less
@@ -1662,3 +1662,4 @@
-o-user-select: text;
user-select: text;
}
+
diff --git a/model/vfb.xmi b/model/vfb.xmi
index 8dbb71010..d78879c05 100644
--- a/model/vfb.xmi
+++ b/model/vfb.xmi
@@ -168,15 +168,15 @@
runForCount="false">
+ queryProcessorId="neo4jQueryProcessor"/>
+ queryProcessorId="neo4jQueryProcessor"/>
+ query=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual)-[:INSTANCEOF]->(d:Class) WHERE exists(r.index) RETURN distinct di.short_form as id, di.label as name, coalesce(di.description[0],d.description[0]) as def, COLLECT(DISTINCT d.label) as type, replace(r.folder[0],'http:','https:') + '/thumbnailT.png' as file", "parameters" : { "ID" : "$ID" }"
+ countQuery=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual)-[:INSTANCEOF]->(d:Class) WHERE exists(r.index) RETURN count(di) as count", "parameters" : { "ID" : "$ID" }"/>
+ query=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual) WHERE not exists(r.index) OPTIONAL MATCH (di)-[:INSTANCEOF]->(d:Class) RETURN distinct di.short_form as id, di.label as name, coalesce(di.description[0],d.description[0]) as def, COLLECT(DISTINCT d.label) as type, replace(r.folder[0],'http:','https:') + '/thumbnailT.png' as file", "parameters" : { "ID" : "$ID" }"
+ countQuery=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual) WHERE not exists(r.index) RETURN count(di) as count", "parameters" : { "ID" : "$ID" }"/>
+ query=""statement": "MATCH (ep:Expression_pattern:Class)<-[ar:overlaps|part_of]-(anoni:Individual)-[:INSTANCEOF]->(anat:Class) WHERE ep.short_form in {ARRAY_ID_RESULTS} WITH anoni, anat, ar OPTIONAL MATCH (p:pub { short_form: ar.pub}) WITH anat, anoni, { core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } AS pub OPTIONAL MATCH (anoni)-[r:Related]->(o:FBdv) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS stages ,anoni,anat,pub CALL apoc.cypher.run('WITH anat OPTIONAL MATCH (anat:Synaptic_neuropil)<- [:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]- (channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]-> (template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {anat:anat}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, anoni, anat, pub, stages 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) END AS anatomy_channel_image ,anoni,anat,pub,stages RETURN { short_form: anat.short_form, label: coalesce(anat.label,''), iri: anat.iri, types: labels(anat), symbol: coalesce(anat.`IAO_0000028`[0], '')} AS anatomy, 'Get JSON for ep_2_anat query' AS query, '58214d4' AS version , pub, stages, anatomy_channel_image", "parameters" : { "ARRAY_ID_RESULTS" : $ARRAY_ID_RESULTS}"
+ countQuery=""statement": "MATCH (ep:Expression_pattern:Class)<-[ar:overlaps|part_of]-(anoni:Individual)-[:INSTANCEOF]->(anat:Class) WHERE ep.short_form in {ARRAY_ID_RESULTS} RETURN count(anat) as count", "parameters" : { "ARRAY_ID_RESULTS" : $ARRAY_ID_RESULTS}"/>
+ query=""statement": "MATCH (ep:Class:Expression_pattern)<-[ar:overlaps|part_of]-(:Individual)-[:INSTANCEOF]->(anat:Class) WHERE anat.short_form in {ARRAY_ID_RESULTS} WITH DISTINCT collect(DISTINCT ar.pub) as pubs, anat, ep UNWIND pubs as p MATCH (pub:pub { short_form: p}) WITH DISTINCT collect(DISTINCT ar.pub) as pubs, anat, ep UNWIND pubs as p MATCH (pub:pub { short_form: p}) WITH anat, ep, collect({ core: { short_form: pub.short_form, label: coalesce(pub.label,''), iri: pub.iri, types: labels(pub), symbol: coalesce(pub.`IAO_0000028`[0], '')} , PubMed: coalesce(pub.PMID[0], ''), FlyBase: coalesce(pub.FlyBase[0], ''), DOI: coalesce(pub.DOI[0], '') }) as pubs CALL apoc.cypher.run('WITH ep OPTIONAL MATCH (ep)<- [:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]- (channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]-> (template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {ep:ep}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, anat, ep, pubs 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) END AS anatomy_channel_image ,anat,ep,pubs RETURN { short_form: anat.short_form, label: coalesce(anat.label,''), iri: anat.iri, types: labels(anat), symbol: coalesce(anat.`IAO_0000028`[0], '')} as anatomy, { short_form: ep.short_form, label: coalesce(ep.label,''), iri: ep.iri, types: labels(ep), symbol: coalesce(ep.`IAO_0000028`[0], '')} AS expression_pattern, 'Get JSON for anat_2_ep query' AS query, '58214d4' AS version , pubs, anatomy_channel_image", "parameters" : { "ARRAY_ID_RESULTS" : $ARRAY_ID_RESULTS}"
+ countQuery=""statement": "MATCH (ep:Class:Expression_pattern)<-[ar:overlaps|part_of]-(anoni:Individual)-[:INSTANCEOF]->(anat:Class) WHERE ep.short_form in {ARRAY_ID_RESULTS} RETURN count(anat) as count", "parameters" : { "ARRAY_ID_RESULTS" : $ARRAY_ID_RESULTS}" />
@@ -485,7 +485,7 @@
name="Get JSON for Neuron Class"
description="Get JSON for Neuron Class"
runForCount="false"
- query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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 OPTIONAL MATCH (o:Class)<-[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,parents 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,parents,relationships 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, parents, relationships, related_individuals 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,parents,relationships,related_individuals 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, parents, relationships, related_individuals, xrefs , 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,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'syn'}]->(p:pub) WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { 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, '') } , synonym: { label: coalesce(rp.synonym, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.cat,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'def'}]->(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,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(ep:Class)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(primary) WITH COLLECT({ short_form: ep.short_form, label: coalesce(ep.label,''), iri: ep.iri, types: labels(ep) } ) as targeting_splits,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs 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 Neuron Class' AS query, '2e501bd' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, targeting_splits", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS relationships ,primary,parents OPTIONAL MATCH (o:Individual)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS related_individuals ,primary,parents,relationships OPTIONAL MATCH (s:Site { short_form: primary.self_xref }) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, parents, relationships, related_individuals OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) + self_xref END AS xrefs,primary,parents,relationships,related_individuals CALL apoc.cypher.run('WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]->(template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {primary:primary}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, primary, parents, relationships, related_individuals, xrefs 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) END AS anatomy_channel_image ,primary,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) where rp.typ = 'syn' WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } , synonym: { label: coalesce(rp.value, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.has_synonym_type,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) WHERE rp.typ = 'def' 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), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } ) END AS def_pubs,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(ep:Class)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(primary) WITH CASE WHEN ep IS NULL THEN [] ELSE COLLECT({ short_form: ep.short_form, label: coalesce(ep.label,''), iri: ep.iri, types: labels(ep), symbol: coalesce(ep.`IAO_0000028`[0], '')} ) END AS targeting_splits,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Neuron Class' AS query, '58214d4' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, targeting_splits", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Class {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -495,7 +495,7 @@
name="Get JSON for Split Class"
description="Get JSON for Split Class"
runForCount="false"
- query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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 OPTIONAL MATCH (o:Class)<-[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,parents 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,parents,relationships 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, parents, relationships, related_individuals 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,parents,relationships,related_individuals 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, parents, relationships, related_individuals, xrefs , 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,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'syn'}]->(p:pub) WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { 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, '') } , synonym: { label: coalesce(rp.synonym, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.cat,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'def'}]->(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,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(primary)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(n:Neuron) WITH COLLECT({ short_form: n.short_form, label: coalesce(n.label,''), iri: n.iri, types: labels(n) } ) as target_neurons,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs 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 Split Class' AS query, '2e501bd' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, target_neurons", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS relationships ,primary,parents OPTIONAL MATCH (o:Individual)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS related_individuals ,primary,parents,relationships OPTIONAL MATCH (s:Site { short_form: primary.self_xref }) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, parents, relationships, related_individuals OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) + self_xref END AS xrefs,primary,parents,relationships,related_individuals CALL apoc.cypher.run('WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]->(template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {primary:primary}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, primary, parents, relationships, related_individuals, xrefs 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) END AS anatomy_channel_image ,primary,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) where rp.typ = 'syn' WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } , synonym: { label: coalesce(rp.value, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.has_synonym_type,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) WHERE rp.typ = 'def' 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), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } ) END AS def_pubs,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(primary)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(n:Neuron) WITH CASE WHEN n IS NULL THEN [] ELSE COLLECT({ short_form: n.short_form, label: coalesce(n.label,''), iri: n.iri, types: labels(n), symbol: coalesce(n.`IAO_0000028`[0], '')} ) END AS target_neurons,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Split Class' AS query, '58214d4' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, target_neurons", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Class {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -505,7 +505,7 @@
name="Get JSON for Individual"
description="Get JSON for Individual:Anatomy"
runForCount="false"
- query=""statement": "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:Class)<-[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, 'ca9ab19' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "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[0], ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), symbol: coalesce(ds.`IAO_0000028`[0], '')} }, license: { icon : coalesce(l.license_logo[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }}) 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, dataset_license, parents, relationships OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), 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), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }}) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Individual:Anatomy' AS query, '58214d4' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Individual {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -515,7 +515,7 @@
name="Get JSON for Template"
description="Get JSON for Template"
runForCount="false"
- query=""statement": "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:Class)<-[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, 'ca9ab19' AS version , template_channel, template_domains, dataset_license, parents, relationships, xrefs, related_individuals", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "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(apoc.convert.toInteger(irw.index), []) + [], extent: irw.extent[0], center: irw.center[0], voxel: irw.voxel[0], orientation: coalesce(irw.orientation[0], ''), image_folder: coalesce(irw.folder[0],''), channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} } as template_channel,primary OPTIONAL MATCH (technique:Class)<-[:is_specified_output_of]-(channel:Individual)-[irw:in_register_with]->(template:Individual)-[:depicts]->(primary) WHERE technique.short_form = 'FBbi_00000224' AND exists(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), symbol: coalesce(c.`IAO_0000028`[0], '')} , anatomical_individual: { short_form: ai.short_form, label: coalesce(ai.label,''), iri: ai.iri, types: labels(ai), symbol: coalesce(ai.`IAO_0000028`[0], '')} , folder: pd.irw.folder[0], 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[0], ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), symbol: coalesce(ds.`IAO_0000028`[0], '')} }, license: { icon : coalesce(l.license_logo[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }}) 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, template_channel, template_domains, dataset_license, parents, relationships OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Template' AS query, '58214d4' AS version , template_channel, template_domains, dataset_license, parents, relationships, xrefs, related_individuals", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Template {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -525,7 +525,7 @@
name="Get JSON for pub"
description="Fetches JSON for pub."
runForCount="false"
- query=""statement": "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", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Individual:pub) WHERE primary.short_form in [{ID}] WITH primary OPTIONAL MATCH (primary)-[:has_reference]-(ds:DataSet)-[:has_license]->(l:License) WITH COLLECT ({ dataset: { link : coalesce(ds.dataset_link[0], ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), symbol: coalesce(ds.`IAO_0000028`[0], '')} }, license: { icon : coalesce(l.license_logo[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }}) AS dataset_license,primary RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, '58214d4' AS version , dataset_license, {title: coalesce(primary.title[0], '') ,PubMed: coalesce(primary.PMID[0], ''), FlyBase: coalesce(primary.FlyBase[0], ''), DOI: coalesce(primary.DOI[0], '') }AS pub_specific_content", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:pub:Individual {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -535,7 +535,7 @@
name="Get JSON for DataSet"
description="Get JSON for DataSet"
runForCount="false"
- query=""statement": "MATCH (primary:DataSet) 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, '2e501bd' AS version , anatomy_channel_image, xrefs, license, def_pubs", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:DataSet) WHERE primary.short_form in [{ID}] WITH primary CALL apoc.cypher.run('WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]->(template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {primary:primary}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, primary 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) 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: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, anatomy_channel_image OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), 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[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }) 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), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } ) END AS pubs,primary,anatomy_channel_image,xrefs,license OPTIONAL MATCH (primary)<-[:has_source]-(i:Individual) WITH i, primary, anatomy_channel_image, xrefs, license, pubs OPTIONAL MATCH (i)-[:INSTANCEOF]-(c:Class) WITH DISTINCT { images: count(distinct i),types: count(distinct c) } as dataset_counts,primary,anatomy_channel_image,xrefs,license,pubs RETURN { link : coalesce(primary.dataset_link[0], ''), core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for DataSet' AS query, '58214d4' AS version , anatomy_channel_image, xrefs, license, pubs, dataset_counts", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:DataSet {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -545,7 +545,7 @@
name="Get JSON for License"
description="Get JSON for License"
runForCount="false"
- query=""statement": "MATCH (primary:License) 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, '2e501bd' AS version", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:License) WHERE primary.short_form in [{ID}] WITH primary RETURN { icon : coalesce(primary.license_logo[0], ''), link : coalesce(primary.license_url[0], ''), core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for License' AS query, '58214d4' AS version", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:License {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -555,7 +555,7 @@
name="Get JSON for Cluster"
description="Get JSON for Cluster"
runForCount="false"
- query=""statement": "MATCH (primary:Cluster) 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:Class)<-[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, 'ca9ab19' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Cluster) 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[0], ''), link : coalesce(l.license_url[0], ''), 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:Class)<-[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[0], 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[0], ''), 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[0], 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[0], ''), 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[0], index: coalesce(irw.index[0], []) + [] }}) 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, 'ca9ab19' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Cluster {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
diff --git a/tests/jest/vfb/review/layer-component-tests.js b/tests/jest/vfb/batch2/layer-component-tests.js
similarity index 100%
rename from tests/jest/vfb/review/layer-component-tests.js
rename to tests/jest/vfb/batch2/layer-component-tests.js
diff --git a/tests/jest/vfb/batch3/tree-browser-tests.js b/tests/jest/vfb/batch3/tree-browser-tests.js
index b9f1e9232..cf36bff45 100644
--- a/tests/jest/vfb/batch3/tree-browser-tests.js
+++ b/tests/jest/vfb/batch3/tree-browser-tests.js
@@ -72,7 +72,7 @@ describe('VFB Tree Browser Component Tests', () => {
});
// Check that the Tree Browser is visible
- await wait4selector(page, 'div.rst__tree', { visible: true, timeout : 500000 });
+ await wait4selector(page, 'div.rst__tree', { visible: true, timeout : 800000 });
})
it('First node in Tree Browser is correctly named', async () => {
@@ -99,15 +99,24 @@ describe('VFB Tree Browser Component Tests', () => {
// Click on third node of tree browser, 'adult cerebral ganglion'
await page.evaluate(async () => document.getElementsByClassName("rst__rowContents rst__rowContentsDragDisabled")[2].click());
// Check tree now expanded with adult cerebral ganglion name
- let thirdNode = await page.evaluate(async () => {
+ let firstNode = await page.evaluate(async () => {
return document.getElementsByClassName("nodeSelected")[3].innerText;
});
- expect(thirdNode).toEqual("adult optic lobe");
+ expect(firstNode).toEqual("adult protocerebrum");
})
+ it('Expand node "adult protocerebrum"', async () => {
+ // Click on third node of tree browser, 'adult cerebral ganglion'
+ await page.evaluate(async () => document.getElementsByClassName("rst__rowContents rst__rowContentsDragDisabled")[3].click());
+ // Check tree now expanded with adult cerebral ganglion name
+ let sixthNode = await page.evaluate(async () => {
+ return document.getElementsByClassName("nodeSelected")[6].innerText;
+ });
+ expect(sixthNode).toEqual("adult optic lobe");
+ })
it('Click on Node "adult optic lobe"', async () => {
- await page.evaluate(async () => document.getElementsByClassName("nodeSelected")[3].click());
+ await page.evaluate(async () => document.getElementsByClassName("nodeSelected")[6].click());
// Check Term Info is now populated with adult cerebral ganglion name
let element = await findElementByText(page, "adult optic lobe");
expect(element).toBe("adult optic lobe");
@@ -142,11 +151,11 @@ describe('VFB Tree Browser Component Tests', () => {
})
it('Click on "eye" icon to render "adult optic lobe" mesh', async () => {
- await page.evaluate(() => document.querySelectorAll('.rst__tree i.fa-eye-slash')[1].click());
+ await page.evaluate(() => document.querySelectorAll('.rst__tree i.fa-eye-slash')[3].click());
// Wait for 'color picker' selector to show, this is the sign that the click on the eye button worked and the mesh was rendered
- await wait4selector(page, '.rst__tree i.fa-tint', { visible: true, timeout : 500000 });
+ await wait4selector(page, 'i.fa-tint', { visible: true, timeout : 500000 });
})
-
+
it('Mesh for "adult optic lobe" rendered in canvas after clicking on eye icon next to node', async () => {
expect(
await page.evaluate(async () => CanvasContainer.engine.getRealMeshesForInstancePath('VFB_00030870.VFB_00030870_obj').length)
@@ -154,7 +163,7 @@ describe('VFB Tree Browser Component Tests', () => {
})
it('Color Picker Appears for "adult optic lobe"', async () => {
- await page.evaluate(async () => document.querySelectorAll('.rst__tree i.fa-tint')[1].click());
+ await page.evaluate(async () => document.querySelectorAll('.rst__tree i.fa-tint')[0].click());
// Wait for color picker to show
await wait4selector(page, '#tree-color-picker', { visible: true, timeout : 500000 })
})
From f7be3e74a85b0e379e7718a73190493b01bdd5d2 Mon Sep 17 00:00:00 2001
From: Rob Court
Date: Thu, 15 Oct 2020 08:59:40 +0100
Subject: [PATCH 27/27] Revert "merge development and overwrite development
branch vfb.xmi"
This reverts commit a497f6b09aed1ccc7b25b0c821bfa2a3f5dfcd64.
---
model/vfb.xmi | 74 +++++++++++++++++++++++++--------------------------
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/model/vfb.xmi b/model/vfb.xmi
index 8dbb71010..d78879c05 100644
--- a/model/vfb.xmi
+++ b/model/vfb.xmi
@@ -168,15 +168,15 @@
runForCount="false">
+ queryProcessorId="neo4jQueryProcessor"/>
+ queryProcessorId="neo4jQueryProcessor"/>
+ query=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual)-[:INSTANCEOF]->(d:Class) WHERE exists(r.index) RETURN distinct di.short_form as id, di.label as name, coalesce(di.description[0],d.description[0]) as def, COLLECT(DISTINCT d.label) as type, replace(r.folder[0],'http:','https:') + '/thumbnailT.png' as file", "parameters" : { "ID" : "$ID" }"
+ countQuery=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual)-[:INSTANCEOF]->(d:Class) WHERE exists(r.index) RETURN count(di) as count", "parameters" : { "ID" : "$ID" }"/>
+ query=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual) WHERE not exists(r.index) OPTIONAL MATCH (di)-[:INSTANCEOF]->(d:Class) RETURN distinct di.short_form as id, di.label as name, coalesce(di.description[0],d.description[0]) as def, COLLECT(DISTINCT d.label) as type, replace(r.folder[0],'http:','https:') + '/thumbnailT.png' as file", "parameters" : { "ID" : "$ID" }"
+ countQuery=""statement": "MATCH (n:Template {short_form:{ID}})<-[:depicts]-(:Template)<-[r:in_register_with]-(dc:Individual)-[:depicts]->(di:Individual) WHERE not exists(r.index) RETURN count(di) as count", "parameters" : { "ID" : "$ID" }"/>
+ query=""statement": "MATCH (ep:Expression_pattern:Class)<-[ar:overlaps|part_of]-(anoni:Individual)-[:INSTANCEOF]->(anat:Class) WHERE ep.short_form in {ARRAY_ID_RESULTS} WITH anoni, anat, ar OPTIONAL MATCH (p:pub { short_form: ar.pub}) WITH anat, anoni, { core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } AS pub OPTIONAL MATCH (anoni)-[r:Related]->(o:FBdv) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS stages ,anoni,anat,pub CALL apoc.cypher.run('WITH anat OPTIONAL MATCH (anat:Synaptic_neuropil)<- [:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]- (channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]-> (template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {anat:anat}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, anoni, anat, pub, stages 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) END AS anatomy_channel_image ,anoni,anat,pub,stages RETURN { short_form: anat.short_form, label: coalesce(anat.label,''), iri: anat.iri, types: labels(anat), symbol: coalesce(anat.`IAO_0000028`[0], '')} AS anatomy, 'Get JSON for ep_2_anat query' AS query, '58214d4' AS version , pub, stages, anatomy_channel_image", "parameters" : { "ARRAY_ID_RESULTS" : $ARRAY_ID_RESULTS}"
+ countQuery=""statement": "MATCH (ep:Expression_pattern:Class)<-[ar:overlaps|part_of]-(anoni:Individual)-[:INSTANCEOF]->(anat:Class) WHERE ep.short_form in {ARRAY_ID_RESULTS} RETURN count(anat) as count", "parameters" : { "ARRAY_ID_RESULTS" : $ARRAY_ID_RESULTS}"/>
+ query=""statement": "MATCH (ep:Class:Expression_pattern)<-[ar:overlaps|part_of]-(:Individual)-[:INSTANCEOF]->(anat:Class) WHERE anat.short_form in {ARRAY_ID_RESULTS} WITH DISTINCT collect(DISTINCT ar.pub) as pubs, anat, ep UNWIND pubs as p MATCH (pub:pub { short_form: p}) WITH DISTINCT collect(DISTINCT ar.pub) as pubs, anat, ep UNWIND pubs as p MATCH (pub:pub { short_form: p}) WITH anat, ep, collect({ core: { short_form: pub.short_form, label: coalesce(pub.label,''), iri: pub.iri, types: labels(pub), symbol: coalesce(pub.`IAO_0000028`[0], '')} , PubMed: coalesce(pub.PMID[0], ''), FlyBase: coalesce(pub.FlyBase[0], ''), DOI: coalesce(pub.DOI[0], '') }) as pubs CALL apoc.cypher.run('WITH ep OPTIONAL MATCH (ep)<- [:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]- (channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]-> (template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {ep:ep}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, anat, ep, pubs 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) END AS anatomy_channel_image ,anat,ep,pubs RETURN { short_form: anat.short_form, label: coalesce(anat.label,''), iri: anat.iri, types: labels(anat), symbol: coalesce(anat.`IAO_0000028`[0], '')} as anatomy, { short_form: ep.short_form, label: coalesce(ep.label,''), iri: ep.iri, types: labels(ep), symbol: coalesce(ep.`IAO_0000028`[0], '')} AS expression_pattern, 'Get JSON for anat_2_ep query' AS query, '58214d4' AS version , pubs, anatomy_channel_image", "parameters" : { "ARRAY_ID_RESULTS" : $ARRAY_ID_RESULTS}"
+ countQuery=""statement": "MATCH (ep:Class:Expression_pattern)<-[ar:overlaps|part_of]-(anoni:Individual)-[:INSTANCEOF]->(anat:Class) WHERE ep.short_form in {ARRAY_ID_RESULTS} RETURN count(anat) as count", "parameters" : { "ARRAY_ID_RESULTS" : $ARRAY_ID_RESULTS}" />
@@ -485,7 +485,7 @@
name="Get JSON for Neuron Class"
description="Get JSON for Neuron Class"
runForCount="false"
- query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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 OPTIONAL MATCH (o:Class)<-[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,parents 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,parents,relationships 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, parents, relationships, related_individuals 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,parents,relationships,related_individuals 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, parents, relationships, related_individuals, xrefs , 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,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'syn'}]->(p:pub) WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { 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, '') } , synonym: { label: coalesce(rp.synonym, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.cat,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'def'}]->(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,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(ep:Class)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(primary) WITH COLLECT({ short_form: ep.short_form, label: coalesce(ep.label,''), iri: ep.iri, types: labels(ep) } ) as targeting_splits,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs 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 Neuron Class' AS query, '2e501bd' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, targeting_splits", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS relationships ,primary,parents OPTIONAL MATCH (o:Individual)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS related_individuals ,primary,parents,relationships OPTIONAL MATCH (s:Site { short_form: primary.self_xref }) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, parents, relationships, related_individuals OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) + self_xref END AS xrefs,primary,parents,relationships,related_individuals CALL apoc.cypher.run('WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]->(template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {primary:primary}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, primary, parents, relationships, related_individuals, xrefs 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) END AS anatomy_channel_image ,primary,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) where rp.typ = 'syn' WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } , synonym: { label: coalesce(rp.value, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.has_synonym_type,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) WHERE rp.typ = 'def' 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), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } ) END AS def_pubs,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(ep:Class)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(primary) WITH CASE WHEN ep IS NULL THEN [] ELSE COLLECT({ short_form: ep.short_form, label: coalesce(ep.label,''), iri: ep.iri, types: labels(ep), symbol: coalesce(ep.`IAO_0000028`[0], '')} ) END AS targeting_splits,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Neuron Class' AS query, '58214d4' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, targeting_splits", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Class {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -495,7 +495,7 @@
name="Get JSON for Split Class"
description="Get JSON for Split Class"
runForCount="false"
- query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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 OPTIONAL MATCH (o:Class)<-[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,parents 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,parents,relationships 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, parents, relationships, related_individuals 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,parents,relationships,related_individuals 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, parents, relationships, related_individuals, xrefs , 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,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'syn'}]->(p:pub) WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { 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, '') } , synonym: { label: coalesce(rp.synonym, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.cat,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference { typ: 'def'}]->(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,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(primary)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(n:Neuron) WITH COLLECT({ short_form: n.short_form, label: coalesce(n.label,''), iri: n.iri, types: labels(n) } ) as target_neurons,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs 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 Split Class' AS query, '2e501bd' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, target_neurons", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Class) WHERE primary.short_form in [{ID}] WITH 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS relationships ,primary,parents OPTIONAL MATCH (o:Individual)<-[r {type:'Related'}]-(primary) WITH CASE WHEN o IS NULL THEN [] ELSE COLLECT ({ relation: { label: r.label, iri: r.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) END AS related_individuals ,primary,parents,relationships OPTIONAL MATCH (s:Site { short_form: primary.self_xref }) WITH CASE WHEN s IS NULL THEN [] ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, parents, relationships, related_individuals OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) + self_xref END AS xrefs,primary,parents,relationships,related_individuals CALL apoc.cypher.run('WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]->(template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {primary:primary}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, primary, parents, relationships, related_individuals, xrefs 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) END AS anatomy_channel_image ,primary,parents,relationships,related_individuals,xrefs OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) where rp.typ = 'syn' WITH CASE WHEN p is null THEN [] ELSE collect({ pub: { core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } , synonym: { label: coalesce(rp.value, ''), scope: coalesce(rp.scope, ''), type: coalesce(rp.has_synonym_type,'') } }) END AS pub_syn,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image OPTIONAL MATCH (primary)-[rp:has_reference]->(p:pub) WHERE rp.typ = 'def' 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), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } ) END AS def_pubs,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn OPTIONAL MATCH (:Class { label: 'intersectional expression pattern'})<-[:SUBCLASSOF]-(primary)<-[ar:part_of]-(anoni:Individual)-[:INSTANCEOF]->(n:Neuron) WITH CASE WHEN n IS NULL THEN [] ELSE COLLECT({ short_form: n.short_form, label: coalesce(n.label,''), iri: n.iri, types: labels(n), symbol: coalesce(n.`IAO_0000028`[0], '')} ) END AS target_neurons,primary,parents,relationships,related_individuals,xrefs,anatomy_channel_image,pub_syn,def_pubs RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Split Class' AS query, '58214d4' AS version , parents, relationships, related_individuals, xrefs, anatomy_channel_image, pub_syn, def_pubs, target_neurons", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Class {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -505,7 +505,7 @@
name="Get JSON for Individual"
description="Get JSON for Individual:Anatomy"
runForCount="false"
- query=""statement": "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:Class)<-[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, 'ca9ab19' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "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[0], ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), symbol: coalesce(ds.`IAO_0000028`[0], '')} }, license: { icon : coalesce(l.license_logo[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }}) 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, dataset_license, parents, relationships OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), 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), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }}) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Individual:Anatomy' AS query, '58214d4' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Individual {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -515,7 +515,7 @@
name="Get JSON for Template"
description="Get JSON for Template"
runForCount="false"
- query=""statement": "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:Class)<-[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, 'ca9ab19' AS version , template_channel, template_domains, dataset_license, parents, relationships, xrefs, related_individuals", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "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(apoc.convert.toInteger(irw.index), []) + [], extent: irw.extent[0], center: irw.center[0], voxel: irw.voxel[0], orientation: coalesce(irw.orientation[0], ''), image_folder: coalesce(irw.folder[0],''), channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} } as template_channel,primary OPTIONAL MATCH (technique:Class)<-[:is_specified_output_of]-(channel:Individual)-[irw:in_register_with]->(template:Individual)-[:depicts]->(primary) WHERE technique.short_form = 'FBbi_00000224' AND exists(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), symbol: coalesce(c.`IAO_0000028`[0], '')} , anatomical_individual: { short_form: ai.short_form, label: coalesce(ai.label,''), iri: ai.iri, types: labels(ai), symbol: coalesce(ai.`IAO_0000028`[0], '')} , folder: pd.irw.folder[0], 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[0], ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), symbol: coalesce(ds.`IAO_0000028`[0], '')} }, license: { icon : coalesce(l.license_logo[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }}) 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), symbol: coalesce(o.`IAO_0000028`[0], '')} ) 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, template_channel, template_domains, dataset_license, parents, relationships OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), 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.iri, type: type(r) } , object: { short_form: o.short_form, label: coalesce(o.label,''), iri: o.iri, types: labels(o), symbol: coalesce(o.`IAO_0000028`[0], '')} }) 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), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for Template' AS query, '58214d4' AS version , template_channel, template_domains, dataset_license, parents, relationships, xrefs, related_individuals", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Template {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -525,7 +525,7 @@
name="Get JSON for pub"
description="Fetches JSON for pub."
runForCount="false"
- query=""statement": "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", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Individual:pub) WHERE primary.short_form in [{ID}] WITH primary OPTIONAL MATCH (primary)-[:has_reference]-(ds:DataSet)-[:has_license]->(l:License) WITH COLLECT ({ dataset: { link : coalesce(ds.dataset_link[0], ''), core : { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), symbol: coalesce(ds.`IAO_0000028`[0], '')} }, license: { icon : coalesce(l.license_logo[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }}) AS dataset_license,primary RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, '58214d4' AS version , dataset_license, {title: coalesce(primary.title[0], '') ,PubMed: coalesce(primary.PMID[0], ''), FlyBase: coalesce(primary.FlyBase[0], ''), DOI: coalesce(primary.DOI[0], '') }AS pub_specific_content", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:pub:Individual {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -535,7 +535,7 @@
name="Get JSON for DataSet"
description="Get JSON for DataSet"
runForCount="false"
- query=""statement": "MATCH (primary:DataSet) 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, '2e501bd' AS version , anatomy_channel_image, xrefs, license, def_pubs", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:DataSet) WHERE primary.short_form in [{ID}] WITH primary CALL apoc.cypher.run('WITH primary OPTIONAL MATCH (primary)<-[:has_source|SUBCLASSOF|INSTANCEOF*]-(i:Individual)<-[:depicts]-(channel:Individual)-[irw:in_register_with] ->(template:Individual)-[:depicts]->(template_anat:Individual) RETURN template, channel, template_anat, i, irw limit 5', {primary:primary}) yield value with value.template as template, value.channel as channel,value.template_anat as template_anat, value.i as i, value.irw as irw, primary 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), symbol: coalesce(i.`IAO_0000028`[0], '')} , channel_image: { channel: { short_form: channel.short_form, label: coalesce(channel.label,''), iri: channel.iri, types: labels(channel), symbol: coalesce(channel.`IAO_0000028`[0], '')} , imaging_technique: { short_form: technique.short_form, label: coalesce(technique.label,''), iri: technique.iri, types: labels(technique), symbol: coalesce(technique.`IAO_0000028`[0], '')} ,image: { template_channel : { short_form: template.short_form, label: coalesce(template.label,''), iri: template.iri, types: labels(template), symbol: coalesce(template.`IAO_0000028`[0], '')} , template_anatomy: { short_form: template_anat.short_form, label: coalesce(template_anat.label,''), iri: template_anat.iri, types: labels(template_anat), symbol: coalesce(template_anat.`IAO_0000028`[0], '')} ,image_folder: COALESCE(irw.folder[0], ''), index: coalesce(apoc.convert.toInteger(irw.index[0]), []) + [] }} }) 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: coalesce(s.link_base[0], ''), accession: coalesce(primary.short_form, ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), link_postfix: coalesce(s.link_postfix, '')}) END AS self_xref, primary, anatomy_channel_image OPTIONAL MATCH (s:Site)<-[dbx:database_cross_reference]-(primary) WITH CASE WHEN s IS NULL THEN self_xref ELSE COLLECT({ link_base: coalesce(s.link_base[0], ''), accession: coalesce(dbx.accession[0], ''), link_text: primary.label + ' on ' + s.label, homepage: coalesce(s.homepage[0], ''), site: { short_form: s.short_form, label: coalesce(s.label,''), iri: s.iri, types: labels(s), symbol: coalesce(s.`IAO_0000028`[0], '')} , icon: coalesce(s.link_icon_url[0], ''), 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[0], ''), link : coalesce(l.license_url[0], ''), core : { short_form: l.short_form, label: coalesce(l.label,''), iri: l.iri, types: labels(l), symbol: coalesce(l.`IAO_0000028`[0], '')} }) 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), symbol: coalesce(p.`IAO_0000028`[0], '')} , PubMed: coalesce(p.PMID[0], ''), FlyBase: coalesce(p.FlyBase[0], ''), DOI: coalesce(p.DOI[0], '') } ) END AS pubs,primary,anatomy_channel_image,xrefs,license OPTIONAL MATCH (primary)<-[:has_source]-(i:Individual) WITH i, primary, anatomy_channel_image, xrefs, license, pubs OPTIONAL MATCH (i)-[:INSTANCEOF]-(c:Class) WITH DISTINCT { images: count(distinct i),types: count(distinct c) } as dataset_counts,primary,anatomy_channel_image,xrefs,license,pubs RETURN { link : coalesce(primary.dataset_link[0], ''), core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for DataSet' AS query, '58214d4' AS version , anatomy_channel_image, xrefs, license, pubs, dataset_counts", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:DataSet {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -545,7 +545,7 @@
name="Get JSON for License"
description="Get JSON for License"
runForCount="false"
- query=""statement": "MATCH (primary:License) 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, '2e501bd' AS version", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:License) WHERE primary.short_form in [{ID}] WITH primary RETURN { icon : coalesce(primary.license_logo[0], ''), link : coalesce(primary.license_url[0], ''), core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), symbol: coalesce(primary.`IAO_0000028`[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for License' AS query, '58214d4' AS version", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:License {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">
@@ -555,7 +555,7 @@
name="Get JSON for Cluster"
description="Get JSON for Cluster"
runForCount="false"
- query=""statement": "MATCH (primary:Cluster) 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:Class)<-[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, 'ca9ab19' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
+ query=""statement": "MATCH (primary:Cluster) 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[0], ''), link : coalesce(l.license_url[0], ''), 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:Class)<-[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[0], 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[0], ''), 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[0], 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[0], ''), 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[0], index: coalesce(irw.index[0], []) + [] }}) 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, 'ca9ab19' AS version , dataset_license, parents, relationships, xrefs, channel_image, related_individuals", "parameters" : { "ID" : "$ID" }"
countQuery=""statement": "MATCH (primary:Cluster {short_form: {ID}} ) RETURN count(primary) as count", "parameters" : { "ID" : "$ID" }">