Learn R Programming

⚠️There's a newer version (1.6.7) of this package.Take me there.

nat.nblast

Quick Start

For the impatient ...

# install
if (!require("devtools")) install.packages("devtools")
devtools::install_github(c("jefferis/nat", "jefferislab/nat.nblast"))

# use
library(nat.nblast)

# run examples for search
example("nblast")

# run examples for clustering
example("nhclust")

# get overview help for package
?nat.nblast
# help for functions
?nblast
?nhclust

# run tests
library(testthat)
test_package("nat.nblast")

Introduction

This R package implements the NBLAST neuron similarity algorithm described in a preprint available at http://dx.doi.org/10.1101/006346. In addition to basic pairwise comparison, the package implements search of databases of neurons. There is also suport for all x all comparison for a group of neurons. This can produce a distance matrix suitable for hierarchical clustering, which is also implemented in the package.

These tools are designed as an addon for the NeuroAnatomy Toolbox (nat) R package, which you must first install.

Installation

This package has now been released to CRAN (as of v1.5), but since this is the first official release, you may wish to install the development version from GitHub, especially if you notice a bug. Although nat (the main dependency) is available on CRAN, it it recommended that you install the development version of both packages if you want to install the development version of nat.nblast: nat.nblast is evolving fast and has required several minor tweaks to nat, which is otherwise quite mature.

CRAN release

install.packages("nat.nblast")

Development version

You can download the tar ball, and run R CMD INSTALL on it, or (recommended) use the devtools package to install the development version:

# install devtools if required
if (!require("devtools")) install.packages("devtools")
# then install nat
devtools::install_github("jefferis/nat")
# then nat.nblast
devtools::install_github("nat.nblast", "jefferislab")

Note: Windows users need Rtools to install this way.

Copy Link

Version

Install

install.packages('nat.nblast')

Monthly Downloads

160

Version

1.6.2

License

GPL-3

Maintainer

James Manton

Last Published

April 26th, 2016

Functions in nat.nblast (1.6.2)

WeightedNNBasedLinesetMatching

Compute point & tangent vector similarity score between two linesets
fill_in_sparse_score_mat

Add one or more submatrices to a sparse score matrix
diagonal

Extract diagonal terms from a variety of matrix types
create_scoringmatrix

Create a scoring matrix given matching and non-matching sets of neurons
calc_prob_mat

Calculate probability matrix from distances and dot products between neuron segments
calc_dists_dotprods

Calculate distances and dot products between two sets of neurons
[

Extract parts of a sparse spam matrix
sparse_score_mat

Convert a subset of a square score matrix to a sparse representation
calc_score_matrix

Calculate scoring matrix from probability matrices for matching and non-matching sets of neurons
show_similarity

Display two neurons with segments coloured by similarity
nblast_allbyall

Wrapper function to compute all by all NBLAST scores for a set of neurons
nhclust

Cluster a set of neurons
NeuriteBlast

Produce similarity score for neuron morphologies
sub_score_mat

Return scores (or distances) for given query and target neurons
plot3d.hclust

Methods to identify and plot groups of neurons cut from an hclust object
neuron_pairs

Utility function to generate all or random pairs of neurons
fctraces20

20 traced Drosophila neurons from Chiang et al 2011
nblast

Calculate similarity score for neuron morphologies
nat.nblast-package

Neuron similarity, search and clustering tools
subset.hclust

Return the labels of items in 1 or more groups cut from hclust object
smat.fcwb

Scoring matrices for neuron similarities in FCWB template brain
sub_dist_mat

Convert (a subset of) a raw score matrix to a distance matrix
fill_pairs_sparse_score_mat

Add forwards, reverse and self scores for a pair of neurons to a sparse score matrix