API

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.

meta.esma Effect-size meta-analysis functions
meta.ibma Image-based meta-analysis estimators
meta.cbma.kernel Methods for estimating thresholded cluster maps from neuroimaging contrasts (Contrasts) from sets of foci and optional additional information (e.g., sample size and test statistic values).
meta.cbma.ale CBMA methods from the activation likelihood estimation (ALE) family
meta.cbma.mkda CBMA methods from the multilevel kernel density analysis (MKDA) family

nimare.results: Meta-analytic results

Base classes for datasets.

results.MetaResult(estimator, mask[, maps]) Base class for meta-analytic results.

nimare.correct: Multiple comparisons correction

Multiple comparisons correction methods

correct.FWECorrector([method]) 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

annotate.cogat Automated annotation of Cognitive Atlas labels.
annotate.cogpo Automated annotation of Cognitive Paradigm Ontology labels.
annotate.utils Utility functions for ontology tools.
annotate.boltzmann Topic modeling with deep Boltzmann machines.
annotate.gclda Topic modeling with generalized correspondence latent Dirichlet allocation.
annotate.lda Topic modeling with latent Dirichlet allocation via MALLET.
annotate.text2brain Generate a Text2Brain vector model.
annotate.word2brain GloVe model-based annotation.
annotate.text Text extraction tools.

nimare.decode: Functional characterization analysis

Functional decoding tools

decode.discrete Methods for decoding subsets of voxels (e.g., ROIs) or experiments (e.g., from meta-analytic clustering on a database) into text.
decode.continuous Methods for decoding unthresholded brain maps into text.
decode.encode Methods for encoding text into brain maps.

nimare.parcellate: Meta-analytic parcellation

Meta-analytic parcellation tools

parcellate.cbp Coactivation-based parcellation
parcellate.mamp Meta-analytic activation modeling-based parcellation (MAMP).
parcellate.mapbot Meta-analytic parcellation based on text (MAPBOT).

nimare.io: Input/Output

Input/Output operations.

io.convert_neurosynth_to_dict(text_file[, …]) Convert Neurosynth database files to a dictionary.
io.convert_neurosynth_to_json(text_file, …) Convert Neurosynth dataset text file to a NiMARE json file.
io.convert_neurosynth_to_dataset(text_file) Convert Neurosynth database files into dictionary and create NiMARE Dataset with dictionary.
io.convert_sleuth_to_dict(text_file) 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 dictionary and create NiMARE Dataset with dictionary.

nimare.extract: Dataset and model fetching

Dataset and trained model downloading functions

extract.download_nidm_pain([data_dir, …]) Download NIDM Results for 21 pain studies from NeuroVault for tests.
extract.download_mallet([data_dir, …]) Download the MALLET toolbox for LDA topic modeling.
extract.download_cognitive_atlas([data_dir, …]) Download Cognitive Atlas ontology and combine Concepts, Tasks, and Disorders to create ID and relationship DataFrames.
extract.download_abstracts(dataset, email) Download the abstracts for a list of PubMed IDs.
extract.download_peaks2maps_model([…]) Download the trained Peaks2Maps model from OHBM 2018.

nimare.stats: Statistical functions

Various statistical helper functions

stats.one_way(data, n) One-way chi-square test of independence.
stats.two_way(cells) Two-way chi-square test of independence.
stats.pearson(x, y) Correlates row vector x with each row vector in 2D array y.
stats.null_to_p(test_value, null_array[, tail]) Return two-sided p-value for test value against null array.
stats.p_to_z(p[, tail]) Convert p-values to z-values.
stats.t_to_z(t_values, dof) From Vanessa Sochat’s TtoZ package.
stats.fdr(p[, q]) Determine FDR threshold given a p value array and desired false discovery rate q.

nimare.utils: Utility functions and submodules

Utilities

utils.get_template([space, mask]) Load template file.
utils.listify(obj) Wraps all non-list or tuple objects in a list; provides a simple way to accept flexible arguments.
utils.round2(ndarray) Numpy rounds X.5 values to nearest even integer.
utils.vox2mm(ijk, affine) Convert matrix subscripts to coordinates.
utils.mm2vox(xyz, affine) Convert coordinates to matrix subscripts.
utils.tal2mni(coords) Python version of BrainMap’s tal2icbm_other.m.
utils.mni2tal(coords) Python version of BrainMap’s icbm_other2tal.m.
utils.get_resource_path() Returns the path to general resources, terminated with separator.

nimare.workflows: Common workflows

Common meta-analytic workflows

workflows.ale Workflow for running an ALE meta-analysis from a Sleuth text file.
workflows.conperm Workflow for running a contrast permutation meta-analysis on a set of images.
workflows.macm Perform MACM with ALE algorithm.
workflows.peaks2maps Workflow for contrast permutation meta-analysis on images constructed from coordinates using the Peaks2Maps kernel.
workflows.scale Workflow for running a SCALE meta-analysis from a Sleuth text file.

nimare.base: Base classes

Base classes for datasets.

base.NiMAREBase() Base class for NiMARE.
base.Estimator() Estimators take in Datasets and return MetaResults
base.Transformer() Transformers take in Datasets and return Datasets