Command Line Interface

NiMARE provides several workflows as command-line interfaces, including ALE meta-analysis, meta-analytic coactivation modeling (MACM) analysis, peaks2maps image reconstruction, and contrast map meta-analysis. Each workflow should generate a boilerplate paragraph with details about the workflow and citations that can be used in a manuscript.

To use NiMARE from the command line, open a terminal window and type:

nimare --help

This will print the instructions for using the command line interface in your command line.

usage: nimare [-h]
              {ale,conperm,peaks2maps,macm,scale,sleuth2nimare,neurosynth2nimare}
              ...

Sub-commands:

ale

Run an activation likelihood estimation (ALE) meta-analysis on a Sleuth text file. ALE is a permutation-based meta-analysis of coordinates that uses 3D Gaussians to model activation.

nimare ale [-h] [--output_dir PATH] [--prefix PREFIX] [--file2 SLEUTH_FILE2]
           [--n_iters N_ITERS] [--v_thr V_THR] [--fwhm FWHM]
           [--n_cores N_CORES]
           sleuth_file

Positional Arguments

sleuth_file

Sleuth text file to analyze.

Named Arguments

--output_dir

Output directory.

Default: “.”

--prefix

Common prefix for output maps.

Default: “”

--file2

Optional second Sleuth file for subtraction analysis.

--n_iters

Number of iterations for permutation testing.

Default: 10000

--v_thr

Voxel p-value threshold used to create clusters.

Default: 0.001

--fwhm

Override sample size-based kernel determination with a single FWHM (in mm) applied to all experiments. Useful when sample size is not available for all data.

--n_cores

Number of processes to use for meta-analysis. If -1, use all available cores.

Default: 1

conperm

Meta-analysis of contrast maps using random effects and two-sided inference with empirical (permutation-based) null distribution and Family Wise Error multiple comparisons correction. Input may be a list of 3D files or a single 4D file.

nimare conperm [-h] [--mask FILE] [--output_dir PATH] [--prefix PREFIX]
               [--n_iters N_ITERS]
               FILE [FILE ...]

Positional Arguments

FILE

Data to analyze. May be a single 4D file or a list of 3D files.

Named Arguments

--mask

Mask file.

--output_dir

Output directory.

Default: “.”

--prefix

Common prefix for output maps.

Default: “”

--n_iters

Number of iterations for permutation testing.

Default: 10000

peaks2maps

Method for performing coordinate-based meta-analysis that uses a pretrained deep neural network to reconstruct unthresholded maps from peak coordinates. The reconstructed maps are evaluated for statistical significance using a permutation-based approach with Family Wise Error multiple comparison correction.

nimare peaks2maps [-h] [--output_dir PATH] [--prefix PREFIX]
                  [--n_iters N_ITERS]
                  sleuth_file

Positional Arguments

sleuth_file

Sleuth text file to analyze.

Named Arguments

--output_dir

Output directory.

Default: “.”

--prefix

Common prefix for output maps.

Default: “”

--n_iters

Number of iterations for permutation testing.

Default: 10000

macm

Run a meta-analytic coactivation modeling (MACM) analysis using activation likelihood estimation (ALE) on a NiMARE dataset file and a target mask.

nimare macm [-h] --mask MASK_FILE [--output_dir PATH] [--prefix PREFIX]
            [--n_iters N_ITERS] [--v_thr V_THR] [--n_cores N_CORES]
            dataset_file

Positional Arguments

dataset_file

Dataset file to analyze.

Named Arguments

--mask, --mask_file

Mask file

--output_dir

Output directory.

Default: “.”

--prefix

Common prefix for output maps.

Default: “”

--n_iters

Number of iterations for permutation testing.

Default: 10000

--v_thr

Voxel p-value threshold used to create clusters.

Default: 0.001

--n_cores

Number of processes to use for meta-analysis. If -1, use all available cores.

Default: 1

scale

Method for performing Specific CoActivation Likelihood Estimation (SCALE), a modified meta-analytic coactivation modeling (MACM) that takes activation frequency bias into account, for delineating distinct core networks of coactivation, using a permutation-based approach.

nimare scale [-h] [--baseline BASELINE] [--output_dir PATH] [--prefix PREFIX]
             [--n_iters N_ITERS] [--v_thr V_THR] [--n_cores N_CORES]
             dataset_file

Positional Arguments

dataset_file

Dataset file to analyze.

Named Arguments

--baseline

Voxel-wise baseline activation rates.

--output_dir

Output directory.

Default: “.”

--prefix

Common prefix for output maps.

Default: “”

--n_iters

Number of iterations for permutation testing.

Default: 2500

--v_thr

Voxel p-value threshold used to create clusters.

Default: 0.001

--n_cores

Number of processes to use for meta-analysis. If -1, use all available cores.

Default: 1

sleuth2nimare

Convert a Sleuth text file to a NiMARE json file.

nimare sleuth2nimare [-h] text_file out_file

Positional Arguments

text_file

Sleuth text file to convert.

out_file

Output file.

neurosynth2nimare

Convert a Neurosynth text file to a NiMARE json file.

nimare neurosynth2nimare [-h] [--annotations_file FILE] text_file out_file

Positional Arguments

text_file

Neurosynth text file to convert.

out_file

Output file.

Named Arguments

--annotations_file

Optional annotations (features) file.