nimare.dataset: Dataset IO

Classes for representing datasets of images and/or coordinates.

dataset.Dataset(source[, target, mask])

Storage container for a coordinate- and/or image-based meta-analytic dataset/database.

nimare.meta: Meta-analytic algorithms

Coordinate-, image-, and effect-size-based meta-analysis estimators.


Image-based meta-analysis estimators.


CBMA methods from the activation likelihood estimation (ALE) family.


CBMA methods from the multilevel kernel density analysis (MKDA) family.


CBMA methods from the ALE and MKDA families.


Kernel transformers for CBMA algorithms.

nimare.results: Meta-analytic results

Tools for managing meta-analytic results.

results.MetaResult(estimator, mask[, maps])

Base class for meta-analytic results.

nimare.correct: Multiple comparisons correction

Multiple comparisons correction methods.


Perform family-wise error rate correction on a meta-analysis.

correct.FDRCorrector([alpha, method])

Perform false discovery rate correction on a meta-analysis.

nimare.annotate: Automated annotation

Automated annotation tools.


Automated annotation of Cognitive Atlas labels.


Topic modeling with generalized correspondence latent Dirichlet allocation.


Topic modeling with latent Dirichlet allocation via MALLET.


Text extraction tools.


Utility functions for ontology tools.

nimare.decode: Functional characterization analysis

For more information about functional characterization analysis, see Meta-analytic functional decoding.

Functional decoding tools.


Methods for decoding subsets of voxels or experiments into text.


Methods for decoding unthresholded brain maps into text.


Methods for encoding text into brain maps.

nimare.io: Input/Output

Input/Output operations.

io.convert_neurosynth_to_dict(...[, ...])

Convert Neurosynth/NeuroQuery database files to a dictionary.

io.convert_neurosynth_to_json(...[, ...])

Convert Neurosynth/NeuroQuery dataset text file to a NiMARE json file.

io.convert_neurosynth_to_dataset(...[, ...])

Convert Neurosynth/NeuroQuery database files into NiMARE Dataset.


Convert Sleuth text file to a dictionary.

io.convert_sleuth_to_json(text_file, out_file)

Convert Sleuth output text file into json.

io.convert_sleuth_to_dataset(text_file[, target])

Convert Sleuth output text file into NiMARE Dataset.

io.convert_neurovault_to_dataset(...[, ...])

Convert a group of NeuroVault collections into a NiMARE Dataset.

nimare.transforms: Data transforms

Miscellaneous spatial and statistical transforms.

transforms.ImageTransformer(target[, overwrite])

A class to create new images from existing ones within a Dataset.


Transformer from images to coordinates.

transforms.transform_images(images_df, ...)

Generate images of a given type from other image types and write out to files.

transforms.resolve_transforms(target, ...)

Determine and apply the appropriate transforms to a target image type from available data.


Calculate degrees of freedom from a list of sample sizes using a simple heuristic.


Calculate appropriate sample size from a list of sample sizes using a simple heuristic.

transforms.sd_to_varcope(sd, sample_size)

Convert standard deviation to sampling variance.


Convert standard error values to sampling variance.


Convert "sample variance of the dataset" to "sampling variance".

transforms.t_and_varcope_to_beta(t, varcope)

Convert t-statistic to parameter estimate using sampling variance.

transforms.t_and_beta_to_varcope(t, beta)

Convert t-statistic to sampling variance using parameter estimate.

transforms.p_to_z(p[, tail])

Convert p-values to (unsigned) z-values.

transforms.t_to_z(t_values, dof)

Convert t-statistics to z-statistics.

transforms.z_to_t(z_values, dof)

Convert z-statistics to t-statistics.

transforms.z_to_p(z[, tail])

Convert z-values to p-values.

nimare.extract: Dataset and model fetching

For more information about fetching data from the internet, see Fetching resources from the internet.

Dataset and trained model downloading functions.

extract.fetch_neuroquery([data_dir, ...])

Download the latest data files from NeuroQuery.

extract.fetch_neurosynth([data_dir, ...])

Download the latest data files from NeuroSynth.

extract.download_nidm_pain([data_dir, overwrite])

Download NIDM Results for 21 pain studies from NeuroVault for tests.

extract.download_mallet([data_dir, overwrite])

Download the MALLET toolbox for LDA topic modeling.

extract.download_cognitive_atlas([data_dir, ...])

Download Cognitive Atlas ontology and extract IDs and relationships.

extract.download_abstracts(dataset, email)

Download the abstracts for a list of PubMed IDs.


Download the trained Peaks2Maps model from OHBM 2018.


Return the directories in which NiMARE looks for data.

nimare.stats: Statistical functions

Various statistical helper functions.

stats.one_way(data, n)

One-way chi-square test of independence.


Two-way chi-square test of independence.

stats.pearson(x, y)

Correlate row vector x with each row vector in 2D array y, quickly.

stats.null_to_p(test_value, null_array[, ...])

Return p-value for test value(s) against null array.

stats.nullhist_to_p(test_values, ...)

Return one-sided p-value for test value against null histogram.

stats.fdr(p[, q])

Determine FDR threshold given a p value array and desired false discovery rate q.

nimare.generate: Data generation functions

Utilities for generating data for testing.

generate.create_coordinate_dataset([foci, ...])

Generate coordinate based dataset for meta analysis.


Download images from NeuroVault and use them to create a dataset.

nimare.utils: Utility functions and submodules

Utility functions for NiMARE.

utils.dict_to_df(id_df, data[, key])

Load a given data type in NIMADS-format dictionary into DataFrame.

utils.dict_to_coordinates(data, masker, space)

Load coordinates in NIMADS-format dictionary into DataFrame.


Check that an input is a DataFrame and has a column for 'id'.


Check and update image paths in DataFrame.

utils.get_template([space, mask])

Load template file.


Get an initialized, fitted nilearn Masker instance from passed argument.


Wrap all non-list or tuple objects in a list.


Round X.5 to the nearest integer away from zero.


Return the path to general resources, terminated with separator.

utils.try_prepend(value, prefix)

Try to prepend a value to a string with a separator ('/').


Find longest common substring in array of strings.


Convert UK spellings to US based on a converter.

utils.use_memmap(logger[, n_files])

Memory-map array to a file, and perform cleanup after.

utils.add_metadata_to_dataframe(dataset, ...)

Add metadata from a Dataset to a DataFrame.

utils.check_type(obj, clss, **kwargs)

Check variable type and initialize if necessary.

utils.vox2mm(ijk, affine)

Convert matrix subscripts to coordinates.

utils.mm2vox(xyz, affine)

Convert coordinates to matrix subscripts.


Convert coordinates from Talairach space to MNI space.


Convert coordinates from MNI space Talairach space.

nimare.workflows: Common workflows

Common meta-analytic workflows.

workflows.ale_sleuth_workflow(sleuth_file[, ...])

Perform ALE meta-analysis from Sleuth text file.


Run a contrast permutation workflow.

workflows.macm_workflow(dataset_file, mask_file)

Perform MACM with ALE algorithm.

workflows.peaks2maps_workflow(sleuth_file[, ...])

Run the peaks2maps workflow.

workflows.scale_workflow(dataset_file[, ...])

Perform SCALE meta-analysis from Sleuth text file or NiMARE json file.

nimare.base: Base classes

Base classes for NiMARE.


Base class for NiMARE.


Estimators take in Datasets and return MetaResults.

base.MetaEstimator(*args, **kwargs)

Base class for meta-analysis methods in nimare.meta.


Transformers take in Datasets and return Datasets.


Base class for decoders in nimare.decode.