natverse / neuprintr

R client utilities for interacting with the neuPrint connectome analysis service
http://natverse.org/neuprintr
3 stars 3 forks source link

neuprint_connection_table returns different values as on neuprint website #117

Closed istvantaisz closed 4 years ago

istvantaisz commented 4 years ago

Synapse numbers retrieved are different from the ones found on https://neuprint.janelia.org/ for neuron 580227374. Input: 5176 vs 4908, Output: 2133 vs 6498

library(neuprintr)
M_inputs  = neuprint_connection_table(580227374, prepost = c("PRE"))
nrow(M_inputs)
[1] 854
sum(M_inputs$weight)
[1] 4908
M_outputs  = neuprint_connection_table(580227374, prepost = c("POST"))
nrow(M_outputs)
[1] 1368
sum(M_outputs$weight)
[1] 6498

My dataset version matches the online one: neuprint_dataset = "hemibrain:v1.0.1"

Related to #63 and #67

romainFr commented 4 years ago

Hi @istvantaisz ,

The numbers reported on the website are the total numbers of pre and post synaptic sites respectively. In neuprintr, those would be the pre and post columns returned by neuprint_get_meta. neuprint_connection_table differs in two ways:

In other words:

Let me know if that helps, and thanks for reporting!

istvantaisz commented 4 years ago

Hi Romain, thanks for your response. I missed the all_segments option.

And indeed when I exported all outputs I got a third number for all outputs, which matches with nrows from neuprint_connection_table(580227374, prepost = c("POST"), all_segments = T)