fafbseg.flywire.get_somas#

fafbseg.flywire.get_somas(x=None, materialization='auto', raise_missing=True, split_positions=False, *, dataset=None)[source]#

Fetch nuclei segmentation for given neuron(s).

Parameters:
  • x (int | list of ints | NeuronList, optional) – FlyWire root ID(s) or neurons for which to fetch soma infos. Use None to fetch complete list of annotated nuclei. If neurons, will set their soma and soma radius if one is found. Importantly, we assume that the neurons are in nanometer space.

  • materialization ("auto" | "live" | "latest" | int | bool) – Which materialization version to fetch. You can also provide an ID (int) for a specific materialization version (see get_materialization_versions). Set to False to fetch the non-materialized version.

  • raise_missing (bool) – Only relevant if materialization=”auto”: if True (default) will complain if any of the query IDs can not be found among the available materialization versions.

  • split_positions (bool) – Whether to have separate columns for x/y/z position.

  • dataset ("public" | "production" | "sandbox", optional) – Against which FlyWire dataset to query. If None will fall back to the default dataset (see set_default_dataset()).

Returns:

Pandas DataFrame with nuclei (see Examples). Root IDs without a nucleus will be missing. The rad_est is the estimated radius based on the widest point of the nucleus - take it with a pinch of salt!

Return type:

DataFrame

Examples

>>> from fafbseg import flywire
>>> somas = flywire.get_somas([720575940628842314])
Using materialization version 783.
>>> somas                                                   
        id     volume   pt_supervoxel_id          pt_root_id              pt_position  rad_est
0  5743218  27.935539  80645535832325071  720575940628842314  [584928, 201568, 22720]   2480.0