Skip to content

Commit

Permalink
Neuron similarity query widget: add "Show scoring matrix" and CSV dow…
Browse files Browse the repository at this point in the history
…nload buttons
  • Loading branch information
tomka committed Oct 3, 2018
1 parent e9f3543 commit 3caae1e
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,39 @@
}
},
});

CATMAID.DOM.appendElement(controls, {
type: 'button',
label: 'Show scoring matrix',
onclick: function() {
if (!self.similarity) {
CATMAID.warn("No similarity query selected");
return;
}
CATMAID.Similarity.getConfig(project.id, self.similarity.config_id)
.then(function(config) {
CATMAID.NeuronSimilarityWidget.showSimilarityScoringDialog(config);
})
.catch(CATMAID.handleError);
},
});

CATMAID.DOM.appendElement(controls, {
type: 'button',
label: 'Download scores as CSV',
onclick: function() {
if (!self.similarity) {
CATMAID.warn("No similarity query selected");
return;
}
CATMAID.Similarity.getConfig(project.id, self.similarity.config_id)
.then(function(config) {
CATMAID.NeuronSimilarityWidget.exportNblastCSV(self.similarity, config);
CATMAID.msg("Success", "CSV exported");
})
.catch(CATMAID.handleError);
},
});
},
contentID: this.idPrefix + 'content',
createContent: function(content) {
Expand Down

0 comments on commit 3caae1e

Please sign in to comment.