Nimare Subtraction analysis PermissionError: [WinError 32]The process cannot access this file because it is being used by another program

Summary of what happened:

Hello, I downloaded the Two-sample ALE meta-analysis in Nimare Examples and got an error when doing the Subtraction analysis using Jupyter notebook. What should I do?

Command used:

from nimare.meta.cbma import ALESubtraction
from nimare.reports.base import run_reports
from nimare.workflows import PairwiseCBMAWorkflow

workflow = PairwiseCBMAWorkflow(
    estimator=ALESubtraction(n_iters=10, n_cores=1),
    diagnostics=FocusCounter(voxel_thresh=0.01, display_second_group=True),
res_sub =, related_dset)


PermissionError                           Traceback (most recent call last)
Cell In[9], line 10
      3 from nimare.workflows import PairwiseCBMAWorkflow
      5 workflow = PairwiseCBMAWorkflow(
      6     estimator=ALESubtraction(n_iters=10, n_cores=1),
      7     corrector="fdr",
      8     diagnostics=FocusCounter(voxel_thresh=0.01, display_second_group=True),
      9 )
---> 10 res_sub =, related_dset)

File ~\.conda\envs\nimare_env\lib\site-packages\nimare\workflows\, in, dataset1, dataset2, drop_invalid)
    159 dataset2 = _check_type(dataset2, Dataset)
    161"Performing meta-analysis...")
--> 162 results =, dataset2, drop_invalid=drop_invalid)
    164 return self._transform(results)

File ~\.conda\envs\nimare_env\lib\site-packages\nimare\meta\cbma\, in, dataset1, dataset2, drop_invalid)
    903 self.inputs_["coordinates2"] = self.inputs_.pop("coordinates")
    905 # Now run the Estimator-specific _fit() method.
--> 906 maps, tables, description = self._fit(dataset1, dataset2)
    908 if hasattr(self, "masker") and self.masker is not None:
    909     masker = self.masker

File ~\.conda\envs\nimare_env\lib\site-packages\nimare\, in use_memmap.<locals>.inner_function.<locals>.memmap_context(self, *args, **kwargs)
    701 if os.path.isfile(filename):
    702     logger.debug(f"Removing temporary file: {filename}")
--> 703     os.remove(filename)
    704 else:
    705     logger.debug(f"Temporary file DNE: {filename}")

PermissionError: [WinError 32] The process cannot access this file because it is being used by another program.: 'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\ALESubtraction6o_ka2vf20240111T133815'



Environment (custom installation):

conda create -n nimare_env python=3.10
conda activate nimare_env
pip install ipykernel
ipython kernel install --user --name=nimare_env
pip install nimare

Example download from:
( NiMARE: Neuroimaging Meta-Analysis Research Environment — NiMARE 0.2.0+0.g720c5c6.dirty documentation)

Extra questions

Display in the example:
“Typically, one would use at least 10000 iterations for a subtraction analysis. However, we have reduced this to 100 iterations for this example. Similarly here we use a voxel-level z-threshold of 0.01, but in practice one would use a more stringent threshold (e.g., 1.65).“
The code:
estimator=ALESubtraction(n_iters=10, n_cores=1),

Questions1: n_iters=10 means 100 iterations or just a writing errors?
Questions2: if chage iterations=10000, voxel_thresh=1.65, can the laptop support smooth operation?
11th Gen Intel(R) Core™ i5-11260H @ 2.60GHz 2.61 GHz
RAM 16.0 GB (15.7 GB available)
Questions3: In addition, whether the functional decoding analysis can be carried out smoothly?
Questions4: If the laptop cannot support the operation, the minimum configuration recommended for renting cloud computing services?

Thank you for taking the time to read my letter of appeal. I look forward to your response and hope that you can provide any possible assistance or advice.