The goal of fafbseg is to provide support for analysis of segmented EM data, focussed on the full adult female brain (FAFB) dataset.
Although there is support for a range of data sources and services, at this point the principal target is the FlyWire automated segmentation. Legacy support also exists for the Google brain automatic segmentation of FAFB data.
fafbseg is integrated with the NeuroAnatomy Toolbox suite (aka natverse) including elmr and catmaid.
fafbseg is also one building block for the coconatfly which provides a unified and simplified interface to a range of Drosophila connectome datasets. We actually recommend coconatfly as a good place to start for most users since it provides convenient access to specific FlyWire data releases as well as powerful cross-connectome analyses while requiring minimal configuration. See https://natverse.org/coconatfly/articles/getting-started.html for details.
Assuming you want to use the production (in progress) version of the FlyWire dataset or to access lower level functionality, then fafbseg is the way to go. You will need to install the package and then configure your environment including recording your authorisation token and likely downloading canned data releases.
We recommend installing fafbseg from GitHub using the natmanager package:
# install natmanager if required
if (!requireNamespace("natmanager")) install.packages("natmanager")
natmanager::install(pkgs="fafbseg")
Basic steps for setting up to access FlyWire data:
library(fafbseg)
# record your authorisation token
flywire_set_token()
# install python tools required for some functionality
simple_python()
# fetch canned connectivity *and* cell type data
download_flywire_release_data()
note that at the time of writing (Dec 2023) download_flywire_release_data()
targets materialisation 783 of the FlyWire dataset, fetching both annotations and
connectivity information.
Detailed examples will follow in additional vignettes, but as a first motivation, this is how to do a connectivity query using precomputed data.
library(fafbseg)
dl4df=flytable_meta('DL4.*')
dl4df
dl4out <- flywire_partner_summary2(dl4df, partners = 'out', threshold = 3)
dl4out
The fafbseg package enables access to a number of published and many pre-publication resources. We hope that this will accelerate your science but we strongly request that you ensure that you acknowledge both the authors of this package and the original data sources to ensure that we and they can justify this free sharing of code and data.
For use of the proofread and annotated FlyWire dataset, please co-cite:
To acknowledge specific FAFB resources:
- For the FAFB dataset, Zheng et al Cell 2018
- For the FFN1 autosegmentation, Li et al bioRxiv 2019
- For the FlyWire autosegmentation, [Dorkenwald et al Nat Meth 2022](https:// https://doi.org/10.1038/s41592-021-01330-0) and https://flywire.ai
- For the Buhmann synaptic connection autosegmentation, Buhmann et al Nat Meth 2021
- if using the
cleft_score
metric please also cite Heinrich et al 2018
- if using the
- For the neurotransmitter prediction, Eckstein et al. 2023 bioRxiv
FlyWire coordinate transforms and synapse predictions make use of infrastructure contributed by Davi Bock, Gregory Jefferis, Philipp Schlegel and Eric Perlman, supported by NIH BRAIN Initiative (grant 1RF1MH120679-01); additional work including assembling ground truth data was also supported by Wellcome trust (203261/Z/16/Z).
For the fafbseg package itself, please include a reference to the github page in your methods section as well as a citation to Bates et al eLife 2020 along with the statement:
Development of the natverse including the fafbseg package has been supported by the NIH BRAIN Initiative (grant 1RF1MH120679-01), NSF/MRC Neuronex2 (NSF 2014862/MC_EX_MR/T046279/1) and core funding from the Medical Research Council (MC_U105188491).
Thank you!