Code

The Neurosynth website is essentially just a glorified wrapper around a set of open-source Python and JavaScript packages. In practice, this means you can use the tools we've made available to easily reproduce just about any images or data you find on this website. Most of the tools are hosted in our GitHub repository. There are several key components:

Neurosynth web application

The neurosynth-web repository contains all of the code for this web application. The backend is built in Flask; the front-end is an ungodly mix of CoffeeScript, vanilla JS, jQuery, Jinja2, and a bunch of other mostly outdated technologies. A major rewrite in React.js is planned for late 2018. The Neurosynth web application is fully containerized with Docker, making local installation for development purposes mostly straightforward (with the exception of some major datasets required to enable some of the functionality on the site--e.g., functional connectivity maps from Yeo and Buckner; processed gene maps from the Allen Institute, etc.).

Core Neurosynth Tools

The core Neurosynth package is a lightweight set of Python modules that support large-scale automated synthesis and manipulation of functional MRI activations. The emphasis is on ease of use and utility rather than computational sophistication or efficiency. Virtually all of the images found on this website were generated using the core package and just a few lines of code. But the code also allows you to do things that aren't yet available through the web interface. For example, you can conduct dynamic meta-analyses based on structured queries (e.g., an automated meta-analysis of all studies that include the terms EPISODIC and MEMORY but do NOT include the terms SEMANTIC or RETRIEVAL); retrieve all studies that report activation within a certain brain mask; and 'decode' your own images by assessing their similarity to the various meta-analyses produced by Neurosynth.

Neurosynth Viewer

The Neurosynth Viewer (NSViewer) is a modular JavaScript/CoffeeScript library for 2D in-browser visualization of MRI volumes. The viewers you see on the various parts of this site all invoke the same underlying NSViewer code with minor variations. The NSViewer package makes it relatively easy for users to drop an interactive viewer into their own web pages, without requiring extensive coding. A brief quick start guide is available in the repository README.

Automated Coordinate Extraction (ACE)

ACE is a Python package for automatic extraction of activation coordinates from neuroimaging articles. It's what we use to generate the Neurosynth dataset. Documentation is pretty sparse at the moment, but there are provided examples that illustrate how the package works. In general, ACE is unlikely to be very useful to most people, as we make the dataset we extract using these tools available on this website at regular intervals (see below). But if you'd like to write a filter to handle a publisher or journal we don't currently support, please contribute.

Data

Virtually every image visible on this website can be downloaded directly via the interactive viewer (click the download icon; it looks like this: . However, due to bandwidth limitations, the web interface is not intended to support mass downloading of hundreds or thousands of images, and attempts to scrape content in an automated way will result in permanent IP bans. Instead, we offer much more compact downloads of the activation and study data used to generate the images on the site. The core activation data (reflecting nearly 400,000 activations from over 10,000 studies) are available from the github repository (follow the README instructions). The data release also includes a 'features.txt' file containing feature loadings for the full set of terms accessible on this website. The core tools README and the scripts in the examples/ folder illustrate how one can work with these data files to generate the images you see here, as well as many others.