mouselight_nodes_in_region: Find out how many nodes a neuron has in each brain region

Description Usage Arguments Details Value See Also Examples

View source: R/calculate.R

Description

After reading tracgings from the MouseLight project (mouselight_read_brain), find out in which neuropils it has its nodes

Usage

1
2
3
4
5
6
7
mouselight_nodes_in_region(x, brain.areas = NULL, labels = NULL)

## S3 method for class 'neuron'
mouselight_nodes_in_region(x, brain.areas = NULL, labels = NULL)

## S3 method for class 'neuronlist'
mouselight_nodes_in_region(x, brain.areas = NULL, labels = NULL)

Arguments

x

a neuronlist of tracings that have been read into R using mouselight_read_neurons, with method = "native".

brain.areas

a vector of brain region acronyms. See mouselight_brain_region_info.

labels

a vector of label IDs, denoting neuron compartment e.g. 2 for axon, 3 for dendrite, 0 for intervening path, etc. See mouselight_read_neurons.

...

methods sent to mouselight_fetch_swc

Details

Note, when using mouselight_neurons_by_brain_region, the brain region returned can belong to larger brain regions, which are agglomerations of smaller ones. See mouselight_brain_region_info.

Value

A data.frame

See Also

mouselight_read_brain, mouselight_brain_region_info, mouselight_neuron_info, mouselight_read_neurons

Examples

1
2
3
4
5
6
7
8
9
ids=c("1ccbc478-88fb-4181-a4de-d0c22ed9738b",
  "3afa5e41-374d-45bc-a546-03f362d93649")
nn=mouselight_read_neurons(ids, method = "native")
nibr = mouselight_nodes_in_region(nn, labels = c(0, 2, 3))
print(nibr)

# Counts in a specific brain area
cing.nodes = mouselight_nodes_in_region(nn, labels = c(0, 2, 3), brain.areas = "cing")
print(cing.nodes)

natverse/mouselightr documentation built on July 6, 2020, 2:09 p.m.