Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency in ROIs returned #57

Open
mmc46 opened this issue Jan 28, 2020 · 9 comments
Open

Inconsistency in ROIs returned #57

mmc46 opened this issue Jan 28, 2020 · 9 comments

Comments

@mmc46
Copy link
Contributor

mmc46 commented Jan 28, 2020

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
Copy link
Contributor

jefferis commented Jan 28, 2020 via email

@romainFr
Copy link
Collaborator

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
Copy link
Contributor Author

mmc46 commented Jan 28, 2020 via email

@istvantaisz
Copy link

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
Copy link
Collaborator

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

  • By default, simply returns unitary connection weight between neurons
  • Option to break with down by ROI, which introduces a roi column and a ROIweight column. Weight is still the overall weight.
  • Option to search in a specific ROI
  • Examples of different approaches given in help.

@tatsuookubo
Copy link

tatsuookubo commented Jan 30, 2020

@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
Copy link
Contributor

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

@mmc46
Copy link
Contributor Author

mmc46 commented Jan 30, 2020

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 jefferis reopened this Jan 30, 2020
@jefferis
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants