natverse / neuprintr

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

Add an argument to bypass roi checks #103

Closed romainFr closed 4 years ago

romainFr commented 4 years ago

This is because we sometimes have experimental ROIs defined, but not loaded into the neuprint metadata (so called "hidden" rois). If some expert user want to access them, they can now use roi_check=FALSE in the relevant functions.

jefferis commented 4 years ago

Thank you @romainFr. Can you tell me more about these "hidden" ROIs. Is there no API call that will tell you about them?

romainFr commented 4 years ago

@jefferis They are fields of Neuron nodes/ roiInfo objects, but that's about it, they don't appear anywhere else to my knowledge.

jefferis commented 4 years ago

I was just wondering if there was some way at all we could update the roicheck function to find them as the check can be memoised so as long as there is at least one API call that returns this info. It could be combined with the existing API call to find the regular ROIs. Can you give this a bit of thought before we merge?

romainFr commented 4 years ago

Ah yes, I see what you mean. One can probably get at it with slight modifications of neuprint_get_fields. I'll give it a try

romainFr commented 4 years ago

So I did just that by tweaking neuprint_get_fields to make it a bit more flexible. I also added a fromNeuronFields argument to neuprint_ROIs and neuprint_check_rois. Since neuprint_get_fields inside query is already memoised, we get that for free.

romainFr commented 4 years ago

As for default arguments, for now I chose to have neuprint_ROIs with the old behavior (as it allows to check for superLevelROIs separately), but neuprint_check_roi with the new behavior.

romainFr commented 4 years ago

Thanks for the suggestion @jefferis , that's much better than my clunky check_roi