Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Updating latest changes from Vfb geppetto application #463

Merged
merged 32 commits into from
Dec 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9345b23
Merge pull request #450 from VirtualFlyBrain/development
Robbie1977 Nov 6, 2019
488c271
Merge pull request #456 from VirtualFlyBrain/development
Robbie1977 Nov 18, 2019
90a11ac
updating Get JSON for anat_2_ep query (with pubs)
Robbie1977 Nov 19, 2019
0f9b56b
updating tips
Robbie1977 Nov 20, 2019
ea87144
updating queries
Robbie1977 Nov 21, 2019
d5297df
Merge branch 'vfb_geppetto_application' of https://github.com/Virtual…
Robbie1977 Nov 21, 2019
1e96fe5
fixing tooltips
Robbie1977 Nov 21, 2019
1be5c3e
typo fix
Robbie1977 Nov 21, 2019
24e43dd
updating term queries
Robbie1977 Nov 21, 2019
ed2c87e
adding template_2_datasets_query
Robbie1977 Nov 24, 2019
0413249
typo fix
Robbie1977 Nov 25, 2019
598c838
adding extra columns
Robbie1977 Nov 25, 2019
bd93421
sorting by number of images
Robbie1977 Nov 25, 2019
4b57513
reducing log size
Robbie1977 Nov 25, 2019
262f963
removing count sorting
Robbie1977 Nov 25, 2019
e4ae161
Merge branch 'vfb_geppetto_application' of https://github.com/Virtual…
Robbie1977 Nov 25, 2019
70849a6
taking from neuron_split_links
Robbie1977 Nov 26, 2019
ca7b9b6
adding split and neuron class term info handling
Robbie1977 Nov 26, 2019
7f3c9ae
comment space typo fix
Robbie1977 Nov 26, 2019
6568b6e
adding all dataset query
Robbie1977 Nov 26, 2019
9e5ccd6
adding license link
Robbie1977 Nov 26, 2019
670dec7
sorting by number of images in ds
Robbie1977 Nov 26, 2019
3b7bf92
typo fix
Robbie1977 Nov 26, 2019
87aa14f
fixed issues with delete and select of instances
ddelpiano Dec 2, 2019
08b444e
adding split label colour
Robbie1977 Dec 3, 2019
5b0c921
ensuring log passed is less than 1000 characters
Robbie1977 Dec 3, 2019
86f69ea
Merge branch 'vfb_geppetto_application' of https://github.com/Virtual…
Robbie1977 Dec 3, 2019
8de9f71
syntax fix
Robbie1977 Dec 3, 2019
f63e0d9
re-work of the tree component to adopt the new query provided
ddelpiano Dec 4, 2019
ad35e05
Merge pull request #461 from VirtualFlyBrain/fix/458
Robbie1977 Dec 5, 2019
fdc722e
Merge pull request #462 from VirtualFlyBrain/development
Robbie1977 Dec 5, 2019
a8bbba4
fix eye icon on load instance
ddelpiano Dec 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/VFBMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ export default class VFBMain extends React.Component {
instance={this.instanceOnFocus}
size={{ height: _height, width: _width }}
ref={ref => this.treeBrowserReference = ref}
selectionHandler={this.addVfbId}/>
selectionHandler={this.addVfbId} />
</div>);
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/configuration/buttonBarConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var buttonBarConfig = {
"queryBuilderVisible": {
"icon": "fa fa-quora",
"label": "",
"tooltip": "Open Query"
"tooltip": "Query Results"
},
"controlPanelVisible": {
"icon": "fa fa-list",
Expand Down
39 changes: 33 additions & 6 deletions components/configuration/queryBuilderConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,26 @@ var queryResultsColMeta = [
"locked": false,
"visible": true,
"displayName": "Stage",
"cssClassName": "query-results-stage-column"
"cssClassName": "query-results-stage-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "controls",
"columnName": "license",
"order": 8,
"locked": false,
"visible": true,
"customComponent": QueryLinkComponent,
"actions": "window.addVfbId('$entity$');",
"entityIndex": 1,
"entityDelimiter": "----",
"displayName": "License",
"cssClassName": "query-results-license-column",
"sortDirectionCycle": ['asc', 'desc', null]
},
{
"columnName": "controls",
"order": 9,
"locked": false,
"visible": false,
"customComponent": QueryResultsControlsComponent,
"displayName": "Controls",
Expand All @@ -91,7 +105,7 @@ var queryResultsColMeta = [
},
{
"columnName": "images",
"order": 9,
"order": 10,
"locked": false,
"visible": true,
"customComponent": SlideshowImageComponent,
Expand All @@ -102,17 +116,26 @@ var queryResultsColMeta = [
},
{
"columnName": "score",
"order": 10,
"order": 11,
"locked": false,
"visible": true,
"displayName": "Score",
"cssClassName": "query-results-score-column",
"sortDirectionCycle": ['desc', 'asc', null]
},
{
"columnName": "image_count",
"order": 12,
"locked": false,
"visible": true,
"displayName": "Image_count",
"cssClassName": "query-results-image_count-column",
"sortDirectionCycle": ['desc', 'asc', null]
}
];

// which columns to display in the results
var queryResultsColumns = ['name', 'expressed_in', 'description', 'reference', 'type', 'stage', 'images', 'score'];
var queryResultsColumns = ['name', 'expressed_in', 'description', 'reference', 'type', 'stage', 'license', 'images', 'score','image_count'];

var queryResultsControlConfig = {
"Common": {
Expand Down Expand Up @@ -140,7 +163,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=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.virtualflybrain.org/solr/ontology/select?fl=short_form,label,synonym,id,type,has_narrow_synonym_annotation,has_broad_synonym_annotation&start=0&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$" },
Expand Down Expand Up @@ -280,6 +303,10 @@ var sorterColumns = [
column: "score",
order: "DESC"
},
{
column: "image_count",
order: "DESC"
},
{
column: "images",
order: "DESC"
Expand Down
22 changes: 19 additions & 3 deletions components/configuration/treeWidgetConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,30 @@ var restPostConfig = {
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"]
* }
* ]
* });
*/

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"]
+ " 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"]
}
]
});
Expand All @@ -19,4 +35,4 @@ var treeCypherQuery = instance => ({
module.exports = {
restPostConfig,
treeCypherQuery
};
};
2 changes: 1 addition & 1 deletion components/interface/ErrorCatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ErrorCatcher extends React.Component {

handleClose = () => {
var customMessage = "Steps to reproduce the problem: \n\nPlease fill the below with the necessary steps to reproduce the problem\n\n\n\nError Information:\n\n"
var url = "https://github.com/VirtualFlyBrain/VFB2/issues/new?body=" + customMessage + this.state.error.message + "\n\n" + this.state.error.stack.replace("#",escape("#")) + "\n\n```diff\n" + window.console.logs.slice(-10).join('\n').replace("#",escape("#")) + "\n```\n";
var url = "https://github.com/VirtualFlyBrain/VFB2/issues/new?body=" + customMessage + this.state.error.message + "\n\n" + this.state.error.stack.replace("#",escape("#")) + "\n\n```diff\n" + window.console.logs.slice(-8).join('\n').replace("#",escape("#")) + "\n```\n";
var win = window.open(encodeURI(url), '_blank');
win.focus();
};
Expand Down
4 changes: 2 additions & 2 deletions components/interface/FocusTerm.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,14 +498,14 @@ export default class FocusTerm extends React.Component {
}} />
</Tooltip>
<Tooltip placement="top-end"
title="Open query results">
title="Query results">
<i className="fa fa-quora arrowsStyle"
onClick={() => {
this.props.UIUpdateManager("queryBuilderVisible");
}} />
</Tooltip>
<Tooltip placement="top-end"
title="Open the control panel">
title="Layers">
<i className="fa fa-list arrowsStyle"
onClick={() => {
this.props.UIUpdateManager("controlPanelVisible");
Expand Down
Loading