Skip to content

Commit

Permalink
Merge pull request #442 from VirtualFlyBrain/feature/172
Browse files Browse the repository at this point in the history
Tree browser
  • Loading branch information
Robbie1977 authored Nov 6, 2019
2 parents 4a20ab4 + 8ecfa00 commit 35485e3
Show file tree
Hide file tree
Showing 5 changed files with 219 additions and 89 deletions.
4 changes: 3 additions & 1 deletion components/VFBMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default class VFBMain extends React.Component {
idSelected: undefined
};

this.addVfbId = this.addVfbId.bind(this);
this.menuHandler = this.menuHandler.bind(this);
this.setWrapperRef = this.setWrapperRef.bind(this);
this.htmlToolbarRef = this.htmlToolbarRef.bind(this);
Expand Down Expand Up @@ -786,7 +787,8 @@ export default class VFBMain extends React.Component {
id="treeWidget"
instance={this.instanceOnFocus}
size={{ height: _height, width: _width }}
ref={ref => this.treeBrowserReference = ref}/>
ref={ref => this.treeBrowserReference = ref}
selectionHandler={this.addVfbId}/>
</div>);
}
}
Expand Down
22 changes: 22 additions & 0 deletions components/configuration/treeWidgetConfiguration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
var restPostConfig = {
url: "http://pdb.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=allShortestPaths((root)<-[:SUBCLASSOF|part_of*..]-(anat:Class)) RETURN p,r,image",
"resultDataContents": ["graph"]
}
]
});


module.exports = {
restPostConfig,
treeCypherQuery
};
Loading

0 comments on commit 35485e3

Please sign in to comment.