natverse / neuprintr

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

Inconsistency in ROIs returned #57

Open mmc46 opened 4 years ago

mmc46 commented 4 years ago

There are inconsistencies on which ROIs are returned, depending on what function is used. In this case the INP mesh can't be retrieved, but it shows as an ROI when using neuprint_connection_table(). This might reflect issues in neuprint itself, so not sure if it can be fixed.

neuprint_ROI_mesh("INP")
Error: neuPrint error: Key "INP" not found

But

DM1.opn.connected = neuprint_connection_table(DM1.opn.info$bodyid, prepost = "POST")
table(DM1.opn.connected$roi)

      AL(R)       CA(R)         INP       LH(R)     mALT(R) MB(+ACA)(R)       MB(R)        None 
       1064        1613           1        1659          45        1613        1613         128 
     SCL(R)      SLP(R)      SNP(R) 
          1          21          21

In this case, the synapses are attributed to INP (the higher level neuropil) and do not appear assigned to any of its lower level neuropils.

Examples from vignette https://github.com/natverse/neuprintr/blob/master/vignettes/hemibrain_opns.Rmd

jefferis commented 4 years ago

Thanks, Marta. What is INP?

If you try the neuprint_datasets() it shows two levels of neuropils. Could that be related? Best, Greg.

Sent from my iPhone

On 28 Jan 2020, at 17:32, Marta Costa notifications@github.com wrote:

There are inconsistencies on which ROIs are returned, depending on what function is used. In this case the INP mesh can't be retrieved, but it shows as an ROI when using neuprint_connection_table(). This might reflect issues in neuprint itself, so not sure if it can be fixed.

neuprint_ROI_mesh("INP") Error: neuPrint error: Key "INP" not found But

DM1.opn.connected = neuprint_connection_table(DM1.opn.info$bodyid, prepost = "POST") table(DM1.opn.connected$roi)

  AL(R)       CA(R)         INP       LH(R)     mALT(R) MB(+ACA)(R)       MB(R)        None 
   1064        1613           1        1659          45        1613        1613         128 
 SCL(R)      SLP(R)      SNP(R) 
      1          21          21

Examples from vignette https://github.com/natverse/neuprintr/blob/master/vignettes/hemibrain_opns.Rmd

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

romainFr commented 4 years ago

INP does not show up in the ROI menu for meshes in neuprint explorer either.

In general, we noticed that not all ROIs (depending on their position in the hierarchy) are available to all neuprint queries. This is for example true for the ROI connectivity.

mmc46 commented 4 years ago

It’s inferior neuropils.

Brain regions list, top right here https://neuprint.janelia.org/

On 28 Jan 2020, at 20:04, Romain Franconville notifications@github.com wrote:

 INP does not show up in the ROI menu for meshes in neuprint explorer either.

In general, we noticed that not all ROIs (depending on their position in the hierarchy) are available to all neuprint queries. This is for example true for the ROI connectivity.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

istvantaisz commented 4 years ago

This also affects connectivity numbers, since some ROIs seem to be overlapping and the connections are repeated with neuprint_connection_table

Crown.bids =  c(519012059, 519603027)
Crown.in.t = neuprint_connection_table(Crown.bids, prepost = "PRE")
View(Crown.in.t)
SMP.R.mesh = neuprint_ROI_mesh(roi = "SMP(R)")
SNP.R.mesh = neuprint_ROI_mesh(roi = "SNP(R)")
Error: neuPrint error: Key "SNP(R)" not found
alexanderbates commented 4 years ago

@istvantaisz @mmc46 I have made changes to neuprint_connection_table in 86f82e4 so that:

tatsuookubo commented 4 years ago

@alexanderbates Thank you for fixing this problem. When I run your example 4, I get the following error message.

c4 = neuprint_connection_table(c(818983130, 1796818119), prepost = "POST",
                               by.roi = TRUE, roi = "LH(R)")
Error in neuprint_ROIs(dataset = dataset, conn = conn, superLevel = NULL,  : 
  formal argument "superLevel" matched by multiple actual arguments
jefferis commented 4 years ago

Related to the original bug https://twitter.com/stephenplaza/status/1222356894267953153?s=21

mmc46 commented 4 years ago

There are quite a few issues reported by FLYEM on number of synapses per neuropil, to be resolved in the next released version. Until then, it could be useful to add a link to their doc to the documentation for the relevant functions. Or to make explicit what the issues are directly.

https://docs.google.com/document/d/1vae3ClHR8z8uekqwrOHtqiux3oY5-Y_xw6W2srCi3PI/edit?usp=sharing

jefferis commented 4 years ago

Note that commit 95d12ba only fixed the issue reported by @tatsuookubo – the close by commit message feature is a bit more trigger happy than I realised so I have reopened.