From b9819eba6cb40fea216024bb2e9b95614c5be967 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Fri, 13 Nov 2015 10:24:39 +0000 Subject: [PATCH] Melodic group ICA (*.gica) directories are detected --- fsl/data/melodicresults.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fsl/data/melodicresults.py b/fsl/data/melodicresults.py index 46e78a624..18e5777c7 100644 --- a/fsl/data/melodicresults.py +++ b/fsl/data/melodicresults.py @@ -60,7 +60,7 @@ def isMelodicDir(path): """Returns ``True`` if the given path looks like it is contained within a MELODIC directory, ``False`` otherwise. A melodic directory: - - Must be named ``*.ica``. + - Must be named ``*.ica`` or ``*.gica``. - Must contain a file called ``melodic_IC.nii.gz``. - Must contain a file called ``melodic_mix``. - Must contain a file called ``melodic_FTmix``. @@ -71,7 +71,9 @@ def isMelodicDir(path): if op.isdir(path): dirname = path else: dirname = op.dirname(path) - if not dirname.endswith('.ica'): + sufs = ['.ica', '.gica'] + + if not any([dirname.endswith(suf) for suf in sufs]): return False # Must contain an image file called melodic_IC -- GitLab