nblast_fafb: NBLAST EM tracing against FlyCircuit (or other databases of)...

View source: R/nblast_fafb.R

nblast_fafbR Documentation

NBLAST EM tracing against FlyCircuit (or other databases of) neurons

Description

NBLAST EM tracing against FlyCircuit (or other databases of) neurons

Usage

nblast_fafb(
  skids,
  db = NULL,
  conn = NULL,
  mirror = TRUE,
  normalised = TRUE,
  reverse = FALSE,
  reference = nat.flybrains::FCWB,
  prune_twigs = 2,
  .parallel = TRUE,
  ...
)

Arguments

skids

catmaid skeleton ids (see catmaid_skids) or a neuronlist

db

A neuronlist object containing neurons to search. Defaults to the value of options('nat.default.neuronlist').

conn

a catmaid connection object (see catmaid_connection)

mirror

whether to mirror the neuron (default TRUE since FlyCircuit neurons are on fly's left and most FAFB tracings are on fly's right.)

normalised

Whether to return normalised NBLAST scores

reverse

Treat the FAFB skeleton as NBLAST target rather than query (sensible if db contains partial skeletons/tracts; default FALSE).

reference

The reference brain to which the neurons will be transformed, either a templatebrain object such as FCWB or a character vector naming such an object.

prune_twigs

Twigs smaller than this value will be removed before creating the dotprops object for NBLAST search. The default value of 2 microns is a good compromise for EM neurons. Setting prune_twigs=NA prevents any pruning.

.parallel

Whether to parallelise the NBLAST search (see details and also nblast for how to use the parallel interface provided by the doMC package.)

...

Additional parameters passed to nblast

Details

Still depends on having a neuronlist containing registered neurons (usually from flycircuit.tw). The example code downloads a set of projection neurons. The full data must be requested from Greg Jefferis.

When .parallel=TRUE, nblast_fafb will parallelise the search across multiple cores if possible. You can set an option specifying a default number of cores elmr.nblast.cores. See elmr-package. Otherwise the default will either be roughly half the number of cores as determined by registerDoParallel. If your machine does not have multiple cores (or you do not want to use them), the search will be a bit more efficient if you set the option elmr.nblast.cores=1 or the argument .parallel=TRUE.

Value

an object of class nblastfafb for which plot3d, summary and hist methods exist.

References

http://flycircuit.tw

See Also

nblast, registerDoParallel for setting spreading load across cores.

Examples

## Not run: 
# first load neuronlist object containing registered neurons (see details)
allpndps=flycircuit::load_si_data('allpndps.rds')
# ... and set that as the default for queries and plotting
options(nat.default.neuronlist='allpndps')

# then make sure you are loged in to CATMAID server
# catmaid::catmaid_login(<your connection args>)

# NBLAST neuron 27884
PN27884f=nblast_fafb(27884, mirror = FALSE, .parallel=FALSE)

# set up parallel backend (will be used by default)
doMC::registerDoMC()
PN27884f=nblast_fafb(27884, mirror = FALSE)

# summary table of results
summary(PN27884f)
# plot results, just top hit
plot3d(PN27884f, hits=1)

# aggressive pruning of twigs
nblast_fafb(27884, mirror = FALSE, prune_twigs=5)
# no pruning of twigs
nblast_fafb(27884, mirror = FALSE, prune_twigs=NA)

# alternatively, you can supply an existing neuronlist
dc_nl = nblast_fafb(dense_core_neurons, mirror=TRUE)
summary(dc_nl)

## End(Not run)

natverse/elmr documentation built on Sept. 2, 2023, 9:30 a.m.