API Documentation#

FAFBseg is divided into separate modules to split functions by data source/type:

  • fafbseg.flywire for FlyWire functions

  • fafbseg.google for functions related to Google’s segmentation of FAFB

  • fafbseg.xform for transforming spatial data between FAFB14 and FlyWire’s FAFB14.1

See below for a by-module breakdown.

FlyWire#

Interact with the segmentation:

fafbseg.flywire.locs_to_segments(locs[, ...])

Retrieve FlyWire segment (i.e. root) IDs at given location(s).

fafbseg.flywire.neuron_to_segments(x[, ...])

Get root IDs overlapping with a given neuron.

fafbseg.flywire.locs_to_supervoxels(locs[, ...])

Retrieve FlyWire supervoxel IDs at given location(s).

fafbseg.flywire.supervoxels_to_roots(x[, ...])

Get root(s) for given supervoxel(s).

fafbseg.flywire.skid_to_id(x[, sample, ...])

Find the FlyWire root ID for a given (FAFB) CATMAID neuron.

fafbseg.flywire.is_latest_root(id[, ...])

Check if root is the current one.

fafbseg.flywire.update_ids(id[, stop_layer, ...])

Retrieve the most recent version of given FlyWire (root) ID(s).

fafbseg.flywire.get_voxels(x[, mip, sv_map, ...])

Fetch voxels making a up given root ID.

fafbseg.flywire.is_proofread(x[, table, ...])

Test if neuron has been set to proofread.

fafbseg.flywire.find_common_time(root_ids[, ...])

Find a time at which given root IDs co-existed.

fafbseg.flywire.find_anchor_loc(root_ids[, ...])

Find a representative coordinate.

fafbseg.flywire.get_segmentation_cutout(bbox)

Fetch cutout of segmentation.

Fetch neurons:

fafbseg.flywire.get_mesh_neuron(id[, ...])

Fetch FlyWire neuron as navis.MeshNeuron.

fafbseg.flywire.get_somas([x, ...])

Fetch nuclei segmentation for given neuron(s).

fafbseg.flywire.get_skeletons(root_id[, ...])

Fetch precomputed skeletons.

fafbseg.flywire.skeletonize_neuron(x[, ...])

Skeletonize FlyWire neuron.

fafbseg.flywire.skeletonize_neuron_parallel(ids)

Skeletonization on parallel cores.

Connectivity:

fafbseg.flywire.synapses.get_adjacency(sources)

Fetch adjacency matrix.

fafbseg.flywire.synapses.get_connectivity(x)

Fetch Buhmann et al. (2019) connectivity for given neuron(s).

fafbseg.flywire.synapses.get_synapses(x[, ...])

Fetch Buhmann et al. (2019) synapses for given neuron(s).

fafbseg.flywire.synapses.get_synapse_counts(x)

Fetch synapse counts for given root IDs.

fafbseg.flywire.synapses.get_transmitter_predictions(x)

Fetch neurotransmitter predictions for neurons.

L2-related functions:

fafbseg.flywire.get_l2_info(root_ids[, ...])

Fetch basic info for given neuron(s) using the L2 cache.

fafbseg.flywire.get_l2_graph(root_ids[, ...])

Fetch L2 graph(s).

fafbseg.flywire.get_l2_dotprops(root_ids[, ...])

Generate dotprops from L2 chunks.

fafbseg.flywire.get_l2_skeleton(root_id[, ...])

Generate skeleton from L2 graph.

Misc:

fafbseg.flywire.get_edit_history(x[, ...])

Fetch edit history for given neuron(s).

fafbseg.flywire.get_leaderboard([days, ...])

Fetch leader board (# of edits).

fafbseg.flywire.get_neuropil_volumes(neuropils)

Load FlyWire neuropil volumes.

fafbseg.flywire.get_lineage_graph(x[, size, ...])

Get lineage graph for given neuron.

fafbseg.flywire.get_lr_position(x[, coordinates])

Find out if given xyz positions are on the fly's left or right.

fafbseg.flywire.get_voxels(x[, mip, sv_map, ...])

Fetch voxels making a up given root ID.

For fetching annotations:

fafbseg.flywire.search_annotations(x[, ...])

Search hierarchical annotations (super class, cell class, cell type, etc).

fafbseg.flywire.search_community_annotations(x)

Search community cell identification annotations for given term/root IDs.

fafbseg.flywire.get_hierarchical_annotations([...])

Download (and cache) hierarchical annotations.

fafbseg.flywire.NeuronCriteria(*[, regex, ...])

Parses filter queries into root IDs.

For interaction with the CAVE engine:

fafbseg.flywire.get_materialization_versions(*)

Fetch info on the available materializations.

fafbseg.flywire.create_cave_table(name, ...)

Create CAVE annotation table.

fafbseg.flywire.list_cave_tables(*[, dataset])

Fetch available CAVE annotation tables.

fafbseg.flywire.get_cave_table_info(...[, ...])

Get info for given CAVE table.

fafbseg.flywire.get_cave_table(table_name[, ...])

Get annotations from given CAVE table.

fafbseg.flywire.delete_annotations(...[, ...])

Delete annotations from CAVE annotation table.

fafbseg.flywire.upload_annotations(...[, ...])

Upload or update annotations to CAVE table.

Utility functions:

fafbseg.flywire.set_default_dataset(dataset)

Set the default FlyWire dataset for this session.

fafbseg.flywire.set_default_annotation_version(version)

Set the default annotation version for this session.

fafbseg.flywire.get_user_information(user_ids)

Fetch (and cache) user information (name, affiliation, etc.) from their IDs.

fafbseg.flywire.encode_url([segments, ...])

Encode data as FlyWire neuroglancer scene.

fafbseg.flywire.decode_url(url[, format])

Decode neuroglancer URL.

Google segmentation#

fafbseg.google.locs_to_segments(locs[, mip, ...])

Retrieve Google segmentation IDs at given location(s).

fafbseg.google.segments_to_neuron(seg_ids, ...)

Retrieve autoseg neurons of given segmentation ID(s).

fafbseg.google.segments_to_skids(seg_ids, ...)

Retrieve skeleton IDs of neurons corresponding to given segmentation ID(s).

fafbseg.google.neuron_to_segments(x)

Get segment IDs overlapping with a given neuron.

fafbseg.google.find_autoseg_fragments(x, ...)

Find autoseg tracings constituting a given neuron.

fafbseg.google.find_fragments(x, remote_instance)

Find manual tracings overlapping with given autoseg neuron.

fafbseg.google.find_missed_branches(x, ...)

Use autoseg to find (and annotate) potential missed branches.

fafbseg.google.get_mesh(x, bbox[, vol])

Get mesh for given segmentation ID using CloudVolume.

fafbseg.google.autoreview_edges(x[, ...])

Automatically review (low-confidence) edges between nodes.

fafbseg.google.test_edges(x[, edges, vol, ...])

Test if edge(s) cross membranes using ray-casting.

Spatial transformation#

Note that typically you will want to use e.g. navis.xform_brain(data, source='FAFB14', target='FLYWIRE') but you can also use these low-level functions:

fafbseg.xform.flywire_to_fafb14(x[, ...])

Transform neurons/coordinates from flywire to FAFB V14.

fafbseg.xform.fafb14_to_flywire(x[, ...])

Transform neurons/coordinates from FAFB v14 to flywire.