NBLAST figures
This repository contains the knitr documents used to make the figure panels for Costa et al. (2014) NBLAST: Rapid, sensitive comparison of neuronal structure and construction of neuron family databases.
Watch a video demo of how to run code here. Read on for the details.
Prerequisites
All of our analyses use the statistical programming environment, R. RStudio
is a convenient cross-platform IDE with excellent support for authoring
R Markdown documents, which combine text
written in Markdown with embedded R code chunks.
Some scripts depend on an installation of the image registration toolkit CMTK in order to transform neurons from one space to another.
- Install R from http://www.r-project.org/ (you need at least R 3.2.0, latest R recommended).
- Install RStudio from http://www.rstudio.com.
- Optionally on MacOS X install XQuartz to use X11 for 3D visualisation (this used to be packaged with MacOS X but is now available only from http://xquartz.macosforge.org/)
- CMTK from http://www.nitrc.org/projects/cmtk is necesary for some scripts.
(it is used to transform neurons between template brains). A full set of binaries is available here:
http://www.nitrc.org/frs/?group_id=212. We recommend the lastest version of CMTK and certainly CMTK>=3.2.2.
Setting Up
- Download and unzip this repository (or
git clone
if you prefer).
- Double click on
NBLAST_figures.Rproj
to start a clean R session in RStudio.
- Open
R/Startup.R
and source it (Code ... Source File) or press the button with a pale blue arrow at top right
(details here).
- Check that there were no error messages while installing packages or downloading data.
Running a report
- Double click on
NBLAST_figures.Rproj
to start RStudio.
- Open one of the Rmd files under the
fig/
folder.
- Click the 'Knit HTML' button to begin.
When this process has finished, a web page containing text and images will be produced.
- You can also run the chunks in the report one by one in an interactive R session.
- Use the green "Chunks" button at the top right of the source file window. Choose for example
"Run Current Chunk".
- You can step through the whole report chunk by chunk or line by line inspecting the
intermediate results in R.
- This includes interactive 3D renderings of the plots of neurons
which you can rotate and zoom; this will likely reveal additional information beyond
the static projection view in the HTML report created earlier.
Travis
We are presently running an automated build of these figures using the online travis ci service. This confirms that the
figures can be built completely independently of our own computer setups. If you wish
you could fork the repository and switch on travis for your fork and use that to build
new variants of the figures. Don't forget to update the url for the badge at the top
of this file if you want it to reflect the status of your fork.
Contact
Please feel free to:
- submit a bug report (recommended for faster response from team),
- or contact Greg directly (details in paper)
should you have any difficulties.