flytable_cell_types: Fetch (memoised) flywire cell type information from flytable

View source: R/flytable.R

flytable_cell_typesR Documentation

Fetch (memoised) flywire cell type information from flytable

Description

Fetch (memoised) flywire cell type information from flytable

Usage

flytable_cell_types(
  pattern = NULL,
  version = NULL,
  timestamp = NULL,
  target = c("type", "cell_type", "hemibrain_type", "cell_class", "super_class",
    "ito_lee_hemilineage", "malecns_type", "all"),
  table = c("info", "optic", "both"),
  transfer_hemibrain_type = c("extra", "none", "all"),
  cache = TRUE,
  use_static = NA
)

Arguments

pattern

Optional character vector specifying a pattern that cell types must match in a SQL LIKE statement executed by flytable_query. The suffix _L or _R can be used to restricted to neurons annotated to the L or R hemisphere. See examples.

version

An optional CAVE materialisation version number. See flywire_cave_query for more details. Note also that the special signalling value of TRUE implies the latest locally available connectome dump.

timestamp

An optional timestamp as a string or POSIXct, interpreted as UTC when no timezone is specified.

target

A character vector specifying which flytable columns pattern should match. The special value of type means either cell_type or hemibrain_type should match. The special value of all means to match against any of cell_type, hemibrain_type, cell_class.

table

Which cell type information tables to use (info for brain, optic for optic lobes or both).

transfer_hemibrain_type

Whether to transfer the hemibrain_type column into the cell_type (default TRUE, see details)

cache

Whether to cache the results for 5m (default TRUE since the flytable query is is a little expensive)

use_static

Whether to use static cell type information (from Schlegel et al)

Details

when transfer_hemibrain_type=TRUE, hemibrain_type values will be transferred into the cell_type column if cell_type is empty.

It seems that SQL LIKE searches (e.g. containing the % symbol) do not work for the ito_lee_hemilineage column. You can still search for exact matches or use full regular expression queries (which operate by downloading all rows and then filtering on your machine).

Static cell type information is provided by Schlegel et 2023. See flywire_annotations github repository. It will be used by default when connection to the pre-release Cambridge flytable is not available or when specified by options(fafbseg.use_static_celltypes=TRUE). Note that presently only one materialisation version (630) is supported for static data.

Value

The original data.frame left joined to appropriate rows from flytable.

See Also

add_celltype_info

Examples


flytable_cell_types("MBON%")
flytable_cell_types("MBON%", version=450)
# the latest connectome dump, see flywire_connectome_data_version()
## Not run: 
flytable_cell_types("MBON%", version=TRUE)

## End(Not run)

# two characters
flytable_cell_types("MBON__")
# at least one character
flytable_cell_types("MBON_%")
# range
flytable_cell_types("MBON2[0-5]")

# include side specification
flytable_cell_types("DA2_lPN_R")
# only the RHS MBON20
flytable_cell_types("MBON20_R")
# all RHS cells with class MBON
flytable_cell_types("MBON_R", target="cell_class")

# anything with type *OR* class information
cells=flytable_cell_types(target = 'all')
# anything that mentions PN anywhere
pncands=flytable_cell_types('%PN%', target = 'all')


natverse/fafbseg documentation built on Nov. 11, 2024, 9:50 p.m.