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

sync: alpha with alpha-sync-da98 #1187

Merged
merged 64 commits into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
156c6ee
#1143 Detecting input on autocomplete and link from term info fix
jrmartin Jun 21, 2021
8723fe6
Merge pull request #1145 from VirtualFlyBrain/development-sync-1e8d
Robbie1977 Jun 22, 2021
1b26f23
#1143 Fixes autocomplete, #1144 fixes link from term info for circuit
jrmartin Jun 25, 2021
b7cca5a
Merge remote-tracking branch 'origin/development' into feature/1143
jrmartin Jun 28, 2021
bd23883
#1143 circuit browser fixing
jrmartin Jul 1, 2021
d55caea
#728 Make template instance not selectable in 3D Viewer
jrmartin Jul 2, 2021
d20c666
Merge pull request #1150 from VirtualFlyBrain/feature/1143
ddelpiano Jul 5, 2021
b9673b1
Merge pull request #1151 from VirtualFlyBrain/feature/728
ddelpiano Jul 5, 2021
7a7b754
#484 Compound queries in URL
jrmartin Jul 7, 2021
9d71519
#484 eslint fix
jrmartin Jul 7, 2021
51b32a5
#484 Add query builder tests for compound queries
jrmartin Jul 9, 2021
4be6c81
#1158 Circuit Browser styling
jrmartin Jul 9, 2021
bea6c0d
#1158 Styling circuit browser buttons
jrmartin Jul 9, 2021
7d4affd
Merge pull request #1159 from VirtualFlyBrain/feature/1158
Robbie1977 Jul 12, 2021
cf5e719
Merge pull request #1152 from VirtualFlyBrain/development-sync-5c32
Robbie1977 Jul 12, 2021
d79d3d0
correcting variable name
Robbie1977 Jul 12, 2021
1114c60
swapping to paths
Robbie1977 Jul 12, 2021
f3995df
Merge remote-tracking branch 'origin/development' into feature/484
jrmartin Jul 12, 2021
50b1980
adding crude weight legend
Robbie1977 Jul 12, 2021
88bd6aa
#484 Fixing console errors
jrmartin Jul 12, 2021
4849951
tidying arrow
Robbie1977 Jul 13, 2021
23c912d
character fix
Robbie1977 Jul 13, 2021
5e86e52
adding Split filter
Robbie1977 Jul 13, 2021
1602784
sorting order and adding more facets
Robbie1977 Jul 15, 2021
afca49d
sorting order
Robbie1977 Jul 15, 2021
efc1eb4
tweaking query label
Robbie1977 Jul 15, 2021
ae4a41b
#531 Fix shift key bug getting stuck
jrmartin Jul 15, 2021
515232c
#531 Fix eslint
jrmartin Jul 15, 2021
429d678
limiting neurons included in the explored graph
Robbie1977 Jul 16, 2021
77b6793
adding link to explantion
Robbie1977 Jul 16, 2021
a25b5e9
limiting forward paths
Robbie1977 Jul 16, 2021
60d36db
limiting matches
Robbie1977 Jul 16, 2021
5ed9a9c
#531 Make slider in circuit browser match blue color of theme
jrmartin Jul 17, 2021
9a56033
testing download file metadata additions
Robbie1977 Jul 19, 2021
e826b3b
excluding DownloadMeta
Robbie1977 Jul 20, 2021
67565b6
#1161 Fix bugs with query parser
jrmartin Jul 21, 2021
46492b7
typing in parts
Robbie1977 Jul 27, 2021
c9afe0b
Merge pull request #1167 from VirtualFlyBrain/feature/1161
ddelpiano Jul 28, 2021
06382aa
Revert "excluding DownloadMeta"
Robbie1977 Jul 30, 2021
0a48398
Revert "Revert "excluding DownloadMeta""
Robbie1977 Jul 30, 2021
34c4f37
Merge pull request #1160 from VirtualFlyBrain/feature/531
Robbie1977 Aug 2, 2021
ede567c
Merge pull request #1157 from VirtualFlyBrain/feature/484
ddelpiano Aug 2, 2021
b5e82ec
adding Adult Head template
Robbie1977 Aug 10, 2021
9fd48c7
#1172 NBLAST Uploader component implementation
jrmartin Aug 13, 2021
b9117b5
#1172 NBLAST Uploader component
jrmartin Aug 13, 2021
244fbe3
#1174 Add own SOLR configuration files to circuit browser component
jrmartin Aug 13, 2021
c733206
#1172 Uploader configuration
jrmartin Aug 13, 2021
63f3cbe
fix for any pdb server
Robbie1977 Aug 23, 2021
34ef671
Merge pull request #1175 from VirtualFlyBrain/feature/1174
ddelpiano Aug 23, 2021
84cb75c
Merge pull request #1176 from VirtualFlyBrain/feature/1172
ddelpiano Aug 23, 2021
56524f1
filtering for only has_neuron_connectivity
Robbie1977 Aug 31, 2021
544fb0d
moving datasourceConfiguration to custom
Robbie1977 Aug 31, 2021
56d7d09
swapping to globalConfiguration:any
Robbie1977 Aug 31, 2021
d53ad11
removing any
Robbie1977 Sep 1, 2021
790c36d
Fix configuration file issues for circuit browser, not pointing to
jrmartin Sep 1, 2021
4b16121
Merge pull request #1178 from VirtualFlyBrain/fix/circuitbrowser_config
Robbie1977 Sep 1, 2021
c3c4aa2
applying filtering
Robbie1977 Sep 2, 2021
7aafe1a
finding all solr refs
Robbie1977 Sep 3, 2021
09fda4c
changing refresh button name
Robbie1977 Sep 6, 2021
e7649ae
#1179 Fixes complicated layout of vfb queries and #1180 fixes
jrmartin Sep 15, 2021
00e4df4
#1179 Autocomplete fixes
jrmartin Sep 16, 2021
a9786ac
#1180 Autocomplete fix
jrmartin Sep 24, 2021
8ffdbb1
Merge pull request #1182 from VirtualFlyBrain/feature/1179
ddelpiano Sep 24, 2021
d95e877
Merge pull request #1184 from VirtualFlyBrain/development
Robbie1977 Sep 27, 2021
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 Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ARG geppettoDatasourceRelease=vfb_20200604_a
ARG geppettoModelSwcRelease=v1.0.1
ARG geppettoFrontendRelease=development
ARG geppettoClientRelease=VFBv2.2.0.7
ARG ukAcVfbGeppettoRelease=pipeline2
ARG ukAcVfbGeppettoRelease=download

