Skip to main content

buildcodecov

NeuroQuery

NeuroQuery is a tool and a statistical model for meta-analysis of the functional neuroimaging literature.

Given a text query, it can produce a brain map of the most relevant anatomical structures according to the current scientific literature.

It can be used through a web interface: https://neuroquery.org

Technical details and extensive validation are provided in this paper.

This Python package permits using NeuroQuery offline or integrating it in other applications.

Getting started

Quick demo

Dependencies

NeuroQuery requires Python 3, numpy, scipy, scikit-learn, nilearn, pandas, regex, lxml, and requests.

nltk is an optional dependency needed only if you use stemming or lemmatization for tokenization of input text.

python-Levenshtein is an optional dependency used only in some parts of tokenization. If you use the vocabulary lists provided with neuroquery or in neuroquery_data it is not needed.

Installation

neuroquery can be installed with

pip install neuroquery

Usage

In the examples folder, minimal_example.ipynb shows basic usage of neuroquery.

neuroquery has a function to download a trained model so that users can get started right away:

from neuroquery import fetch_neuroquery_model, NeuroQueryModel
from nilearn.plotting import view_img

encoder = NeuroQueryModel.from_data_dir(fetch_neuroquery_model())
# encoder returns a dictionary containing a brain map and more,
# see examples or documentation for details
view_img(
    encoder("Parkinson's disease")["brain_map"], threshold=3.).open_in_browser()

neuroquery also provides classes to train new models from scientific publications' text and stereotactic peak activation coordinates (see training_neuroquery.ipynb in the examples).

Metadata

Release files for neuroquery 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neuroquery 1.1.0
File Size Uploaded
neuroquery-1.1.0.tar.gz 90.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for neuroquery 1.1.0
File Interpreter ABI Platform
neuroquery-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 112.1 kB

Release files / neuroquery-1.1.0.tar.gz

Download URL neuroquery-1.1.0.tar.gz
Size 90.9 kB
Tags Source
SHA-256 checksum
How to use checksums
784aa324e43b27bd4cfa534199ee6268ca61035558cbafa9e7b9d7d37bdb0608
BLAKE2b-256 checksum
How to use checksums
e4a8926394376663eb01fae9c65f5a92074f7dd8ef63b936f46747d273d38924
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / neuroquery-1.1.0-py3-none-any.whl

Download URL neuroquery-1.1.0-py3-none-any.whl
Size 21.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68cb76c30877713d380f3a7a8504db4bfa19840b0c8b5a9b8b3bd0720808e875
BLAKE2b-256 checksum
How to use checksums
d4a6f6f93632cf22d041903033e2f3f2ab108ff887b8b9fb70eca0fef929f0c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page