neuromorpho_read_neurons | R Documentation |
Read standardised neurons from neuromorpho.org, given a single, or vector of, neuron ID or neuron name.
Neurons can be returned as SWC-style data frames or as a nat
package neuron/neuronlist object,
that can be be plotted in 3D using rgl
and analysed with tools from the nat
ecosystem. Each neuron
in the neuromorpho repository is represented by a name, general information (metadata),
the original and standardised SWC files of the digital morphological reconstruction
(see details on standardisation process),
and a set of morphometric features (see details on available measures).
neuromorpho_read_neurons(
neuron_name = NULL,
neuron_id = NULL,
nat = TRUE,
batch.size = 2,
meta = TRUE,
light = TRUE,
find = FALSE,
progress = TRUE,
neuromorpho_url = "http://neuromorpho.org",
...
)
neuromorpho_read_neuron(
neuron_name = NULL,
neuron_id = NULL,
nat = TRUE,
neuromorpho_url = "http://neuromorpho.org",
...
)
neuron_name |
a neuron name, or vector of neuron names, as recorded in the neuromorpho database. Names and neuron IDs
can be found by searching the repository, for example via |
neuron_id |
a neuron ID, or vector of neuron IDs, as recorded in the neuromorpho database. If neuron_name is given
this supersedes |
nat |
if TRUE, neurons are returned formatted as a |
batch.size |
the number of requests sent at once to the neuromorpho.org, using |
meta |
if TRUE, meta data is retrieved for the returned |
light |
if TRUE, the only a subset of the full meta data for each neurons is returned with the resulting |
find |
if TRUE, then we scrape each neuron's webpage to find the correct link to download its SWC file. This is more stable, but more time consuming,
than setting |
progress |
if |
neuromorpho_url |
the base URL for querying the neuromorpho database, defaults to http://neuromorpho.org |
... |
methods passed to |
A single neuron can be read using using neuromorpho_read_neuron
,
or multiple using neuromorpho_read_neurons
. If nat = TRUE
,
then neurons are returned as a neuron
object,
If multiple neurons are returned, they will be given together in a neuronlist
.
This format and its manipulation is described in detail here.
When using neuromorpho_read_neurons
, meta data for the neuron is also returned
using neuromorpho_neuron_meta
. If light = TRUE
,
then only a subset of this metadata is returned, i.e. the fields:
neuron_id
neuron_name
species
brain_region
cell_type
archive
.
Note that since neurons are reconstructed from many different neural systems and species,
there is no 'standard' orientation. Instead, neuromorpho.org's standardisation process orients the
morphologies by placing the soma in the origin of coordinates and aligning the first three principal
components of all XYZ coordinates with heights, width, and depth.
if nat = TRUE
, then a neuronlist object is returned.
If FALSE, then a list of data frames for neuron morphologies in
SWC format are returned.
neuromorpho_neurons_info
, neuromorpho_neurons_meta
## Not run: # Let's get all the elephant neurons in the repository
## First, we need to find their names or IDs
elephant.df = neuromorpho_search(search_terms="species:elephant")
## Let's see what cell types we have here
t = table(elephant.df$cell_type)
t
## We have many pyramidal cells. Let's get those.
neuron_names = subset(elephant.df, cell_type == names(t)[which.max(t)])$neuron_name
## Now we are ready to read some neurons!
elephant.principal.cells = neuromorpho_read_neurons(neuron_name = neuron_names, nat = TRUE)
## Great, now we can plot them
nopen3d()
plot3d(elephant.principal.cells, soma=T)
## And get some summary information on the skeleton we have retrieved
summary(elephant.principal.cells)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.