Skip to contents

Low level access to the Flywire CAVE annotation system

Usage

flywire_cave_client(
  datastack_name = getOption("fafbseg.cave.datastack_name", "flywire_fafb_production")
)

Arguments

datastack_name

defaults to "flywire_fafb_production". See https://global.daf-apis.com/info/ for other options.

Value

The caveclient.frameworkclient.CAVEclientFull Python module wrapped by reticulate.

Details

This depends on installation of the Python caveclient library. See flywire_cave_query for more details.

Examples

# \donttest{
fac <- flywire_cave_client()
fac$annotation$get_tables()
#>  [1] "fly_synapses_neuropil_v2"            
#>  [2] "synaptic_clefts"                     
#>  [3] "hierarchical_neuron_annotations"     
#>  [4] "fly_synapses_neuropil_v6"            
#>  [5] "neuron_information_v2"               
#>  [6] "cambridge_celltypes_v2"              
#>  [7] "fly_synapses_neuropil_v5"            
#>  [8] "neuron_information_vtest"            
#>  [9] "proofreading_status_public_v1"       
#> [10] "synapses_nt_v1"                      
#> [11] "fly_synapses_neuropil"               
#> [12] "proofreading_review_public_vtest"    
#> [13] "braincircuits_annotation_test"       
#> [14] "valid_synapses_nt_vtest"             
#> [15] "neuron_information_v1"               
#> [16] "nuclei_v1"                           
#> [17] "valid_synapses_nt_v2"                
#> [18] "valid_synapses_nt_v1"                
#> [19] "fly_synapses_neuropil_v4"            
#> [20] "hemilineages"                        
#> [21] "braincircuits_annotation_test2"      
#> [22] "hemibrain_matched_types"             
#> [23] "neuron_representative_coordinates_v1"
#> [24] "hierarchical_cell_types_v1"          
#> [25] "cambridge_celltypes"                 
#> [26] "fly_synapses_neuropil_v3"            
#> [27] "proofreading_review_public_v1"       
#> [28] "proofread_neurons"                   
fac$annotation$get_table_metadata('nuclei_v1')
#> $id
#> [1] 8
#> 
#> $schema_type
#> [1] "nucleus_detection"
#> 
#> $table_name
#> [1] "nuclei_v1__fly_v31"
#> 
#> $valid
#> [1] TRUE
#> 
#> $created
#> [1] "2021-08-13T18:01:55.211016"
#> 
#> $deleted
#> NULL
#> 
#> $user_id
#> [1] "2"
#> 
#> $description
#> [1] "\nFlyWire nucleus description\nNucleus version: 20210322\n\nNuclei in this table consist of center points (in nm), volume (in μm3), and bounding boxes (in nm).\n\nThe nucleus segmentation was generated by Shang Mu (smu@princeton.edu, Seung Lab at Princeton University) using a 2D convolutional neural network (CNN) and heuristic interpolations. The training data was assembled from annotations by Selden Koolman, Merlin Moore, Sarah Morejohn, Ben Silverman, Kyle Willie, Ryan Willie, Szi-chieh Yu and Shang Mu.\n\nAs this data was generated using a 2D, rather than 3D, neural network, defects are present in the detected nuclei, particularly where there are large defects in section alignment or a number of consecutive missing sections.\n\nFalse positive fragments, nucleus fragments and partial nuclei are the most common type of defects. A simple, rudimentary method for cleaning up is to disregard small fragments by thresholding by segment size or by the z-dimension of the bounding boxes. A size threshold of 2000 voxels (0.08 μm3) was already applied in producing this segmentation.\n\nA minimal number of nucleus merger instances have been observed, caused by section alignment defects or close nuclei appositions in certain non-neuronal cell clusters.\n\nWhen using the nucleus annotations, please acknowledge Shang Mu and let him know about your use case.\n\nWe encourage making (and using) improvements to this data based on the information provided (for example, utilizing bounding box dimensions and/or the segmentation to find and merge incorrectly split partial nuclei), and such improvements should be discussed with Shang. Data derived solely from this work should be similarly made available on this platform at the time of use in any publication.\n"
#> 
#> $notice_text
#> NULL
#> 
#> $reference_table
#> NULL
#> 
#> $flat_segmentation_source
#> [1] "precomputed://gs://neuroglancer/drosophila_v0/nucleus/v5_z_intp_intp/seg"
#> 
#> $write_permission
#> [1] "PRIVATE"
#> 
#> $read_permission
#> [1] "PUBLIC"
#> 
#> $last_modified
#> [1] "2022-10-25T19:49:21.621037"
#> 
#> $segmentation_source
#> [1] ""
#> 
#> $pcg_table_name
#> [1] "fly_v31"
#> 
#> $last_updated
#> [1] "2024-05-13T01:00:00.151532"
#> 
#> $annotation_table
#> [1] "nuclei_v1"
#> 
#> $voxel_resolution
#> [1] 1 1 1
#> 

# annotation tables that have been materialised in order to map XYZ
# points onto current root ids (and immutable supervoxel ids)
# typically the same as fac$annotation$get_tables()
fac$materialize$get_tables()
#>  [1] "fly_synapses_neuropil_v2"            
#>  [2] "synaptic_clefts"                     
#>  [3] "hierarchical_neuron_annotations"     
#>  [4] "fly_synapses_neuropil_v6"            
#>  [5] "neuron_information_v2"               
#>  [6] "cambridge_celltypes_v2"              
#>  [7] "fly_synapses_neuropil_v5"            
#>  [8] "neuron_information_vtest"            
#>  [9] "proofreading_status_public_v1"       
#> [10] "synapses_nt_v1"                      
#> [11] "fly_synapses_neuropil"               
#> [12] "proofreading_review_public_vtest"    
#> [13] "braincircuits_annotation_test"       
#> [14] "valid_synapses_nt_vtest"             
#> [15] "nuclei_v1"                           
#> [16] "valid_synapses_nt_v2"                
#> [17] "valid_synapses_nt_v1"                
#> [18] "fly_synapses_neuropil_v4"            
#> [19] "hemilineages"                        
#> [20] "neuron_representative_coordinates_v1"
#> [21] "cambridge_celltypes"                 
#> [22] "fly_synapses_neuropil_v3"            
#> [23] "proofreading_review_public_v1"       
#> [24] "proofread_neurons"                   

info=fac$info$get_datastack_info()
# the default synapse table for the dataset
info$synapse_table
#> [1] "synapses_nt_v1"
# }