ARG mvnOpt="-Dhttps.protocols=TLSv1.2 -DskipTests --quiet -Pmaster"

Expand Down
56 changes: 45 additions & 11 deletions components/VFBMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import VFBTermInfoWidget from './interface/VFBTermInfo/VFBTermInfo';
import Logo from '@geppettoengine/geppetto-client/components/interface/logo/Logo';
import Canvas from '@geppettoengine/geppetto-client/components/interface/3dCanvas/Canvas';
import QueryBuilder from '@geppettoengine/geppetto-client/components/interface/query/queryBuilder';
import VFBUploader from './interface/VFBUploader/VFBUploader';
import HTMLViewer from '@geppettoengine/geppetto-ui/html-viewer/HTMLViewer';
import VFBListViewer from './interface/VFBListViewer/VFBListViewer';
import * as FlexLayout from '@geppettoengine/geppetto-ui/flex-layout/src/index';
Expand Down Expand Up @@ -51,6 +52,7 @@ class VFBMain extends React.Component {
quickHelpVisible: undefined,
UIUpdated: true,
wireframeVisible: false,
uploaderContentsVisible : true
};

this.addVfbId = this.addVfbId.bind(this);
Expand Down Expand Up @@ -85,7 +87,7 @@ class VFBMain extends React.Component {
this.instanceOnFocus = undefined;
this.idFromURL = undefined;
this.idsFromURL = [];
this.urlQueryLoader = undefined;
this.urlQueryLoader = [];
this.quickHelpRender = undefined;
this.firstLoad = true;
this.quickHelpOpen = true;
Expand Down Expand Up @@ -525,6 +527,9 @@ class VFBMain extends React.Component {
case 'triggerSetTermInfo':
this.handlerInstanceUpdate(click.value[0]);
break;
case 'uploaderContentsVisible':
this.refs.uploaderContentsRef?.openDialog();
break;
case 'triggerRunQuery':
GEPPETTO.trigger('spin_logo');
var that = this;
Expand Down Expand Up @@ -914,7 +919,7 @@ class VFBMain extends React.Component {
self.setState({ UIUpdated: true })
}}
focusTermRef={this.focusTermReference}
exclude={["ClassQueriesFrom", "Debug"]}
exclude={["ClassQueriesFrom", "Debug", "DownloadMeta"]}
order={['Symbol',
'Title',
'Name',
Expand All @@ -934,7 +939,9 @@ class VFBMain extends React.Component {
'Related Individuals',
'Relationships',
'Query for',
'Graph for',
'Graphs For',
'Graphs for',
'Add Neuron to Circuit Browser Query',
'Circuit Browser for',
'Description',
'Cross References',
Expand Down Expand Up @@ -1058,7 +1065,7 @@ class VFBMain extends React.Component {
if ( nextProps.generals.instanceOnFocus !== undefined && this.instanceOnFocus !== undefined) {
if ( Object.keys(nextProps.generals.instanceOnFocus).length > 0 ) {
if ( nextProps.generals.instanceOnFocus !== this.instanceOnFocus.getId() ){
this.instanceOnFocus == nextProps.generals.instanceOnFocus;
this.instanceOnFocus = nextProps.generals.instanceOnFocus;
}
}
}
Expand Down Expand Up @@ -1342,10 +1349,15 @@ class VFBMain extends React.Component {
}
idsList = idList[list].replace("i=","") + idsList;
} else if (idList[list].indexOf("q=") > -1) {
this.urlQueryLoader = idList[list].replace("q=","").replace("%20", " ").split(",");
const multipleQueries = idList[list].replace("q=","").replace("%20", " ").split(";");
let that = this;
multipleQueries?.forEach( query => {
const querySplit = query.split(",");
that.urlQueryLoader.push({ id : querySplit[0].trim(), selection : querySplit[1].trim() });
});
// if no other ids are loaded the query target is added.
if (idsList.length == 0 && this.urlQueryLoader.length > 1) {
idsList = this.urlQueryLoader[0];
idsList = this.urlQueryLoader[0].id;
}
}
}
Expand Down Expand Up @@ -1380,6 +1392,13 @@ class VFBMain extends React.Component {
GEPPETTO.on(GEPPETTO.Events.Instance_added, function (instance) {
that.props.instanceAdded(instance);
});

GEPPETTO.on(GEPPETTO.Events.Instances_created, function (instances) {
// Set template Instance to be not clickable in 3D viewer
if ( instances[0]?.id?.includes(window.templateID) ) {
that.canvasReference.engine.meshes ? that.canvasReference.engine.meshes[window.templateID + "." + instances[0]?.id].children[0].clickThrough = true : null;
}
});

GEPPETTO.on(GEPPETTO.Events.Instance_deleted, function (instancePath) {
let id = instancePath.split(".")[0];
Expand All @@ -1390,10 +1409,23 @@ class VFBMain extends React.Component {
that.addVfbId(that.idsFinalList);

var callback = function () {
// check if any results with count flag
if (that.refs.querybuilderRef.props.model.count > 0) {
if ( that.urlQueryLoader.length == 0 && that.refs.querybuilderRef.props.model.count > 0 ) {
// runQuery if any results
that.refs.querybuilderRef.runQuery();
} else if (that.urlQueryLoader.length > 0 && that.refs.querybuilderRef.props.model.count > 0) {
// Remove query from stack, and perform the next query
that.urlQueryLoader.shift();
const query = that.urlQueryLoader[0];
// Fetch variable and addQuery, if no more queries left then run query.
query
? window[query.id] === undefined
? window.fetchVariableThenRun(query.id, function () {
that.refs.querybuilderRef.addQueryItem({ term: "", id: query.id, queryObj: Model[query.selection] }, callback)
})
: that.refs.querybuilderRef.addQueryItem({ term: "", id: query.id, queryObj: Model[query.selection] }, callback)
: that.refs.querybuilderRef.props.model.count > 0
? that.refs.querybuilderRef.runQuery()
: null
} else {
that.refs.querybuilderRef.switchView(false);
}
Expand All @@ -1403,14 +1435,15 @@ class VFBMain extends React.Component {
GEPPETTO.trigger('stop_spin_logo');
};

// Initial queries specified on URL
if (that.urlQueryLoader !== undefined) {
if (window[that.urlQueryLoader[0]] == undefined) {
window.fetchVariableThenRun(that.urlQueryLoader[0], function () {
that.refs.querybuilderRef.addQueryItem({ term: "", id: that.urlQueryLoader[0], queryObj: Model[that.urlQueryLoader[1]] }, callback)
that.urlQueryLoader[0]?.id && window.fetchVariableThenRun(that.urlQueryLoader[0]?.id, function () {
that.refs.querybuilderRef.addQueryItem({ term: "", id: that.urlQueryLoader[0]?.id, queryObj: Model[that.urlQueryLoader[0]?.selection] }, callback)
});
} else {
setTimeout(function () {
that.refs.querybuilderRef.addQueryItem({ term: "", id: that.urlQueryLoader[0], queryObj: Model[that.urlQueryLoader[1]] }, callback);
that.refs.querybuilderRef.addQueryItem({ term: "", id: that.urlQueryLoader[0]?.id, queryObj: Model[that.urlQueryLoader[0]?.selection] }, callback);
}, 100);
}
}
Expand Down Expand Up @@ -1719,6 +1752,7 @@ class VFBMain extends React.Component {
searchConfiguration={this.searchConfiguration}
datasourceConfiguration={this.datasourceConfiguration} />

<VFBUploader ref="uploaderContentsRef" open={false} />
{this.htmlToolbarRender}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ var locationCypherQuery = ( instances, paths, weight ) => ({
{
"statement" : "WITH [" + instances + "] AS neurons"
+ " WITH neurons[0] as a, neurons[1] AS b"
+ " MATCH (source:has_neuron_connectivity {short_form: a}), (target:Neuron {short_form: b})"
+ " MATCH (source:Neuron:has_neuron_connectivity {short_form: a}), (target:Neuron:has_neuron_connectivity {short_form: b})"
+ " CALL gds.beta.shortestPath.yens.stream({"
+ " nodeQuery: 'MATCH (n:Neuron) RETURN id(n) AS id',"
+ " relationshipQuery: 'MATCH (a:Neuron:has_neuron_connectivity)-[r:synapsed_to]->(b:Neuron) WHERE exists(r.weight) AND r.weight[0] >= "
+ " nodeQuery: 'MATCH (n:Neuron:has_neuron_connectivity) RETURN id(n) AS id',"
+ " relationshipQuery: 'MATCH (a:Neuron:has_neuron_connectivity)-[r:synapsed_to]->(b:Neuron:has_neuron_connectivity) WHERE exists(r.weight) AND r.weight[0] >= "
+ weight?.toString() + " RETURN id(a) AS source, id(b) AS target, type(r) as type, 5000-r.weight[0] as weight_p',"
+ " sourceNode: id(source),"
+ " targetNode: id(target),"
Expand All @@ -18,12 +18,13 @@ var locationCypherQuery = ( instances, paths, weight ) => ({
+ " YIELD index, sourceNode, targetNode, nodeIds, path"
+ " WITH * ORDER BY index DESC"
+ " UNWIND relationships(path) as sr"
+ " OPTIONAL MATCH cp=(x)-[:synapsed_to]-(y) WHERE x=apoc.rel.startNode(sr) AND y=apoc.rel.endNode(sr) OPTIONAL MATCH fp=(x)-[r:synapsed_to]->(y)"
+ " OPTIONAL MATCH cp=(x:Neuron:has_neuron_connectivity)-[:synapsed_to]-(y:Neuron:has_neuron_connectivity) WHERE x=apoc.rel.startNode(sr) AND y=apoc.rel.endNode(sr) OPTIONAL MATCH fp=(x)-[r:synapsed_to]->(y) WHERE r.weight[0] >= " + weight?.toString()
+ " RETURN distinct a as root, collect(distinct fp) as pp, collect(distinct cp) as p, collect(distinct id(r)) as fr, sourceNode as source, targetNode as target, max(length(path)) as maxHops, collect(distinct toString(id(r))+':'+toString(index)) as relationshipY ",
"resultDataContents": ["row", "graph"]
}
]
});
// See query explanation on https://github.com/VirtualFlyBrain/graph_queries/blob/main/weighted_path.md

var configuration = {
resultsMapping:
Expand Down
Loading