soma_side: Calculate which side of the brain a neuron is on

View source: R/neuron_side.R

soma_sideR Documentation

Calculate which side of the brain a neuron is on

Description

These functions make use of the symmetrised brainspace JRC2018F to determine the 'side' of the brain on which a neuron's root node, typically the soma, falls, i.e. soma_side. You can also calculate a 'synapse side index', defined as: (number of synapses on the right - number on the left) / total synapses.

Usage

soma_side(
  x,
  flywire_nuclei = FALSE,
  brain = nat.flybrains::JRC2018F,
  bound = NULL,
  transform = FALSE
)

## S3 method for class 'neuronlist'
soma_side(
  x,
  flywire_nuclei = FALSE,
  brain = nat.flybrains::JRC2018F,
  bound = NULL,
  transform = FALSE
)

## S3 method for class 'neuron'
soma_side(
  x,
  nuclei = NULL,
  brain = nat.flybrains::JRC2018F,
  bound = NULL,
  transform = FALSE
)

synapse_side_index(
  x,
  brain = nat.flybrains::JRC2018F,
  bound = NULL,
  transform = FALSE
)

## S3 method for class 'neuronlist'
synapse_side_index(
  x,
  brain = nat.flybrains::JRC2018F,
  bound = NULL,
  transform = FALSE
)

## S3 method for class 'neuron'
synapse_side_index(
  x,
  brain = nat.flybrains::JRC2018F,
  bound = NULL,
  transform = FALSE
)

Arguments

x

a nat::neuronlist or nat::neuron object

brain

wthe brainspace what x is in.

bound

the dividing line that separates left and right in e JRC2018F.

transform

whether to transform x (when TRUE) when the given brain is not JRC2018F

Value

a nat::neuronlist object with either 'side' or synapse_side_index updated in its metadata.

See Also

hemibrain_reroot

Examples


library(hemibrainr)
library(nat.jrcbrains)

# Read a neuron from the hemibrain
neurons = neuprint_read_neurons(1796818119)

# Split into axon and dendrite
neurons.flow = flow_centrality(neurons)

# Calculate soma side
neurons.flow = soma_side(neurons.flow, brain = "JRCFIB2018F")

# Calculate synapse side index
neurons.flow = synapse_side_index(neurons, brain = "JRCFIB2018F")

# See side data
neurons.flow[,]



natverse/hemibrainr documentation built on Nov. 27, 2024, 9:01 p.m.