natverse / neuprintr

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

Use the memoised version of neuprint_fetch in a couple more places #105

Open romainFr opened 4 years ago

jefferis commented 4 years ago

Hi @romainFr this might require a little more thought.

On which point I seem to remember seeing

> neuprint_datasets()
$`hemibrain:v1.0.1`
$`hemibrain:v1.0.1`$`last-mod`
[1] "2019-12-20T23:11:02"

$`hemibrain:v1.0.1`$uuid
[1] "52a13328874c4bb7b15dc4280da26576"

so we might be able to condition the memoisation on the last-mod or uuid fields for the dataset. Perhaps you could get some confirmation from Steve as to whether these change with any change to the database?

romainFr commented 4 years ago

I think what we also want is neuprint_fetch_custom("MATCH (n:Meta) RETURN n.lastDatabaseEdit"), the dataset fields only track the tagged versions of the underlying data. I could write a wrapper around that and use it in the memoisation?

I didn't think about the memory limitations though. Maybe in what I committed only neuprint_ROI_mesh and neuprint_ROI_connectivity would be worth it?