flywire_ids: Flexible specification of flywire ids (including from...

View source: R/flywire-urls.R

flywire_idsR Documentation

Flexible specification of flywire ids (including from flytable types)

Description

allows more flexible specification of flywire root ids compared with ngl_segments including by queries against cell types recorded in flytable. Also useful for reading ids from the clipboard or a file, which often consist of a single whitespace or comma-delimited string.

Usage

flywire_ids(
  x,
  file = NULL,
  integer64 = FALSE,
  check_latest = FALSE,
  must_work = FALSE,
  na_ok = FALSE,
  unique = FALSE,
  version = NULL,
  table = c("both", "info", "optic"),
  ...
)

Arguments

x

A character or bit64::integer64 vector or a dataframe specifying ids directly or a string specifying a query, a URL or a comma/space delimited list of ids (see examples).

file

As an alternative to x the path to a file containing ids.

integer64

Whether to return ids as 64 bit integers - more compact than character vector, but can be more fragile (default FALSE).

check_latest

Whether to check if ids are up to date.

must_work

Whether ids must be valid

na_ok

whether NA ids are acceptable when must_work=TRUE

unique

Whether to return only unique ids

version

Integer materialisation version. The special value of 'latest' means the most recent materialisation according to CAVE.

table

When x is a query whether to search brain, optic lobe or both info tables.

...

Additional arguments passed to flytable_cell_types or ngl_segments.

Value

character (or integer64)) vector of segment ids

See Also

flytable_cell_types.

Other neuroglancer-urls: flywire_scene(), ngl_blank_scene(), ngl_decode_scene(), ngl_encode_url(), ngl_segments(), open_fafb_ngl()

Examples

flywire_ids(data.frame(root_id=1))
flywire_ids(data.frame(root_id=1), integer64=TRUE)
# Bad values will return 0
flywire_ids(data.frame(root_id=-1))
## Not run: 
# will error
flywire_ids(data.frame(root_id=-1), must_work = TRUE)

## End(Not run)
# DL1 olfactory PNs
flywire_ids("DL1_adPN")
# DL1 olfactory PNs but only on the RHS
flywire_ids("DL1_adPN_R")
# specifying materialisation version
flywire_ids("DL1_adPN_R", version=630)
# using SQL wild cards
flywire_ids("DA[12]_%PN_L")

# all sensory neurons
flywire_ids("super:sensory", integer64=TRUE)

# note that side is defined by soma position (not arbour side)
flywire_ids("class:MBON_R", integer64=TRUE)
# superclass can also have a side specified
flywire_ids("super:motor_R", integer64=TRUE)

# you can also use a comma/whitespace delimited list
flywire_ids("1234, 123456")
# ... which could come from the clipboard
## Not run: 
flywire_ids(clipr::read_clip())

# ... or from a file
flywire_ids(file='~/Downloads/root_ids_Li02_.txt')

## End(Not run)

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