Skip to content

Commit f478d3f

Browse files
authored
Merge pull request #180 from CoBrALab/updates
Added seeds to MELODIC runs to ensure reproducibility.
2 parents ed9fba2 + e2518ce commit f478d3f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rabies/analysis_pkg/analysis_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def run_group_ICA(bold_file_list, mask_file, dim):
222222

223223
from rabies.preprocess_pkg.utils import run_command
224224
out_dir = os.path.abspath('group_melodic.ica')
225-
command = f'melodic -i {file_path} -m {mask_file} -o {out_dir} -d {dim} --report'
225+
command = f'melodic -i {file_path} -m {mask_file} -o {out_dir} -d {dim} --report --seed=1'
226226
rc = run_command(command)
227227
IC_file = out_dir+'/melodic_IC.nii.gz'
228228
return out_dir, IC_file

rabies/conf_reg_pkg/mod_ICA_AROMA/ICA_AROMA_functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def runICA(fslDir, inFile, outDir, melDirIn, mask, dim, TR):
200200
'--ICs=' + melIC,
201201
'--mix=' + melICmix,
202202
'--outdir=' + melDir,
203-
'--Ostats --mmthresh=0.5']))
203+
'--Ostats --mmthresh=0.5 --seed=1']))
204204

205205
else:
206206
# If a melodic directory was specified, display that it did not contain all files needed for ICA-AROMA (or that the directory does not exist at all)
@@ -216,7 +216,7 @@ def runICA(fslDir, inFile, outDir, melDirIn, mask, dim, TR):
216216
'--outdir=' + melDir,
217217
'--mask=' + mask,
218218
'--dim=' + str(dim),
219-
'--Ostats --nobet --mmthresh=0.5 --report',
219+
'--Ostats --nobet --mmthresh=0.5 --report --seed=1',
220220
'--tr=' + str(TR)]))
221221

222222
# Get number of components

0 commit comments

Comments
 (0)