fafbseg.flywire.get_l2_dotprops#

fafbseg.flywire.get_l2_dotprops(root_ids, min_size=None, sample=False, omit_failures=None, progress=True, max_threads=10, *, dataset=None, **kwargs)[source]#

Generate dotprops from L2 chunks.

L2 chunks not present in the L2 cache or without a pca attribute (happens for very small chunks) are silently ignored.

Parameters:
  • root_ids (int | list of ints | NeuronCriteria) – Root ID(s) of the FlyWire neuron(s) you want to dotprops for.

  • min_size (int, optional) – Minimum size (in nm^3) for the L2 chunks. Smaller chunks will be ignored. This is useful to de-emphasise the finer terminal neurites which typically break into more, smaller chunks and are hence overrepresented. A good value appears to be around 1_000_000.

  • sample (float [0 > 1], optional) – If float, will create Dotprops based on a fractional sample of the L2 chunks. The sampling is random but deterministic.

  • omit_failures (bool, optional) –

    Determine behaviour when dotprops generation fails (i.e. if the neuron has no L2 info):

    • None (default) will raise an exception

    • True will skip the offending neuron (might result

    in an empty NeuronList) - False will return an empty Dotprops

  • progress (bool) – Whether to show a progress bar.

  • max_threads (int) – Number of parallel requests to make when fetching the L2 IDs (but not the L2 info).

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

  • **kwargs – Keyword arguments are passed through to the Dotprops initialization. Use to e.g. set extra properties.

Returns:

dps – List of Dotprops.

Return type:

navis.NeuronList

See also

fafbseg.flywire.get_l2_skeleton()

Fetch skeletons instead of dotprops using the L2 edges to infer connectivity.

fafbseg.flywire.skeletonize_neuron()

Skeletonize the full resolution mesh.

Examples

>>> from fafbseg import flywire
>>> n = flywire.get_l2_dotprops(720575940614131061)