Skip to content

Commit

Permalink
Fix off by 1 error in fetching postsynaptic names
Browse files Browse the repository at this point in the history
* closes #109
* thanks to @mmc46
* also make sure to pass on connection object to catmaid_get_neuronnames
  • Loading branch information
jefferis committed Apr 15, 2019
1 parent 46c7461 commit 807d8e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/catmaid_skeleton.R
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,9 @@ catmaid_get_connectors_between <- function(pre_skids=NULL, post_skids=NULL,
# deal with neuron names
if(get_names){
# make this a single call for efficiency
allnames <- catmaid_get_neuronnames(c(ddf$pre_skid, ddf$post_skid))
allnames <- catmaid_get_neuronnames(c(ddf$pre_skid, ddf$post_skid), conn = conn, pid=pid, ...)
ddf$pre_name <- allnames[seq_along(ddf$pre_skid)]
ddf$post_name <- allnames[seq_along(ddf$post_skid)+length(ddf$pre_skid)-1]
ddf$post_name <- allnames[seq_along(ddf$post_skid)+length(ddf$pre_skid)]
}

# move some columns to front
Expand Down

0 comments on commit 807d8e8

Please sign in to comment.