R/similarity.r
show_similarity.Rd
By default, the query neuron will be drawn with its segments shaded from red to blue, with red indicating a poor match to the target segments, and blue a good match.
show_similarity( query, target, smat = NULL, cols = colorRampPalette(c("red", "yellow", "cyan", "navy")), col = "black", AbsoluteScale = FALSE, PlotVectors = TRUE, ... )
query | a neuron to compare and colour. |
---|---|
target | the neuron to compare against. |
smat | a score matrix (if |
cols | the function to use to colour the segments (e.g.
|
col | the colour with which to draw the target neuron. |
AbsoluteScale | logical indicating whether the colours should be
calculated based on the minimum and maximum similarities for the neuron
( |
PlotVectors | logical indicating whether the vectors of the
|
... | extra arguments to pass to |
show_similarity
is called for the side effect of drawing the
plot; a vector of object IDs is returned.
The low level function WeightedNNBasedLinesetMatching
is used to retrieve the scores.
if (FALSE) { library(nat) # Pull out gamma and alpha-beta neurons gamma_neurons <- subset(kcs20, type=='gamma') ab_neurons <- subset(kcs20, type=='ab') # Compare two alpha-beta neurons with similar branching, but dissimilar arborisation clear3d() show_similarity(ab_neurons[[1]], ab_neurons[[2]]) # Compare an alpha-beta and a gamma neuron with some similarities and differences clear3d() show_similarity(ab_neurons[[1]], gamma_neurons[[3]]) }