diff --git a/fmralign/fetch_example_data.py b/fmralign/fetch_example_data.py index 245e3a7..b91a78d 100644 --- a/fmralign/fetch_example_data.py +++ b/fmralign/fetch_example_data.py @@ -2,7 +2,7 @@ import os import pandas as pd -from nilearn.datasets._utils import fetch_files, get_dataset_dir +from nilearn.datasets.utils import _fetch_files, _get_dataset_dir def fetch_ibc_subjects_contrasts(subjects, data_dir=None, verbose=1): @@ -34,7 +34,7 @@ def fetch_ibc_subjects_contrasts(subjects, data_dir=None, verbose=1): Path to the mask to be used on the data Notes ------ - This function is a caller to nilearn.datasets._utils.fetch_files in order + This function is a caller to nilearn.datasets.utils._fetch_files in order to simplify examples reading and understanding for fmralign. See Also --------- @@ -45,11 +45,11 @@ def fetch_ibc_subjects_contrasts(subjects, data_dir=None, verbose=1): if subjects == "all": subjects = ["sub-{i:02d}" for i in [1, 2, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15]] dataset_name = "ibc" - data_dir = get_dataset_dir(dataset_name, data_dir=data_dir, verbose=verbose) + data_dir = _get_dataset_dir(dataset_name, data_dir=data_dir, verbose=verbose) # download or retrieve metadatas, put it in a dataframe, # list all condition and specify path to the right directory - metadata_path = fetch_files( + metadata_path = _fetch_files( data_dir, [ ( @@ -67,7 +67,7 @@ def fetch_ibc_subjects_contrasts(subjects, data_dir=None, verbose=1): metadata_df = metadata_df[metadata_df.subject.isin(subjects)] # download / retrieve mask niimg and find its path - mask = fetch_files( + mask = _fetch_files( data_dir, [("gm_mask_3mm.nii.gz", "https://osf.io/yvju3/download", {"uncompress": True})], verbose=verbose, @@ -106,5 +106,5 @@ def fetch_ibc_subjects_contrasts(subjects, data_dir=None, verbose=1): for condition in conditions ] ) - files.append(fetch_files(data_dir, filenames, verbose=verbose)) + files.append(_fetch_files(data_dir, filenames, verbose=verbose)) return files, metadata_df, mask