From a66d626763cd66f5a90790bad50d3a7496af5b13 Mon Sep 17 00:00:00 2001 From: Samuel Louviot Date: Tue, 26 Nov 2024 16:01:39 -0500 Subject: [PATCH 1/5] refactored the bids_selector in order to be independent from pybids --- poetry.lock | 7 +- .../tools/artifacts_annotator.py | 6 +- src/eeg_research/system/bids_selector.py | 162 ++++++++++++------ 3 files changed, 108 insertions(+), 67 deletions(-) diff --git a/poetry.lock b/poetry.lock index a49a671..f842ca0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1122,29 +1122,24 @@ files = [ {file = "matplotlib-3.9.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd2a59ff4b83d33bca3b5ec58203cc65985367812cb8c257f3e101632be86d92"}, {file = "matplotlib-3.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0fc001516ffcf1a221beb51198b194d9230199d6842c540108e4ce109ac05cc0"}, {file = "matplotlib-3.9.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:83c6a792f1465d174c86d06f3ae85a8fe36e6f5964633ae8106312ec0921fdf5"}, - {file = "matplotlib-3.9.1-cp310-cp310-win_amd64.whl", hash = "sha256:421851f4f57350bcf0811edd754a708d2275533e84f52f6760b740766c6747a7"}, {file = "matplotlib-3.9.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:b3fce58971b465e01b5c538f9d44915640c20ec5ff31346e963c9e1cd66fa812"}, {file = "matplotlib-3.9.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a973c53ad0668c53e0ed76b27d2eeeae8799836fd0d0caaa4ecc66bf4e6676c0"}, {file = "matplotlib-3.9.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82cd5acf8f3ef43f7532c2f230249720f5dc5dd40ecafaf1c60ac8200d46d7eb"}, {file = "matplotlib-3.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ab38a4f3772523179b2f772103d8030215b318fef6360cb40558f585bf3d017f"}, {file = "matplotlib-3.9.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:2315837485ca6188a4b632c5199900e28d33b481eb083663f6a44cfc8987ded3"}, - {file = "matplotlib-3.9.1-cp311-cp311-win_amd64.whl", hash = "sha256:a0c977c5c382f6696caf0bd277ef4f936da7e2aa202ff66cad5f0ac1428ee15b"}, {file = "matplotlib-3.9.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:565d572efea2b94f264dd86ef27919515aa6d629252a169b42ce5f570db7f37b"}, {file = "matplotlib-3.9.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6d397fd8ccc64af2ec0af1f0efc3bacd745ebfb9d507f3f552e8adb689ed730a"}, {file = "matplotlib-3.9.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26040c8f5121cd1ad712abffcd4b5222a8aec3a0fe40bc8542c94331deb8780d"}, {file = "matplotlib-3.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d12cb1837cffaac087ad6b44399d5e22b78c729de3cdae4629e252067b705e2b"}, {file = "matplotlib-3.9.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0e835c6988edc3d2d08794f73c323cc62483e13df0194719ecb0723b564e0b5c"}, - {file = "matplotlib-3.9.1-cp312-cp312-win_amd64.whl", hash = "sha256:44a21d922f78ce40435cb35b43dd7d573cf2a30138d5c4b709d19f00e3907fd7"}, {file = "matplotlib-3.9.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:0c584210c755ae921283d21d01f03a49ef46d1afa184134dd0f95b0202ee6f03"}, {file = "matplotlib-3.9.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:11fed08f34fa682c2b792942f8902e7aefeed400da71f9e5816bea40a7ce28fe"}, {file = "matplotlib-3.9.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0000354e32efcfd86bda75729716b92f5c2edd5b947200be9881f0a671565c33"}, {file = "matplotlib-3.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4db17fea0ae3aceb8e9ac69c7e3051bae0b3d083bfec932240f9bf5d0197a049"}, {file = "matplotlib-3.9.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:208cbce658b72bf6a8e675058fbbf59f67814057ae78165d8a2f87c45b48d0ff"}, - {file = "matplotlib-3.9.1-cp39-cp39-win_amd64.whl", hash = "sha256:dc23f48ab630474264276be156d0d7710ac6c5a09648ccdf49fef9200d8cbe80"}, {file = "matplotlib-3.9.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:3fda72d4d472e2ccd1be0e9ccb6bf0d2eaf635e7f8f51d737ed7e465ac020cb3"}, {file = "matplotlib-3.9.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:84b3ba8429935a444f1fdc80ed930babbe06725bcf09fbeb5c8757a2cd74af04"}, {file = "matplotlib-3.9.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b918770bf3e07845408716e5bbda17eadfc3fcbd9307dc67f37d6cf834bb3d98"}, - {file = "matplotlib-3.9.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:f1f2e5d29e9435c97ad4c36fb6668e89aee13d48c75893e25cef064675038ac9"}, {file = "matplotlib-3.9.1.tar.gz", hash = "sha256:de06b19b8db95dd33d0dc17c926c7c9ebed9f572074b6fac4f65068a6814d010"}, ] @@ -2608,4 +2603,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "~3.12" -content-hash = "9f6ab70ed9c53912e2418db2b1633fc43fa7f605e9c06918df4d573da00122c8" +content-hash = "06c52f2c5f6ebab98589812eaf16eebd249768923ad2ccc1f9af665be0083e54" diff --git a/src/eeg_research/preprocessing/tools/artifacts_annotator.py b/src/eeg_research/preprocessing/tools/artifacts_annotator.py index cd181ca..188f52b 100644 --- a/src/eeg_research/preprocessing/tools/artifacts_annotator.py +++ b/src/eeg_research/preprocessing/tools/artifacts_annotator.py @@ -268,11 +268,7 @@ def print_statistics(self) -> 'ZscoreAnnotator': Total duration of good signal:......... { np.round(self.statistics['tot_good']['seconds'],2)}s ({ np.round(self.statistics['tot_good']['ratio']*100,2) - }%) - - Types of artifacts annotated: {', '.join( - self.statistics['tot_bad']['artifact_types'] - )}""") + }%)""") for artifact_type in self.statistics['tot_bad']['artifact_types']: this_artifact = self.statistics[artifact_type] diff --git a/src/eeg_research/system/bids_selector.py b/src/eeg_research/system/bids_selector.py index fe41a33..dbf2946 100644 --- a/src/eeg_research/system/bids_selector.py +++ b/src/eeg_research/system/bids_selector.py @@ -1,12 +1,28 @@ -"""Module that host the BIDSselector class.""" +"""Module that host the BIDSselector class. + +The pybids package (here mentioned in import bids) is a little bit too strict +when it comes to deal with datatype that are not BIDS standardized. Often +in derivatives we have this kind of non-standardized datatype such as +'eyetracking' or 'brainstate' or 'respiration' that are important to separate +as individual modality. The workaround is to either do a monkey patching to the +package by forcing it to allow such datatype or write from scratch a separate +class that would be less strict. +The monkey patching is not very pythonic and not recommended in the dev community +Because of the side effect that can induce. Therefore I am on the road to +write another 'bids-like' data handler (also simplier) from scratch. +This will be useful for everybody dealing with pseudo BIDS layout with the +possibility to customize the queries. +""" + import os import re +import pandas as pd from dataclasses import dataclass +from pathlib import Path import bids - @dataclass class BIDSselector: """A class for flexible selection of BIDS files based on customizable criteria. @@ -61,7 +77,7 @@ class BIDSselector: _convert_input_to_list: Parses range or list arguments for entities. """ - root: str | os.PathLike + root: Path | str | os.PathLike subject: str | None = None session: str | None = None task: str | None = None @@ -70,13 +86,14 @@ class BIDSselector: suffix: str | None = None extension: str | None = None - def __post_init__(self) -> None: - """Finishing some initializations.""" - self._original_layout = bids.layout.BIDSLayout(root=self.root, validate=False) - self.user_input = self.to_dict() - self._standardize_attributes() - self.set_bids_attributes() + def __post_init__(self) -> None: # noqa: D105 + self.root = Path(self.root) + for attribute in vars(self): + if getattr(self, attribute) is None: + setattr(self,attribute, '*') + self.data = self._get_layout() + def __str__(self) -> str: """Public string representation when calling print(). @@ -84,13 +101,10 @@ def __str__(self) -> str: str: String representation """ str_list = list() - for attribute, value in self.to_dict().items(): + for attribute, value in self.file_system.items(): if value is None: - all_existing_values = self._original_layout.get( - return_type="id", target=attribute - ) - - all_existing_values = [str(val) for val in all_existing_values] + all_existing_values = [str(val) + for val in self.data[attribute].unique()] if len(all_existing_values) <= 4: specification_str = ( @@ -166,22 +180,84 @@ def __add__(self, other): # noqa: ANN204, D105, ANN001 setattr(self, dict_key, list(set(val).union(set(dict_value)))) - def to_dict(self) -> dict: - """When inputs are needed. + def _construct_path(self): + + input_path_prefix = ['sub-','ses-',''] + input_path_elements = [self.subject, self.session, self.datatype] - Returns: - dict: The object attributes in a dictionary. - """ - return { - "subject": self.subject, - "session": self.session, - "task": self.task, - "run": self.run, - "datatype": self.datatype, - "suffix": self.suffix, - "extension": self.extension, + path_element_list = [f'{"".join([prefix,path_element])}' + for prefix, path_element in zip( + input_path_prefix, + input_path_elements + ) + ] + return Path(*path_element_list) + + def _construct_file(self): + + input_file_keys = ['sub-','ses-','task-','run-','acq-','desc-',''] + input_file_values = [ + self.subject, + self.session, + self.task, + self.run, + self.acquisition, + self.description, + self.suffix, + ] + + key_value_pairs = [f'{key}{value}' for key, value in zip( + input_file_keys, + input_file_values + ) + ] + + return Path('_'.join(key_value_pairs)).with_suffix(self.extension) + + def _construct_query(self): + return os.fspath(self._construct_path() / self._construct_file()) + + def _get_layout(self) -> pd.DataFrame: + """Finishing some.""" + + query = self._construct_query() + files_iterator = self.root.rglob(os.fspath(Path(*query))) + self.file_system = { + "root": [], + "subject": [], + "session": [], + "datatype": [], + "task": [], + "run": [], + "description": [], + "suffix": [], + "extension": [], } + for file in files_iterator: + self.file_system['root'].append(self.root) + path_parts = file.relative_to(self.root).parts + self.file_system['subject'].append(path_parts[0].split('-')[1]) + self.file_system['session'].append(path_parts[1].split('-')[1]) + self.file_system['datatype'].append(path_parts[2]) + desired_keys = ['task','run','desc','acq'] + + for file_part in file.stem.split('_'): + if len(file_part.split('-')) > 1: + key, value = file_part.split('-') + if key in desired_keys: + if key == 'desc': + key = 'description' + elif key == 'acq': + key = 'acquisition' + self.file_system[key].append(value) + + self.file_system['suffix'].append(file_part) + + self.file_system['extension'].append(file.suffix) + + return pd.DataFrame(self.file_system) + def _standardize_input_str(self, value: str) -> str: """Standardize the input string for consistency. @@ -209,34 +285,6 @@ class and also allow more flexibility on the user side. return value - def _standardize_attributes(self) -> "BIDSselector": - """Remove eventual prefixes for all the arguments of the object. - - Returns: - BIDSselector: The instance modified - """ - for attribute, value in self.to_dict().items(): - if isinstance(value, str): - regularized_value = self._standardize_input_str(value) - - elif isinstance(value, list): - regularized_value = [self._standardize_input_str(val) for val in value] # type: ignore - else: - regularized_value = value - - setattr(self, attribute, regularized_value) - - return self - - def _set_layout(self, indexer: bids.BIDSLayoutIndexer) -> bids.BIDSLayout: - """Set the BIDS layout with the given indexer based on args.datafolder.""" - return bids.BIDSLayout( - root=self.root, - validate="derivative" not in str(self.root).lower(), - is_derivative="derivative" in str(self.root).lower(), - indexer=indexer, - ) - def _convert_input_to_list(self, entity: str, value: str | None) -> list | None: """Parse range argument. @@ -279,6 +327,8 @@ def _convert_input_to_list(self, entity: str, value: str | None) -> list | None: return selection + def select(self, + ) def set_bids_attributes(self) -> "BIDSselector": """Set the converted values to all bids attributes. From 2ff147ff53e9bbcb3d487756467623484d84ed8e Mon Sep 17 00:00:00 2001 From: Samuel Louviot Date: Wed, 27 Nov 2024 14:41:34 -0500 Subject: [PATCH 2/5] Finished freeing bids_selector from pybids --- src/eeg_research/system/bids_selector.py | 148 +++++++++++------------ 1 file changed, 70 insertions(+), 78 deletions(-) diff --git a/src/eeg_research/system/bids_selector.py b/src/eeg_research/system/bids_selector.py index dbf2946..efbfd15 100644 --- a/src/eeg_research/system/bids_selector.py +++ b/src/eeg_research/system/bids_selector.py @@ -80,18 +80,16 @@ class BIDSselector: root: Path | str | os.PathLike subject: str | None = None session: str | None = None + datatype: str | None = None task: str | None = None run: str | None = None - datatype: str | None = None + acquisition: str | None = None + description: str | None = None suffix: str | None = None extension: str | None = None def __post_init__(self) -> None: # noqa: D105 self.root = Path(self.root) - for attribute in vars(self): - if getattr(self, attribute) is None: - setattr(self,attribute, '*') - self.data = self._get_layout() def __str__(self) -> str: @@ -186,42 +184,61 @@ def _construct_path(self): input_path_elements = [self.subject, self.session, self.datatype] path_element_list = [f'{"".join([prefix,path_element])}' - for prefix, path_element in zip( + if path_element is not None else '*' + for prefix, path_element in zip( input_path_prefix, input_path_elements - ) + ) ] return Path(*path_element_list) def _construct_file(self): - input_file_keys = ['sub-','ses-','task-','run-','acq-','desc-',''] - input_file_values = [ - self.subject, - self.session, - self.task, - self.run, - self.acquisition, - self.description, - self.suffix, - ] - - key_value_pairs = [f'{key}{value}' for key, value in zip( - input_file_keys, - input_file_values - ) + attributes = [ + ("sub-", self.subject), + ("ses-", self.session), + ("task-",self.task), + ("run-", self.run), + ("acq-", self.acquisition), + ("desc-",self.description), ] + + if all([attribute is None for _, attribute in attributes]): + return '*' - return Path('_'.join(key_value_pairs)).with_suffix(self.extension) + first_none_replaced = False + parts = [] + + for key, value in attributes: + if value is not None: + parts.append(f"{key}{value}") + first_none_replaced = False + elif not first_none_replaced: + parts.append("*") + first_none_replaced = True + + filename = "_".join(parts) + + if self.suffix is not None: + filename = filename + f"_{self.suffix}" + if self.extension is not None: + if not first_none_replaced and self.suffix is None: + filename = filename + f"*.{self.extension}" + else: + filename = filename + f".{self.extension}" + elif self.extension is None: + filename = filename + '*' + + filename = filename.replace("_*_","*") + return filename - def _construct_query(self): + def _construct_glob_query(self): return os.fspath(self._construct_path() / self._construct_file()) def _get_layout(self) -> pd.DataFrame: """Finishing some.""" - query = self._construct_query() - files_iterator = self.root.rglob(os.fspath(Path(*query))) + files_iterator = self.root.rglob(self._construct_glob_query()) self.file_system = { "root": [], "subject": [], @@ -230,8 +247,10 @@ def _get_layout(self) -> pd.DataFrame: "task": [], "run": [], "description": [], + "acquisition": [], "suffix": [], "extension": [], + "filename": [], } for file in files_iterator: @@ -241,20 +260,31 @@ def _get_layout(self) -> pd.DataFrame: self.file_system['session'].append(path_parts[1].split('-')[1]) self.file_system['datatype'].append(path_parts[2]) desired_keys = ['task','run','desc','acq'] + file_parts = file.stem.split('_') - for file_part in file.stem.split('_'): - if len(file_part.split('-')) > 1: - key, value = file_part.split('-') - if key in desired_keys: - if key == 'desc': - key = 'description' - elif key == 'acq': - key = 'acquisition' - self.file_system[key].append(value) - - self.file_system['suffix'].append(file_part) + + for desired_key in desired_keys: + + if desired_key in file.stem: + value = [ + part.split('-')[1] + for part in file_parts + if desired_key in part + ][0] + else: + value = None + + if desired_key == 'desc': + desired_key = 'description' + + elif desired_key == 'acq': + desired_key = 'acquisition' + + self.file_system[desired_key].append(value) + self.file_system['suffix'].append(file_parts[-1]) self.file_system['extension'].append(file.suffix) + self.file_system['filename'].append(file) return pd.DataFrame(self.file_system) @@ -327,44 +357,6 @@ def _convert_input_to_list(self, entity: str, value: str | None) -> list | None: return selection - def select(self, - ) - def set_bids_attributes(self) -> "BIDSselector": - """Set the converted values to all bids attributes. - - Returns: - dict: The attribute/value pairs - """ - for attribute, old_value in self.to_dict().items(): - setattr(self, attribute, self._convert_input_to_list(attribute, old_value)) - - return self - - @property - def layout(self) -> bids.BIDSLayout: - """Update the BIDSLayout to only include given entities. - - As of April 2024, BIDSLayoutIndexer's **filters argument does not work. - Therefore, a workaround is implemented to filter out files that are not indexed. - """ - self.set_bids_attributes() - all_files = self._original_layout.get(return_type="file") - filtered_files = self._original_layout.get( - return_type="file", **{key: val for key, val in self.to_dict().items()} - ) - - # Get the files to ignore - ignored_files = list(set(all_files) - set(filtered_files)) - - # Define the default ignore patterns - default_ignore = [ - re.compile(r"^/(code|models|sourcedata|stimuli)"), - re.compile(r"/\."), - ] - - # Create a new BIDSLayoutIndexer object to also ignored these files - indexer = bids.BIDSLayoutIndexer(ignore=default_ignore + ignored_files) - - # Create a new BIDSLayout object with the new indexer - layout = self._set_layout(indexer) - return layout.get(return_type="filename") + def select(self): + pass + \ No newline at end of file From f625a9c8fafe4811bbac329e8606061b8f0b0c2a Mon Sep 17 00:00:00 2001 From: Samuel Louviot Date: Wed, 4 Dec 2024 11:03:28 -0500 Subject: [PATCH 3/5] Finish the selector method --- pyproject.toml | 3 + src/eeg_research/system/bids_selector.py | 516 +++++--- src/eeg_research/system/test_lab.ipynb | 1369 ++++++++++++++++++++++ tests/__init__.py | 0 tests/system/test_bids_selector.py | 184 +-- tests/system/test_bids_simulator.py | 2 +- 6 files changed, 1804 insertions(+), 270 deletions(-) create mode 100644 src/eeg_research/system/test_lab.ipynb create mode 100644 tests/__init__.py diff --git a/pyproject.toml b/pyproject.toml index 7700c08..151b5eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,9 @@ pythonpath = [ testpaths = [ "tests" ] +python_files = ["test_*.py"] +python_classes = ["Test*"] +python_functions = ["test_*"] [tool.mypy] ignore_missing_imports = true diff --git a/src/eeg_research/system/bids_selector.py b/src/eeg_research/system/bids_selector.py index efbfd15..c566d00 100644 --- a/src/eeg_research/system/bids_selector.py +++ b/src/eeg_research/system/bids_selector.py @@ -1,13 +1,13 @@ -"""Module that host the BIDSselector class. +"""Module that host the BIDS architecture and selector classes. -The pybids package (here mentioned in import bids) is a little bit too strict +The pybids or mne-bids packages are a little bit too strict when it comes to deal with datatype that are not BIDS standardized. Often in derivatives we have this kind of non-standardized datatype such as 'eyetracking' or 'brainstate' or 'respiration' that are important to separate as individual modality. The workaround is to either do a monkey patching to the -package by forcing it to allow such datatype or write from scratch a separate +packages by forcing it to allow such datatype or write from scratch a separate class that would be less strict. -The monkey patching is not very pythonic and not recommended in the dev community +The monkey patching is not very pythonic and is not recommended in the dev community Because of the side effect that can induce. Therefore I am on the road to write another 'bids-like' data handler (also simplier) from scratch. This will be useful for everybody dealing with pseudo BIDS layout with the @@ -16,65 +16,60 @@ class that would be less strict. import os -import re -import pandas as pd from dataclasses import dataclass +from functools import reduce from pathlib import Path -import bids +import pandas as pd + + +def is_numerical(dataframe: pd.DataFrame, column_name: str): + return all(dataframe[column_name].apply(lambda string: string.isdigit())) @dataclass -class BIDSselector: - """A class for flexible selection of BIDS files based on customizable criteria. +class BidsArchitecture: + """A flexible and lightweight BIDS file selector. + + This class provides an intuitive interface to query and select files from BIDS datasets, + including non-standardized derivatives. It handles custom modalities like eyetracking, + brainstate, or respiration data that standard BIDS tools may not support. - This class allows users to select files from a BIDS dataset by specifying - various BIDS entities such as subject, session, task, run, and more. Users - can input ranges, individual IDs, or lists to customize file selection - without manually specifying each file. This is especially useful for large - datasets where the starting and ending IDs may be unknown or numerous. + Key Features: + - Flexible file selection using wildcards and patterns + - Support for non-standard BIDS derivatives + - Simple query interface for complex file patterns + - Pandas DataFrame output for easy data manipulation Args: - root (str | os.PathLike): Root directory of the BIDS dataset. - subject (str | None, optional): Subject(s) to select. Can be - a single ID, a range (e.g., "10-100"), or '*' for all subjects. - session (str | None, optional): Session(s) to select. Similar - input options as `subject`. - task (str | None, optional): Task(s) to select. - run (str | None, optional): Run(s) to select. - datatype (str | None, optional): Data type(s) to select. - suffix (str | None, optional): File suffix(es) to select. - extension (str | None, optional): File extension(s) to select. - - Example: - To select all subjects from "10" onward, specify `subject='10-*'`. - To select up to subject "20" only, use `subject='*-20'`. Alternatively, - provide a list of specific subject IDs (e.g., `subject=['10', '15', '30']`). - - Attributes: - user_input (dict): Dictionary of user-provided selections for various - BIDS entities. - _original_layout (bids.BIDSLayout): The original BIDS layout for - querying files. - layout (list): The BIDS layout, filtered by the current selection - criteria. + root (Path | str): Root directory of the BIDS dataset + subject (str, optional): Subject identifier (e.g. "01") + session (str, optional): Session identifier + datatype (str, optional): Data modality (e.g. "eeg", "eyetracking") + task (str, optional): Task identifier + run (str, optional): Run number + acquisition (str, optional): Acquisition identifier + description (str, optional): Description tag + suffix (str, optional): File suffix + extension (str, optional): File extension without dot + + Examples: + >>> selector = BidsArchitecture(root="data/") + >>> selector = BidsArchitecture( + ... root="data/", + ... subject="01", + ... task="rest", + ... datatype="eeg" + ... ) + + Properties: + files_dataframe (pd.DataFrame): Selected files with BIDS entities as columns + query_instruction (str): Current query pattern used for file selection Methods: - __post_init__: Completes initialization by regularizing attributes - and setting BIDS attributes based on user input. - __str__: Returns a string representation of the current selection - criteria and the number of matching files. - __add__: Merges selections with another BIDSselector instance or - dictionary. - to_dict: Returns the current BIDS entity attributes as a dictionary. - set_bids_attributes: Updates the BIDS attributes for selection. - - Internal Helper Methods: - _regularize_input_str: Removes prefixes from entity values for - consistent selection. - _regularize_attributes: Regularizes prefixes across all BIDS - entities in the object. - _set_layout: Initializes a new BIDS layout with a specified indexer. - _convert_input_to_list: Parses range or list arguments for entities. + _construct_path(): Builds BIDS directory path pattern + _construct_file(): Builds BIDS filename pattern + _construct_glob_query(): Combines path and file patterns + _get_layout(): Scans filesystem and builds DataFrame """ root: Path | str | os.PathLike @@ -90,7 +85,7 @@ class BIDSselector: def __post_init__(self) -> None: # noqa: D105 self.root = Path(self.root) - self.data = self._get_layout() + self._get_layout(self._construct_glob_query()) def __str__(self) -> str: """Public string representation when calling print(). @@ -99,43 +94,34 @@ def __str__(self) -> str: str: String representation """ str_list = list() - for attribute, value in self.file_system.items(): - if value is None: - all_existing_values = [str(val) - for val in self.data[attribute].unique()] - - if len(all_existing_values) <= 4: - specification_str = ( - f"({ ', '.join(list(map(lambda s: str(s), - all_existing_values))) })" - ) - else: - specification_str = ( - f"({str(all_existing_values[0])} ... {str(all_existing_values[-1])})" - ) + print(f"Results for query: {self.query_instruction}") + for attribute in self.database.columns: + if attribute == "filename": + continue - value_length = "All" + all_existing_values = [ + str(val) + for val in self.database[attribute].unique() + ] - elif isinstance(value, str): - specification_str = f"({value})" - value_length = "1" + if len(all_existing_values) <= 4: + specification_str = ( + f"({ ', '.join([str(s) for s in all_existing_values])})" + ) + else: + specification_str = ( + f"({str(all_existing_values[0])} "\ + f"... {str(all_existing_values[-1])})" + ) - elif isinstance(value, list): - if len(value) <= 4: - specification_str = ( - f"({ ', '.join(list(map(lambda s: str(s),value)))})" - ) - else: - specification_str = f"({str(value[0])} ... {str(value[-1])})" - value_length = str(len(value)) + value_length = str(len(all_existing_values)) str_list.append( f"{str(attribute).capitalize()}s: {value_length} " f"{specification_str}" ) - files = self.layout - all_str = f"{'\n'.join(str_list)}\nFiles: {len(files)}" + all_str = f"{'\n'.join(str_list)}\nFiles: {len(self.database)}" return all_str def __add__(self, other): # noqa: ANN204, D105, ANN001 @@ -178,8 +164,15 @@ def __add__(self, other): # noqa: ANN204, D105, ANN001 setattr(self, dict_key, list(set(val).union(set(dict_value)))) - def _construct_path(self): + def _construct_path(self) -> Path: + """Build the BIDS directory path pattern. + Constructs a Path object representing the directory structure: + sub-{subject}/ses-{session}/{datatype} + + Returns: + Path: Directory path pattern with appropriate wildcards + """ input_path_prefix = ['sub-','ses-',''] input_path_elements = [self.subject, self.session, self.datatype] @@ -192,7 +185,15 @@ def _construct_path(self): ] return Path(*path_element_list) - def _construct_file(self): + def _construct_file(self) -> str: + """Build the BIDS filename pattern. + + Constructs a filename pattern following BIDS conventions: + sub-{subject}_ses-{session}_task-{task}_run-{run}_desc-{desc}_{suffix}.{ext} + + Returns: + str: Filename pattern with appropriate wildcards + """ attributes = [ ("sub-", self.subject), @@ -210,7 +211,7 @@ def _construct_file(self): parts = [] for key, value in attributes: - if value is not None: + if value: parts.append(f"{key}{value}") first_none_replaced = False elif not first_none_replaced: @@ -219,88 +220,117 @@ def _construct_file(self): filename = "_".join(parts) - if self.suffix is not None: - filename = filename + f"_{self.suffix}" - if self.extension is not None: + if self.suffix: + filename = f"{filename}_{self.suffix}" + + if self.extension: if not first_none_replaced and self.suffix is None: filename = filename + f"*.{self.extension}" else: filename = filename + f".{self.extension}" - elif self.extension is None: + else: filename = filename + '*' - filename = filename.replace("_*_","*") + filename = filename.replace("_*_","*").replace("**","*") return filename - def _construct_glob_query(self): - return os.fspath(self._construct_path() / self._construct_file()) - - def _get_layout(self) -> pd.DataFrame: - """Finishing some.""" + def _construct_glob_query(self) -> str: + """Combine path and filename patterns for filesystem query. - files_iterator = self.root.rglob(self._construct_glob_query()) - self.file_system = { - "root": [], - "subject": [], - "session": [], - "datatype": [], - "task": [], - "run": [], - "description": [], - "acquisition": [], - "suffix": [], - "extension": [], - "filename": [], - } - - for file in files_iterator: - self.file_system['root'].append(self.root) - path_parts = file.relative_to(self.root).parts - self.file_system['subject'].append(path_parts[0].split('-')[1]) - self.file_system['session'].append(path_parts[1].split('-')[1]) - self.file_system['datatype'].append(path_parts[2]) - desired_keys = ['task','run','desc','acq'] - file_parts = file.stem.split('_') + Returns: + str: Complete glob pattern for file selection + """ + self.query_instruction = os.fspath( + self._construct_path() / self._construct_file() + ) + return self.query_instruction + + def parse_filename(self, file: Path | str) -> dict: + """Extract BIDS entities from filename. + + Args: + file: Path or string of file to parse + + Returns: + dict: BIDS entities extracted from filename + Keys: root, subject, session, datatype, task, run, + acquisition, description, suffix, extension, filename + """ + if isinstance(file, str): + file = Path(file) + + path_parts = file.relative_to(self.root).parts + + file_parts = {} + file_parts['root'] = self.root + file_parts['subject'] = file.name.split('_')[0].split('-')[1] + file_parts['session'] = file.name.split('_')[1].split('-')[1] + try: + file_parts['datatype'] = path_parts[2] + except Exception: + Warning('No datatype detected') + + desired_keys = ['task','run','desc','acq'] + splitted_filename = file.stem.split('_') + for desired_key in desired_keys: + if desired_key in file.stem: + value = [ + part.split('-')[1] + for part in splitted_filename + if desired_key in part + ][0] + else: + value = None - for desired_key in desired_keys: + if desired_key == 'desc': + desired_key = 'description' + + elif desired_key == 'acq': + desired_key = 'acquisition' + + file_parts[desired_key] = value - if desired_key in file.stem: - value = [ - part.split('-')[1] - for part in file_parts - if desired_key in part - ][0] - else: - value = None + file_parts['suffix'] = splitted_filename[-1] + file_parts['extension'] = file.suffix + file_parts['filename'] = file - if desired_key == 'desc': - desired_key = 'description' - - elif desired_key == 'acq': - desired_key = 'acquisition' - - self.file_system[desired_key].append(value) - - self.file_system['suffix'].append(file_parts[-1]) - self.file_system['extension'].append(file.suffix) - self.file_system['filename'].append(file) + return file_parts - return pd.DataFrame(self.file_system) + def _get_layout(self, query: str = '*') -> pd.DataFrame: + """Scan filesystem and build DataFrame of matching files. + + Args: + query: Glob pattern for file selection + + Returns: + pd.DataFrame: DataFrame containing all matching files and their BIDS entities + """ + files_iterator = Path(self.root).rglob(query) + database_keys = ['root','subject','session','datatype','task','run', + 'acquisition', 'description','suffix','extension','filename'] - def _standardize_input_str(self, value: str) -> str: - """Standardize the input string for consistency. + data_base_dict: dict[str, list] = {key: [] for key in database_keys} - Sometime we can think about a list of subject being ['sub-01','sub-02'] - while the authorized input is ['01', '02'] or '01-*'. This function - remove the prefix from the input string for consistency inside of the - class and also allow more flexibility on the user side. + for file in files_iterator: + file_parts = self.parse_filename(file) + for key, value in file_parts.items(): + data_base_dict[key].append(value) - Args: - value (str): The value to convert + self.database = pd.DataFrame(data_base_dict) + + return self + def _standardize_input_str(self, value: str) -> str: + """Remove BIDS prefixes from input strings. + + Standardizes inputs by removing prefixes like 'sub-', 'ses-', etc. + + Args: + value: Input string to standardize + Returns: - str: The converted value + str: Standardized string without BIDS prefixes """ prefix_list = [ "sub-", @@ -314,49 +344,167 @@ class and also allow more flexibility on the user side. return value.replace(prefix, "") return value + + def _get_range(self, + dataframe_column: pd.core.series.Series, + start: int | str | None = None, + stop: int | str | None = None) -> pd.core.series.Series: + + if isinstance(start, str): + start = int(start) + + if isinstance(stop, str): + stop = int(stop) - def _convert_input_to_list(self, entity: str, value: str | None) -> list | None: - """Parse range argument. + dataframe_column = dataframe_column.apply(lambda s: int(s)) + + if start is None or start == '*': + start = min(dataframe_column) + + if stop is None or stop == '*': + stop = max(dataframe_column) + + return (start <= dataframe_column) & (dataframe_column < stop) + + def _get_single_loc(self, + dataframe_column: pd.core.series.Series, + value: str) -> pd.core.series.Series: + + locations_found = dataframe_column == value + if not any(locations_found): + raise Exception('No location corresponding found in the database') + else: + return dataframe_column == value + + def _is_numerical(self, + dataframe_column: pd.core.series.Series + ) -> pd.core.series.Series: + return all( + dataframe_column.apply(lambda string: string.isdigit()) + ) + + def _interpret_string(self, + dataframe_column: pd.core.series.Series, + string: str, + ) -> pd.core.series.Series: + """I want to interpret the string when there is a `-`. Check if + The splitted results are 2 digit. If not throw an error saying that the + input must be 2 digit separated by a `-` or 1 digit and a wild card `*` + separated by a `-`. If everything is ok run the get range. Args: - entity: The entity to get from the layout. - value: The value to parse. + string (str): _description_ + """ + if '-' in string: + start, stop = string.split('-') + conditions = [ + (start.isdigit() or start == '*'), + (stop.isdigit() or stop == '*') + ] + + if not all(conditions): + raise ValueError("Input must be 2 digits separated by a `-` or "\ + "1 digit and a wild card `*` separated by a `-`") + + return self._get_range( + dataframe_column=dataframe_column, + start=int(start) if start.isdigit() else None, + stop=int(stop) if stop.isdigit() else None + ) - Returns: - A list of IDs or a string. + else: + return self._get_single_loc(dataframe_column, string) + + def _perform_selection(self, + dataframe_column: pd.core.series.Series, + value: str) -> pd.core.series.Series: + + if self._is_numerical(dataframe_column): + return self._interpret_string(dataframe_column,value) + else: + return self._get_single_loc(dataframe_column, value) + + def select(self, **kwargs) -> pd.DataFrame: + """Select files from database based on BIDS entities. + + If the argument is not None check if it is a list or a string. If it is + a string then check if there is any `-` and `*`. If it is the case then + call the string interpreter to generate a truth table of a selection of + a range. If not then only get the truth table directly with an == passed + on the dataframe. Check if the string value exist in the unique values + of the dataframe. If not throw an error. + If it is a list then iterate over the list and for each value of the list + perfor the check above. The truth table should be a list that is appending + as a function of the iteration over argument to generate a final table + that would be the selection. + + Remember to throw a warning if all the table is False (if not any()). - Raises: - ValueError: If the entity contains non-integers and a range is provided. - IndexError: If the start or end index is out of range. + Args: + subject: Subject identifier + session: Session identifier + datatype: Data type identifier + task: Task identifier + run: Run identifier + acquisition: Acquisition identifier + description: Description identifier + suffix: Suffix identifier + extension: File extension + Returns: + pd.DataFrame: DataFrame containing selected files and their BIDS entities """ - existing_values = self._original_layout.get(target=entity, return_type="id") - - if value == "*" or value is None: - selection = existing_values - - elif "," in value: - if "[" in value: - value = value[1:-1] - from_input = set(value.replace(" ", "").split(",")) - from_existing = set(existing_values) - selection = list(from_input.intersection(from_existing)) - - elif "-" in value: - start, end = value.split("-") - if start == "*": - selection = existing_values[: existing_values.index(end) + 1] - elif end == "*": - selection = existing_values[existing_values.index(start) :] - else: - selection = existing_values[ - existing_values.index(start) : existing_values.index(end) + + possible_arguments = [ + "subject", + "session", + "datatype", + "task", + "run", + "acquisition", + "description", + "suffix", + "extension", + ] + + for argument_name in kwargs.keys(): + if argument_name not in possible_arguments: + raise Exception("Argument must be one of the following"\ + f"{', '.join(possible_arguments)}") + + condition_for_select = list() + for name, value in kwargs.items(): + + if value is not None: + conditions = [ + isinstance(value,str), + isinstance(value,list) ] - else: - selection = value + if any(conditions): + col = self.database[name] + + if isinstance(value, str): + value = [value] - return selection + temp_selection = list() + for individual_value in value: + individual_value = self._standardize_input_str(individual_value) + temp_selection.append( + self._perform_selection(col, individual_value) + ) - def select(self): - pass - \ No newline at end of file + if len(temp_selection) > 1: + temp_selection = reduce(lambda x, y: x | y, temp_selection) + + else: + temp_selection = temp_selection[0] + + condition_for_select.append(temp_selection) + + + else: + raise TypeError('Argument must be either string or list') + + selection = reduce(lambda x, y: x & y, condition_for_select) + return self.database.loc[selection] + \ No newline at end of file diff --git a/src/eeg_research/system/test_lab.ipynb b/src/eeg_research/system/test_lab.ipynb new file mode 100644 index 0000000..a224a87 --- /dev/null +++ b/src/eeg_research/system/test_lab.ipynb @@ -0,0 +1,1369 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "from eeg_research.system.bids_selector import BidsArchitecture\n", + "root = \"/data2/Projects/eeg_fmri_natview/derivatives\"\n", + "architecture = BidsArchitecture(root = root,)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['01', '02'], dtype=object)" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "architecture.select(subject=[\"01\",\"02\"])['subject'].unique()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "a = ['a','b','caca','popo']\n", + "'caca' in a" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "pandas.core.series.Series" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type(architecture.database['subject'])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import pandas as pd\n", + "def is_numerical(dataframe: pd.DataFrame, column_name: str):\n", + " return all(dataframe[column_name].apply(lambda string: string.isdigit()))\n", + "\n", + "\n", + "\n", + "is_numerical(architecture.database, 'session')\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "pandas.core.series.Series" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import numpy as np\n", + "lower = (2 <= architecture.database['subject'].astype(int))\n", + "higher = (architecture.database['subject'].astype(int) < 9)\n", + "type(lower & higher)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "min(architecture.database['subject'].astype(int))" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-dmh_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-tp_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-monkey2_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-monkey1_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-inscapes_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-monkey2_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-monkey1_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-monkey5_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-monkey2_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-monkey1_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-monkey2_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-monkey1_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-monkey2_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-monkey2_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-dmh_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-monkey2_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-dmh_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-tp_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-monkey1_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-monkey5_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-dme_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-peer_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-monkey1_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-monkey2_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-monkey2_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-dmh_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-dmh_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-peer_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-dme_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-monkey2_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-inscapes_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-peer_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-dmh_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-tp_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-monkey2_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-dmh_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-monkey2_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-monkey1_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-monkey2_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-dme_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-monkey2_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-monkey2_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-monkey5_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-monkey2_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-dmh_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-tp_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-inscapes_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-dmh_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-monkey5_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-dmh_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-monkey2_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-rest_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-monkey5_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-monkey5_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-monkey2_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-dme_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-dmh_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-monkey5_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-monkey5_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-monkey5_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-tp_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-dmh_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-peer_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-19_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-monkey2_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-monkey5_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-monkey2_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-inscapes_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-monkey5_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-dmh_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-peer_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-19_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-monkey5_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-tp_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-dmh_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-monkey5_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-monkey2_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-dme_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-monkey5_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-tp_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-monkey2_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-monkey5_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-dmh_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-peer_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-tp_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-checker_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-monkey2_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-peer_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-monkey2_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-dmh_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-dmh_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-monkey5_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-tp_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-19_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-monkey5_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-dmh_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-monkey2_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-monkey2_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-dmh_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-monkey5_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-dmh_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-monkey5_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-monkey2_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-dmh_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-dmh_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-monkey2_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-inscapes_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-monkey2_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-monkey5_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-tp_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-inscapes_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-monkey5_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-monkey2_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-inscapes_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-peer_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-inscapes_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-dmh_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-monkey5_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-monkey2_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-monkey5_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-dme_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-monkey1_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-monkey5_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-19_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-dmh_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-monkey5_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-monkey5_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-monkey2_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-checker_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-monkey2_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-inscapes_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-inscapes_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-monkey5_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-monkey1_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-dmh_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-monkey5_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-monkey5_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-dme_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-dmh_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-monkey5_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-monkey5_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-dme_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-dme_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-tp_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-rest_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-peer_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-monkey5_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-monkey5_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-monkey2_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-tp_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-dmh_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-dmh_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-peer_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-monkey5_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-dme_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-dmh_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-monkey5_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-monkey5_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-monkey2_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-monkey5_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-dmh_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-monkey2_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-tp_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-monkey5_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-monkey1_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-dmh_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-peer_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-monkey5_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-monkey2_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-monkey1_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-dmh_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-dmh_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-tp_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-inscapes_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-monkey5_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-dmh_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-dmh_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-monkey2_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-dmh_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-inscapes_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-monkey2_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-dmh_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-tp_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-monkey1_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-monkey5_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-monkey2_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-monkey5_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-monkey5_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-monkey2_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-monkey1_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-dmh_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-monkey5_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-dmh_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-dmh_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-inscapes_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-monkey5_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-19_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-monkey1_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-dme_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-dmh_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-peer_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-monkey2_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-monkey2_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-dmh_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-monkey1_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-monkey5_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-monkey2_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-monkey1_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-monkey1_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-peer_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-dmh_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-inscapes_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-monkey1_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-monkey2_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-dme_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-tp_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-inscapes_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-dmh_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-monkey5_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-dme_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-dmh_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-peer_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-monkey1_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-monkey2_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-dmh_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-tp_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-rest_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-dme_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-tp_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-monkey2_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-dme_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-tp_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-dme_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-monkey2_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-peer_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-19_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-peer_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-inscapes_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-monkey2_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-monkey2_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-peer_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-peer_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-dme_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-dmh_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-peer_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-monkey1_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-19_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-monkey5_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-19_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-dmh_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-monkey5_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-dmh_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-monkey5_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-monkey1_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-dmh_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-peer_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-dmh_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-monkey2_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-monkey5_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-monkey1_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-monkey2_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-tp_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-monkey5_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-monkey5_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-01_task-dme_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-checker_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-inscapes_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-dmh_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-monkey5_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-inscapes_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-dmh_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-dmh_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-monkey5_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-dme_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-monkey2_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-dmh_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-monkey2_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-dme_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-monkey5_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-tp_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-monkey5_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-peer_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-inscapes_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-tp_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-monkey5_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-checker_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-inscapes_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-inscapes_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-monkey2_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-02_task-dmh_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-02_task-monkey2_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-inscapes_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-dme_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-dmh_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-monkey1_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-dmh_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-monkey5_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-peer_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-peer_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-dme_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-dmh_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-19_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-peer_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-dmh_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-monkey2_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-peer_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-01_task-inscapes_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-inscapes_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-dmh_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-monkey2_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-tp_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-02_ses-01_task-tp_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-rest_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-01_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-monkey5_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-07_ses-02_task-monkey2_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-02_task-monkey2_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-03_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-tp_run-02_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-01_task-dme_run-01_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-22_ses-02_task-monkey2_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-19_ses-02_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-02_task-dmh_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-tp_run-01_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-01_task-dme_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-peer_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-01_task-dme_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-12_ses-01_task-tp_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-peer_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-05_ses-02_task-monkey2_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-18_ses-01_task-peer_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-01_task-checker_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-15_ses-02_task-dmh_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-03_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-01_task-inscapes_eeg-preproc_GD_CB.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-06_ses-02_task-rest_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-02_task-monkey5_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-10_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-08_ses-02_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-monkey2_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-13_ses-02_task-checker_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-monkey1_run-02_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-04_ses-02_task-dmh_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-11_ses-01_task-rest_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-01_task-monkey1_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-20_ses-01_task-monkey1_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-21_ses-01_task-dme_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-09_ses-01_task-dme_run-02_eeg-preproc_GD_CB_BK.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-01_task-inscapes_run-01_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-tp_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-16_ses-02_task-monkey5_run-01_desc-GdCb_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-14_ses-01_task-dme_run-02_desc-GdCbBk_eeg.edf\n", + "/projects/EEG_FMRI/bids_eeg/BIDS/NEW/PREP_BVA_GR_CB_BK_NOV2024/sub-17_ses-02_task-monkey2_run-02_desc-GdCbBk_eeg.edf\n", + "['checker' 'dme' 'dmh' 'inscapes' 'monkey1' 'monkey2' 'monkey5' 'peer'\n", + " 'rest' 'tp']\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "task = []\n", + "for file in root.rglob('*'):\n", + " print(file)\n", + " file_parts = architecture.parse_filename(file)\n", + " task.append(file_parts['task'])\n", + "\n", + "task = np.unique(task)\n", + "print(task)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'sub-18_ses-01_task-tp_run-02_desc-GdCb_eeg.edf'" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "file.name" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'root': PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'),\n", + " 'subject': '01',\n", + " 'session': '01',\n", + " 'datatype': 'eeg',\n", + " 'task': 'rest',\n", + " 'run': '01',\n", + " 'acquisition': None,\n", + " 'description': 'customGfp',\n", + " 'suffix': 'eeg',\n", + " 'extension': '.pkl',\n", + " 'filename': PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')}" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "architecture.parse_filename('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "root\n", + " /data2/Projects/eeg_fmri_natview/derivatives\n", + "subject\n", + " 01\n", + "session\n", + " 01\n", + "datatype\n", + " eeg\n", + "task\n", + " rest\n", + "run\n", + " 01\n", + "acquisition\n", + " None\n", + "description\n", + " customGfp\n", + "suffix\n", + " eeg\n", + "extension\n", + " .pkl\n", + "filename\n", + " /data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl\n" + ] + } + ], + "source": [ + "file_parts = architecture.parse_filename('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')\n", + "test = architecture._initiate_database_dict(placeholder=[])\n", + "for key, value in file_parts.items():\n", + " test[key].append(value)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "ename": "AttributeError", + "evalue": "'NoneType' object has no attribute 'copy'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[18], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcopy\u001b[49m()\n", + "\u001b[0;31mAttributeError\u001b[0m: 'NoneType' object has no attribute 'copy'" + ] + } + ], + "source": [ + "None.copy()" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'root': [PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'),\n", + " '01',\n", + " '01',\n", + " 'eeg',\n", + " 'rest',\n", + " '01',\n", + " None,\n", + " 'customGfp',\n", + " 'eeg',\n", + " '.pkl',\n", + " PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')],\n", + " 'subject': [PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'),\n", + " '01',\n", + " '01',\n", + " 'eeg',\n", + " 'rest',\n", + " '01',\n", + " None,\n", + " 'customGfp',\n", + " 'eeg',\n", + " '.pkl',\n", + " PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')],\n", + " 'session': [PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'),\n", + " '01',\n", + " '01',\n", + " 'eeg',\n", + " 'rest',\n", + " '01',\n", + " None,\n", + " 'customGfp',\n", + " 'eeg',\n", + " '.pkl',\n", + " PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')],\n", + " 'datatype': [PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'),\n", + " '01',\n", + " '01',\n", + " 'eeg',\n", + " 'rest',\n", + " '01',\n", + " None,\n", + " 'customGfp',\n", + " 'eeg',\n", + " '.pkl',\n", + " PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')],\n", + " 'task': [PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'),\n", + " '01',\n", + " '01',\n", + " 'eeg',\n", + " 'rest',\n", + " '01',\n", + " None,\n", + " 'customGfp',\n", + " 'eeg',\n", + " '.pkl',\n", + " PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')],\n", + " 'run': [PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'),\n", + " '01',\n", + " '01',\n", + " 'eeg',\n", + " 'rest',\n", + " '01',\n", + " None,\n", + " 'customGfp',\n", + " 'eeg',\n", + " '.pkl',\n", + " PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')],\n", + " 'acquisition': [PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'),\n", + " '01',\n", + " '01',\n", + " 'eeg',\n", + " 'rest',\n", + " '01',\n", + " None,\n", + " 'customGfp',\n", + " 'eeg',\n", + " '.pkl',\n", + " PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')],\n", + " 'description': [PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'),\n", + " '01',\n", + " '01',\n", + " 'eeg',\n", + " 'rest',\n", + " '01',\n", + " None,\n", + " 'customGfp',\n", + " 'eeg',\n", + " '.pkl',\n", + " PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')],\n", + " 'suffix': [PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'),\n", + " '01',\n", + " '01',\n", + " 'eeg',\n", + " 'rest',\n", + " '01',\n", + " None,\n", + " 'customGfp',\n", + " 'eeg',\n", + " '.pkl',\n", + " PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')],\n", + " 'extension': [PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'),\n", + " '01',\n", + " '01',\n", + " 'eeg',\n", + " 'rest',\n", + " '01',\n", + " None,\n", + " 'customGfp',\n", + " 'eeg',\n", + " '.pkl',\n", + " PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')],\n", + " 'filename': [PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'),\n", + " '01',\n", + " '01',\n", + " 'eeg',\n", + " 'rest',\n", + " '01',\n", + " None,\n", + " 'customGfp',\n", + " 'eeg',\n", + " '.pkl',\n", + " PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-customGfp_eeg.pkl')]}" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "test" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[140040774596096, 140040774596096, 140040774596096, 140040774596096, 140040774596096, 140040774596096, 140040774596096, 140040774596096, 140040774596096, 140040774596096, 140040774596096]\n" + ] + } + ], + "source": [ + "print([id(lst) for lst in test.values()])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([ True, True, True, True, True, True, True, True, True,\n", + " True, True, True, True, True, True, True, True, True,\n", + " True, True, True, True, True, True, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, True, True, True, True, True, True,\n", + " True, True, True, True, True, True, True, True, True,\n", + " True, True, True, True, True, True, True, True, True,\n", + " True, True, True, True, True, True, True, True, True,\n", + " True, True, True, True, True, True, True, True, True,\n", + " True, True, True, True, True, True, True, True, True,\n", + " True, True, True, True, True, True, True, True, True,\n", + " True, True, True, True, True, True, True, True, True,\n", + " True, True, True, True, True, True, True, True, True,\n", + " True, True, True, True, True, True, True, True, True,\n", + " True, True, True, True, True, True, True, True, True,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False, False, False, False, False, False, False,\n", + " False, False, False])" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import numpy as np\n", + "\n", + "np.isin(selector.files_dataframe['subject'].values,['01','05','06'])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "selector.files_dataframe" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "mne", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.2" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/system/test_bids_selector.py b/tests/system/test_bids_selector.py index 858df24..1ac1db5 100644 --- a/tests/system/test_bids_selector.py +++ b/tests/system/test_bids_selector.py @@ -1,101 +1,115 @@ -from unittest.mock import MagicMock, patch - import pytest - -from eeg_research.system.bids_selector import BIDSselector - +import pandas as pd +from pathlib import Path +from eeg_research.system.bids_selector import BidsArchitecture @pytest.fixture -def mock_bids_layout() -> MagicMock: - """Mock a BIDS layout with a simple structure for testing.""" - # Mock a BIDS layout with a simple structure for testing - layout = MagicMock() - layout.get = MagicMock(return_value=["sub-01", "sub-02", "sub-03", "sub-04"]) - return layout +def sample_bids_root(tmp_path): + """Create a sample BIDS directory structure for testing.""" + root = tmp_path / "bids_dataset" + # Create sample BIDS structure + for sub in ["01", "02", "03", "04"]: + for ses in ["01", "02", "03"]: + for modality in ["eeg","mri"]: + path = root / f"sub-{sub}" / f"ses-{ses}" / modality + path.mkdir(parents=True) + # Create sample files + (path / f"sub-{sub}_ses-{ses}_task-rest_run-01_desc-clean_{modality}.vhdr").touch() + (path / f"sub-{sub}_ses-{ses}_task-anothertask_run-01_{modality}.vhdr").touch() + return root @pytest.fixture -def bids_selector(mock_bids_layout): - with patch("your_module.bids.BIDSLayout", return_value=mock_bids_layout): - return BIDSselector(root="/mock/path") +def bids_selector(sample_bids_root): + """Create BidsArchitecture instance with sample data.""" + return BidsArchitecture(root=sample_bids_root) + +def test_construct_path(bids_selector): + bids_selector.subject = "01" + bids_selector.session = "01" + bids_selector.datatype = "eeg" + path = bids_selector._construct_path() + assert str(path) == "sub-01/ses-01/eeg" + +def test_construct_file(bids_selector): + bids_selector.subject = "01" + bids_selector.task = "rest" + bids_selector.extension = "vhdr" + filename = bids_selector._construct_file() + assert "sub-01" in filename + assert "task-rest" in filename + assert filename.endswith(".vhdr") -def test_init(bids_selector): - # Test initialization and if the layout is set correctly - assert isinstance(bids_selector._original_layout, MagicMock) - assert bids_selector.user_input == { - "subject": None, - "session": None, - "task": None, - "run": None, - "datatype": None, - "suffix": None, - "extension": None - } +def test_parse_filename(bids_selector, sample_bids_root): + file = sample_bids_root / "sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-clean_eeg.vhdr" + result = bids_selector.parse_filename(file) + assert result["subject"] == "01" + assert result["session"] == "01" + assert result["task"] == "rest" + assert result["run"] == "01" + assert result["description"] == "clean" def test_standardize_input_str(bids_selector): - # Test standardizing input string by removing prefixes assert bids_selector._standardize_input_str("sub-01") == "01" + assert bids_selector._standardize_input_str("ses-02") == "02" assert bids_selector._standardize_input_str("task-rest") == "rest" - assert bids_selector._standardize_input_str("run-02") == "02" - assert bids_selector._standardize_input_str("ses-01") == "01" - -def test_standardize_attributes(bids_selector): - # Test standardizing all attributes - bids_selector.subject = "sub-01" - bids_selector.session = ["ses-01", "ses-02"] - bids_selector._standardize_attributes() - assert bids_selector.subject == "01" - assert bids_selector.session == ["01", "02"] + assert bids_selector._standardize_input_str("run-01") == "01" + assert bids_selector._standardize_input_str("test") == "test" -def test_convert_input_to_list(bids_selector): - # Test converting inputs to lists or ranges - with patch.object(bids_selector._original_layout, "get", return_value=["01", "02", "03", "04"]): - assert bids_selector._convert_input_to_list("subject", "01-03") == ["01", "02", "03"] - assert bids_selector._convert_input_to_list("subject", "01,*") == ["01", "02", "03", "04"] +def test_get_range(bids_selector): + series = pd.Series(["01", "02", "03", "04"]) + result = bids_selector._get_range(series, "02", "04") + assert all(result == [False, True, True, False]) -def test_add_method(bids_selector): - # Test adding two BIDSselector objects - other_selector = BIDSselector(root="/mock/path", subject="02", task="rest") - bids_selector.subject = "01" - bids_selector.task = ["task1"] +def test_get_single_loc(bids_selector): + series = pd.Series(["01", "02", "03"]) + result = bids_selector._get_single_loc(series, "02") + assert all(result == [False, True, False]) + with pytest.raises(Exception): + bids_selector._get_single_loc(series, "04") - new_selector = bids_selector + other_selector - assert new_selector.subject == ["01", "02"] - assert new_selector.task == ["task1", "rest"] +def test_is_numerical(bids_selector): + series = pd.Series(["01", "02", "03"]) + assert bids_selector._is_numerical(series) == True + series = pd.Series(["01", "abc", "03"]) + assert bids_selector._is_numerical(series) == False -def test_to_dict(bids_selector): - # Test if the attributes are correctly returned in a dictionary - bids_selector.subject = "01" - bids_selector.task = "task-rest" - expected_dict = { - "subject": "01", - "session": None, - "task": "task-rest", - "run": None, - "datatype": None, - "suffix": None, - "extension": None, - } - assert bids_selector.to_dict() == expected_dict +def test_interpret_string(bids_selector): + series = pd.Series(["01", "02", "03", "04"]) + result = bids_selector._interpret_string(series, "02-04") + assert all(result == [False, True, True, False]) + with pytest.raises(ValueError): + bids_selector._interpret_string(series, "a-b") -def test_set_bids_attributes(bids_selector, mock_bids_layout): - # Test setting BIDS attributes using mock layout data - bids_selector.subject = "01-*" - bids_selector.set_bids_attributes() - assert bids_selector.subject == ["01", "02", "03", "04"] +def test_select_unique_vals(bids_selector): + result = bids_selector.select( + subject="01", + session="01", + task="rest", + datatype = "eeg", + suffix = "eeg", + ) + assert len(result) == 1 + assert "sub-01" in str(result.iloc[0]["filename"]) + assert "task-rest" in str(result.iloc[0]["filename"]) -def test_layout_property(bids_selector): - # Test layout property filters files correctly - with patch.object(bids_selector._original_layout, "get", return_value=["file1.nii.gz", "file2.nii.gz"]): - bids_selector.subject = "01" - files = bids_selector.layout - assert files == ["file1.nii.gz", "file2.nii.gz"] - -def test_str_method(bids_selector): - # Test string representation of BIDSselector object - bids_selector.subject = "01" - bids_selector.task = "rest" - with patch.object(bids_selector._original_layout, "get", return_value=["file1.nii.gz", "file2.nii.gz"]): - result_str = str(bids_selector) - assert "Subjects: 1 (01)" in result_str - assert "Tasks: 1 (rest)" in result_str - assert "Files: 2" in result_str +def test_select_list_vals(bids_selector): + result = bids_selector.select( + subject=["01","02"], + session=["01","02"], + task="rest", + datatype = "eeg", + suffix = "eeg", + ) + assert len(result) == 4 + assert "sub-01" in str(result.iloc[0]["filename"]) + assert "ses-01" in str(result.iloc[0]["filename"]) + assert "task-rest" in str(result.iloc[0]["filename"]) + assert "sub-01" in str(result.iloc[1]["filename"]) + assert "ses-02" in str(result.iloc[1]["filename"]) + assert "task-rest" in str(result.iloc[1]["filename"]) + assert "sub-02" in str(result.iloc[2]["filename"]) + assert "ses-01" in str(result.iloc[2]["filename"]) + assert "task-rest" in str(result.iloc[2]["filename"]) + assert "sub-02" in str(result.iloc[3]["filename"]) + assert "ses-02" in str(result.iloc[3]["filename"]) + assert "task-rest" in str(result.iloc[3]["filename"]) diff --git a/tests/system/test_bids_simulator.py b/tests/system/test_bids_simulator.py index 312b932..a62cc7b 100644 --- a/tests/system/test_bids_simulator.py +++ b/tests/system/test_bids_simulator.py @@ -4,7 +4,7 @@ import os from pathlib import Path -import mne +import mne # type: ignore import pandas as pd import pytest From ffc22dfbe4d5b1c6d57f0e999bd1668a8ff399c0 Mon Sep 17 00:00:00 2001 From: Samuel Louviot Date: Thu, 5 Dec 2024 12:53:04 -0500 Subject: [PATCH 4/5] splitted the class into 3 classes and finished the unit tests --- src/eeg_research/system/bids_selector.py | 637 +++++++++------- src/eeg_research/system/test_lab.ipynb | 914 ++++++++++++++++++++++- tests/system/test_bids_selector.py | 383 +++++++--- 3 files changed, 1534 insertions(+), 400 deletions(-) diff --git a/src/eeg_research/system/bids_selector.py b/src/eeg_research/system/bids_selector.py index c566d00..9496569 100644 --- a/src/eeg_research/system/bids_selector.py +++ b/src/eeg_research/system/bids_selector.py @@ -8,17 +8,17 @@ packages by forcing it to allow such datatype or write from scratch a separate class that would be less strict. The monkey patching is not very pythonic and is not recommended in the dev community -Because of the side effect that can induce. Therefore I am on the road to +Because of the side effect that can induce. Therefore I am on the road to write another 'bids-like' data handler (also simplier) from scratch. -This will be useful for everybody dealing with pseudo BIDS layout with the +This will be useful for everybody dealing with pseudo BIDS layout with the possibility to customize the queries. """ - import os from dataclasses import dataclass from functools import reduce from pathlib import Path +from warnings import warn import pandas as pd @@ -26,103 +26,243 @@ class that would be less strict. def is_numerical(dataframe: pd.DataFrame, column_name: str): return all(dataframe[column_name].apply(lambda string: string.isdigit())) + @dataclass -class BidsArchitecture: - """A flexible and lightweight BIDS file selector. - - This class provides an intuitive interface to query and select files from BIDS datasets, - including non-standardized derivatives. It handles custom modalities like eyetracking, - brainstate, or respiration data that standard BIDS tools may not support. - - Key Features: - - Flexible file selection using wildcards and patterns - - Support for non-standard BIDS derivatives - - Simple query interface for complex file patterns - - Pandas DataFrame output for easy data manipulation - - Args: - root (Path | str): Root directory of the BIDS dataset - subject (str, optional): Subject identifier (e.g. "01") - session (str, optional): Session identifier - datatype (str, optional): Data modality (e.g. "eeg", "eyetracking") - task (str, optional): Task identifier - run (str, optional): Run number - acquisition (str, optional): Acquisition identifier - description (str, optional): Description tag - suffix (str, optional): File suffix - extension (str, optional): File extension without dot - - Examples: - >>> selector = BidsArchitecture(root="data/") - >>> selector = BidsArchitecture( - ... root="data/", - ... subject="01", - ... task="rest", - ... datatype="eeg" - ... ) - - Properties: - files_dataframe (pd.DataFrame): Selected files with BIDS entities as columns - query_instruction (str): Current query pattern used for file selection - - Methods: - _construct_path(): Builds BIDS directory path pattern - _construct_file(): Builds BIDS filename pattern - _construct_glob_query(): Combines path and file patterns - _get_layout(): Scans filesystem and builds DataFrame - """ - - root: Path | str | os.PathLike +class BasePath: + root: Path | None = None subject: str | None = None session: str | None = None datatype: str | None = None task: str | None = None - run: str | None = None acquisition: str | None = None + run: str | None = None description: str | None = None suffix: str | None = None extension: str | None = None - def __post_init__(self) -> None: # noqa: D105 - self.root = Path(self.root) - self._get_layout(self._construct_glob_query()) + def __post_init__(self): + if self.extension and "." not in self.extension: + self.extension = "." + self.extension + def __str__(self): + string_list = [] + for attribute, value in self.__dict__.items(): + if not "_" in attribute: + string_list.append(f"{attribute}: {value}") + + return "\n".join(string_list) + + def _make_path(self, absolute=True): + relative_path = Path( + os.path.join( + f"sub-{self.subject}", + f"ses-{self.session}", + self.datatype, + ) + ) + + if absolute and getattr(self,"root", False): + return self.root / relative_path + else: + return relative_path + + def _make_basename(self): + fname_elem = [ + f"sub-{self.subject}", + f"ses-{self.session}", + f"task-{self.task}", + self.suffix, + ] + if self.description: + fname_elem.insert(3, f"desc-{self.description}") + if self.run: + fname_elem.insert(3, f"run-{self.run}") + if self.acquisition: + fname_elem.insert(3, f"acq-{self.acquisition}") - def __str__(self) -> str: - """Public string representation when calling print(). + fname_elem = [elem for elem in fname_elem if elem is not None] - Returns: - str: String representation - """ - str_list = list() - print(f"Results for query: {self.query_instruction}") - for attribute in self.database.columns: - if attribute == "filename": - continue + return "_".join(fname_elem) - all_existing_values = [ - str(val) - for val in self.database[attribute].unique() - ] + def parse_filename(self, file: Path): + if isinstance(file, str): + file = Path(file) - if len(all_existing_values) <= 4: - specification_str = ( - f"({ ', '.join([str(s) for s in all_existing_values])})" - ) + file_parts = {} + desired_keys = ["task", "run", "desc", "acq"] + splitted_filename = file.stem.split("_") + + if len(file.parts) > 2: + file_parts["root"] = file.parents[3] + file_parts["datatype"] = file.parents[2] + elif len(file.parts) > 1: + file_parts["datatype"] = file.parents[1] + else: + file_parts["datatype"] = splitted_filename[-1] + + file_parts["subject"] = file.name.split("_")[0].split("-")[1] + file_parts["session"] = file.name.split("_")[1].split("-")[1] + + for desired_key in desired_keys: + if desired_key in file.stem: + value = [ + part.split("-")[1] + for part in splitted_filename + if desired_key in part + ][0] else: - specification_str = ( - f"({str(all_existing_values[0])} "\ - f"... {str(all_existing_values[-1])})" - ) + value = None - value_length = str(len(all_existing_values)) + if desired_key == "desc": + desired_key = "description" - str_list.append( - f"{str(attribute).capitalize()}s: {value_length} " - f"{specification_str}" + elif desired_key == "acq": + desired_key = "acquisition" + + file_parts[desired_key] = value + + file_parts["suffix"] = splitted_filename[-1] + file_parts["extension"] = file.suffix + + return file_parts + + +@dataclass +class BidsPath(BasePath): + subject: str | None = None + session: str | None = None + datatype: str | None = None + task: str | None = None + suffix: str | None = None + extension: str | None = None + root: Path | None = None + run: str | None = None + acquisition: str | None = None + description: str | None = None + + @classmethod + def from_filename(cls, file: str | os.PathLike): + file_parts = super(BidsPath, cls).parse_filename(cls,file) + return cls(**file_parts) + + def __post_init__(self): + return super().__post_init__() + + @property + def basename(self): + return super()._make_basename() + + @property + def filename(self): + return self.basename + self.extension + + @property + def absolute_path(self): + if self.root: + return super()._make_path(absolute=True) + else: + warn( + "There was no root path detected. Setting relative " + "path as the root path" ) + return super()._make_path(absolute=False) + + @property + def relative_path(self): + return super()._make_path(absolute=False) + + @property + def fullpath(self): + return self.pathname / self.filename + +@dataclass +class BidsQuery(BidsPath): + root: Path + subject: str | None = None + session: str | None = None + datatype: str | None = None + task: str | None = None + run: str | None = None + acquisition: str | None = None + description: str | None = None + suffix: str | None = None + extension: str | None = None + + def __post_init__(self) -> None: + + required_attrs = [ + "subject", + "session", + "datatype", + "task", + "suffix", + "extension", + ] + + + + for attr in required_attrs: + if getattr(self, attr) is None: + if attr == "extension": + setattr(self, attr, ".*") + else: + setattr(self, attr, "*") + + elif getattr(self,attr) is not None and attr == "task": + setattr(self, attr, getattr(self,attr) + "*") + + for attr in ["run", "acquisition", "description"]: + if getattr(self, attr) is not None: + setattr(self,attr, getattr(self, attr) + "*") + + return super().__post_init__() + + + @property + def filename(self): + potential_cases = [ + "*_*", + "**", + "*.*" + ] + filename = super().filename + for case in potential_cases: + filename = filename.replace(case,"*") + return filename + + def generate(self): + if self.root: + return self.root.rglob(os.fspath(self.relative_path / self.filename)) + else: + raise Exception( + "Root was not defined. Please instantiate the object" + " by setting root to a desired path" + ) + + +@dataclass +class BidsArchitecture(BidsQuery): + + root: Path + subject: str | None = None + session: str | None = None + datatype: str | None = None + task: str | None = None + run: str | None = None + acquisition: str | None = None + description: str | None = None + suffix: str | None = None + extension: str | None = None + + def __post_init__(self) -> None: # noqa: D105 + super().__post_init__() + self._db_lookup_generator = self.generate() + + def __next__(self): + return next(self._db_lookup_generator) + + def __iter__(self): + return iter(self._db_lookup_generator) - all_str = f"{'\n'.join(str_list)}\nFiles: {len(self.database)}" - return all_str def __add__(self, other): # noqa: ANN204, D105, ANN001 if isinstance(other, self.__class__): @@ -164,171 +304,93 @@ def __add__(self, other): # noqa: ANN204, D105, ANN001 setattr(self, dict_key, list(set(val).union(set(dict_value)))) - def _construct_path(self) -> Path: - """Build the BIDS directory path pattern. - - Constructs a Path object representing the directory structure: - sub-{subject}/ses-{session}/{datatype} - - Returns: - Path: Directory path pattern with appropriate wildcards - """ - input_path_prefix = ['sub-','ses-',''] - input_path_elements = [self.subject, self.session, self.datatype] - - path_element_list = [f'{"".join([prefix,path_element])}' - if path_element is not None else '*' - for prefix, path_element in zip( - input_path_prefix, - input_path_elements - ) - ] - return Path(*path_element_list) - - def _construct_file(self) -> str: - """Build the BIDS filename pattern. - - Constructs a filename pattern following BIDS conventions: - sub-{subject}_ses-{session}_task-{task}_run-{run}_desc-{desc}_{suffix}.{ext} - - Returns: - str: Filename pattern with appropriate wildcards - """ - - attributes = [ - ("sub-", self.subject), - ("ses-", self.session), - ("task-",self.task), - ("run-", self.run), - ("acq-", self.acquisition), - ("desc-",self.description), - ] - - if all([attribute is None for _, attribute in attributes]): - return '*' - - first_none_replaced = False - parts = [] - - for key, value in attributes: - if value: - parts.append(f"{key}{value}") - first_none_replaced = False - elif not first_none_replaced: - parts.append("*") - first_none_replaced = True - - filename = "_".join(parts) - - if self.suffix: - filename = f"{filename}_{self.suffix}" - - if self.extension: - if not first_none_replaced and self.suffix is None: - filename = filename + f"*.{self.extension}" - else: - filename = filename + f".{self.extension}" - else: - filename = filename + '*' + def __iter__(self): + return self.database["filename"].values - filename = filename.replace("_*_","*").replace("**","*") - return filename + def get_layout(self) -> pd.DataFrame: + """Scan filesystem and build DataFrame of matching files. - def _construct_glob_query(self) -> str: - """Combine path and filename patterns for filesystem query. - - Returns: - str: Complete glob pattern for file selection - """ - self.query_instruction = os.fspath( - self._construct_path() / self._construct_file() - ) - return self.query_instruction - - def parse_filename(self, file: Path | str) -> dict: - """Extract BIDS entities from filename. - Args: - file: Path or string of file to parse - + query: Glob pattern for file selection + Returns: - dict: BIDS entities extracted from filename - Keys: root, subject, session, datatype, task, run, - acquisition, description, suffix, extension, filename + pd.DataFrame: DataFrame containing all matching files and their BIDS entities """ - if isinstance(file, str): - file = Path(file) + database_keys = [ + "root", + "subject", + "session", + "datatype", + "task", + "run", + "acquisition", + "description", + "suffix", + "extension", + "filename" + ] - path_parts = file.relative_to(self.root).parts + data_base_dict: dict[str, list] = {key: [] for key in database_keys} - file_parts = {} - file_parts['root'] = self.root - file_parts['subject'] = file.name.split('_')[0].split('-')[1] - file_parts['session'] = file.name.split('_')[1].split('-')[1] - try: - file_parts['datatype'] = path_parts[2] - except Exception: - Warning('No datatype detected') - - desired_keys = ['task','run','desc','acq'] - splitted_filename = file.stem.split('_') - for desired_key in desired_keys: + for file in self.generate(): + bids_path = BidsPath.from_filename(file) + for key, value in bids_path.__dict__.items(): + data_base_dict[key].append(value) - if desired_key in file.stem: - value = [ - part.split('-')[1] - for part in splitted_filename - if desired_key in part - ][0] - else: - value = None + data_base_dict['filename'].append(file) - if desired_key == 'desc': - desired_key = 'description' - - elif desired_key == 'acq': - desired_key = 'acquisition' - - file_parts[desired_key] = value - - file_parts['suffix'] = splitted_filename[-1] - file_parts['extension'] = file.suffix - file_parts['filename'] = file + self.database = pd.DataFrame(data_base_dict) - return file_parts + return self + + def print_summary(self) -> str: + """Public string representation when calling print(). - def _get_layout(self, query: str = '*') -> pd.DataFrame: - """Scan filesystem and build DataFrame of matching files. - - Args: - query: Glob pattern for file selection - Returns: - pd.DataFrame: DataFrame containing all matching files and their BIDS entities + str: String representation """ - files_iterator = Path(self.root).rglob(query) - database_keys = ['root','subject','session','datatype','task','run', - 'acquisition', 'description','suffix','extension','filename'] + if not getattr(self, 'database'): + raise Exception("No database generated. Run the `get_layout` method"\ + " before.") + + str_list = list() + print(f"Results for query: {self.fullpath}") + for attribute in self.database.columns: + if attribute == "filename": + continue - data_base_dict: dict[str, list] = {key: [] for key in database_keys} + all_existing_values = [ + str(val) for val in self.database[attribute].unique() + ] - for file in files_iterator: - file_parts = self.parse_filename(file) - for key, value in file_parts.items(): - data_base_dict[key].append(value) + if len(all_existing_values) <= 4: + specification_str = ( + f"({ ', '.join([str(s) for s in all_existing_values])})" + ) + else: + specification_str = ( + f"({str(all_existing_values[0])} " + f"... {str(all_existing_values[-1])})" + ) - self.database = pd.DataFrame(data_base_dict) + value_length = str(len(all_existing_values)) - return self + str_list.append( + f"{str(attribute).capitalize()}s: {value_length} " + f"{specification_str}" + ) + + all_str = f"{'\n'.join(str_list)}\nFiles: {len(self.database)}" + return all_str def _standardize_input_str(self, value: str) -> str: """Remove BIDS prefixes from input strings. - + Standardizes inputs by removing prefixes like 'sub-', 'ses-', etc. - + Args: value: Input string to standardize - + Returns: str: Standardized string without BIDS prefixes """ @@ -344,12 +406,13 @@ def _standardize_input_str(self, value: str) -> str: return value.replace(prefix, "") return value - - def _get_range(self, - dataframe_column: pd.core.series.Series, - start: int | str | None = None, - stop: int | str | None = None) -> pd.core.series.Series: - + + def _get_range( + self, + dataframe_column: pd.core.series.Series, + start: int | str | None = None, + stop: int | str | None = None, + ) -> pd.core.series.Series: if isinstance(start, str): start = int(start) @@ -358,75 +421,75 @@ def _get_range(self, dataframe_column = dataframe_column.apply(lambda s: int(s)) - if start is None or start == '*': + if start is None or start == "*": start = min(dataframe_column) - - if stop is None or stop == '*': + + if stop is None or stop == "*": stop = max(dataframe_column) - + return (start <= dataframe_column) & (dataframe_column < stop) - - def _get_single_loc(self, - dataframe_column: pd.core.series.Series, - value: str) -> pd.core.series.Series: - + + def _get_single_loc( + self, dataframe_column: pd.core.series.Series, value: str + ) -> pd.core.series.Series: locations_found = dataframe_column == value if not any(locations_found): - raise Exception('No location corresponding found in the database') - else: - return dataframe_column == value + Warning("No location corresponding found in the database") + locations_found.apply(lambda s: not (s)) - def _is_numerical(self, - dataframe_column: pd.core.series.Series - ) -> pd.core.series.Series: - return all( - dataframe_column.apply(lambda string: string.isdigit()) - ) - - def _interpret_string(self, - dataframe_column: pd.core.series.Series, - string: str, - ) -> pd.core.series.Series: + return locations_found + + def _is_numerical( + self, dataframe_column: pd.core.series.Series + ) -> pd.core.series.Series: + return all(dataframe_column.apply(lambda string: string.isdigit())) + + def _interpret_string( + self, + dataframe_column: pd.core.series.Series, + string: str, + ) -> pd.core.series.Series: """I want to interpret the string when there is a `-`. Check if - The splitted results are 2 digit. If not throw an error saying that the - input must be 2 digit separated by a `-` or 1 digit and a wild card `*` + The splitted results are 2 digit. If not throw an error saying that the + input must be 2 digit separated by a `-` or 1 digit and a wild card `*` separated by a `-`. If everything is ok run the get range. Args: string (str): _description_ """ - if '-' in string: - start, stop = string.split('-') + if "-" in string: + start, stop = string.split("-") conditions = [ - (start.isdigit() or start == '*'), - (stop.isdigit() or stop == '*') + (start.isdigit() or start == "*"), + (stop.isdigit() or stop == "*"), ] - + if not all(conditions): - raise ValueError("Input must be 2 digits separated by a `-` or "\ - "1 digit and a wild card `*` separated by a `-`") + raise ValueError( + "Input must be 2 digits separated by a `-` or " + "1 digit and a wild card `*` separated by a `-`" + ) return self._get_range( dataframe_column=dataframe_column, start=int(start) if start.isdigit() else None, - stop=int(stop) if stop.isdigit() else None + stop=int(stop) if stop.isdigit() else None, ) else: return self._get_single_loc(dataframe_column, string) - - def _perform_selection(self, - dataframe_column: pd.core.series.Series, - value: str) -> pd.core.series.Series: + def _perform_selection( + self, dataframe_column: pd.core.series.Series, value: str + ) -> pd.core.series.Series: if self._is_numerical(dataframe_column): - return self._interpret_string(dataframe_column,value) + return self._interpret_string(dataframe_column, value) else: return self._get_single_loc(dataframe_column, value) - + def select(self, **kwargs) -> pd.DataFrame: """Select files from database based on BIDS entities. - + If the argument is not None check if it is a list or a string. If it is a string then check if there is any `-` and `*`. If it is the case then call the string interpreter to generate a truth table of a selection of @@ -436,8 +499,8 @@ def select(self, **kwargs) -> pd.DataFrame: If it is a list then iterate over the list and for each value of the list perfor the check above. The truth table should be a list that is appending as a function of the iteration over argument to generate a final table - that would be the selection. - + that would be the selection. + Remember to throw a warning if all the table is False (if not any()). Args: @@ -468,17 +531,15 @@ def select(self, **kwargs) -> pd.DataFrame: for argument_name in kwargs.keys(): if argument_name not in possible_arguments: - raise Exception("Argument must be one of the following"\ - f"{', '.join(possible_arguments)}") - - condition_for_select = list() - for name, value in kwargs.items(): + raise Exception( + "Argument must be one of the following" + f"{', '.join(possible_arguments)}" + ) + condition_for_select = list() + for name, value in kwargs.items(): if value is not None: - conditions = [ - isinstance(value,str), - isinstance(value,list) - ] + conditions = [isinstance(value, str), isinstance(value, list)] if any(conditions): col = self.database[name] @@ -491,20 +552,22 @@ def select(self, **kwargs) -> pd.DataFrame: individual_value = self._standardize_input_str(individual_value) temp_selection.append( self._perform_selection(col, individual_value) - ) + ) if len(temp_selection) > 1: temp_selection = reduce(lambda x, y: x | y, temp_selection) - + else: temp_selection = temp_selection[0] condition_for_select.append(temp_selection) - - + else: - raise TypeError('Argument must be either string or list') - + raise TypeError("Argument must be either string or list") + selection = reduce(lambda x, y: x & y, condition_for_select) return self.database.loc[selection] - \ No newline at end of file + + +class BidsSelector: + pass diff --git a/src/eeg_research/system/test_lab.ipynb b/src/eeg_research/system/test_lab.ipynb index a224a87..e53f362 100644 --- a/src/eeg_research/system/test_lab.ipynb +++ b/src/eeg_research/system/test_lab.ipynb @@ -2,33 +2,637 @@ "cells": [ { "cell_type": "code", - "execution_count": 9, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ - "from eeg_research.system.bids_selector import BidsArchitecture\n", - "root = \"/data2/Projects/eeg_fmri_natview/derivatives\"\n", - "architecture = BidsArchitecture(root = root,)" + "from pathlib import Path\n", + "from eeg_research.system.bids_selector import BidsArchitecture, BidsQuery, BidsPath\n", + "root = Path(\"/data2/Projects/eeg_fmri_natview/derivatives\")\n", + "architecture = BidsArchitecture(\n", + " root = root,\n", + " datatype='eeg',\n", + " suffix='eeg',\n", + " run = \"*\",\n", + " extension = '.pkl'\n", + ")\n" ] }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "array(['01', '02'], dtype=object)" + "BidsArchitecture(root=PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'), subject='*', session='*', datatype='eeg', task='*', acquisition=None, run='**', description=None, suffix='eeg', extension='.pkl')" ] }, - "execution_count": 10, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "architecture.select(subject=[\"01\",\"02\"])['subject'].unique()" + "architecture.get_layout()" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
rootsubjectsessiondatatypetaskrunacquisitiondescriptionsuffixextensionfilename
0/data2/Projects/eeg_fmri_natview/derivatives0101/data2/Projects/eeg_fmri_natview/derivatives/s...dme01NonegfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
1/data2/Projects/eeg_fmri_natview/derivatives0101/data2/Projects/eeg_fmri_natview/derivatives/s...dme01NonecustomGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
2/data2/Projects/eeg_fmri_natview/derivatives0101/data2/Projects/eeg_fmri_natview/derivatives/s...peer01NonegfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
3/data2/Projects/eeg_fmri_natview/derivatives0101/data2/Projects/eeg_fmri_natview/derivatives/s...peer01NonecustomGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
4/data2/Projects/eeg_fmri_natview/derivatives0101/data2/Projects/eeg_fmri_natview/derivatives/s...monkey102NonegfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
....................................
2191/data2/Projects/eeg_fmri_natview/derivatives1902/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonecustomGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
2192/data2/Projects/eeg_fmri_natview/derivatives1902/data2/Projects/eeg_fmri_natview/derivatives/s...rest01NonebandsGfpeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
2193/data2/Projects/eeg_fmri_natview/derivatives1902/data2/Projects/eeg_fmri_natview/derivatives/s...rest01NonecustomGfpeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
2194/data2/Projects/eeg_fmri_natview/derivatives1902/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonebandsGfpeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
2195/data2/Projects/eeg_fmri_natview/derivatives1902/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonecustomGfpeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
\n", + "

2196 rows × 11 columns

\n", + "
" + ], + "text/plain": [ + " root subject session \\\n", + "0 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "1 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "2 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "3 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "4 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "... ... ... ... \n", + "2191 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "2192 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "2193 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "2194 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "2195 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "\n", + " datatype task run \\\n", + "0 /data2/Projects/eeg_fmri_natview/derivatives/s... dme 01 \n", + "1 /data2/Projects/eeg_fmri_natview/derivatives/s... dme 01 \n", + "2 /data2/Projects/eeg_fmri_natview/derivatives/s... peer 01 \n", + "3 /data2/Projects/eeg_fmri_natview/derivatives/s... peer 01 \n", + "4 /data2/Projects/eeg_fmri_natview/derivatives/s... monkey1 02 \n", + "... ... ... .. \n", + "2191 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "2192 /data2/Projects/eeg_fmri_natview/derivatives/s... rest 01 \n", + "2193 /data2/Projects/eeg_fmri_natview/derivatives/s... rest 01 \n", + "2194 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "2195 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "\n", + " acquisition description suffix extension \\\n", + "0 None gfpBk eeg .pkl \n", + "1 None customGfpBk eeg .pkl \n", + "2 None gfpBk eeg .pkl \n", + "3 None customGfpBk eeg .pkl \n", + "4 None gfpBk eeg .pkl \n", + "... ... ... ... ... \n", + "2191 None customGfpBk eeg .pkl \n", + "2192 None bandsGfp eeg .pkl \n", + "2193 None customGfp eeg .pkl \n", + "2194 None bandsGfp eeg .pkl \n", + "2195 None customGfp eeg .pkl \n", + "\n", + " filename \n", + "0 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "1 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "3 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "4 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "... ... \n", + "2191 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2192 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2193 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2194 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2195 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "\n", + "[2196 rows x 11 columns]" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "architecture.database" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-checker_run-01_desc-raw_eeg.pkl\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-checker_run-01_desc-rawBk_eeg.pkl\n" + ] + } + ], + "source": [ + "q = \"./sub-01/ses-01/eeg/sub-01_ses-01_task-checker*_run-01*_desc-raw*_eeg.pkl\"\n", + "for file in root.rglob(q):\n", + " print(file)" + ] + }, + { + "cell_type": "code", + "execution_count": 125, + "metadata": {}, + "outputs": [], + "source": [ + "from pathlib import Path\n", + "from dataclasses import dataclass\n", + "from warnings import warn\n", + "import os\n", + "\n", + "@dataclass\n", + "class BasePath:\n", + " root: Path\n", + " subject: str | None = None\n", + " session: str | None = None\n", + " datatype: str | None = None\n", + " task: str | None = None\n", + " suffix: str | None = None\n", + " extension: str | None = None\n", + " run: str | None = None\n", + " acquisition: str | None = None\n", + " description: str | None = None\n", + "\n", + " \n", + " def __str__(self):\n", + " string_list = []\n", + " for attribute, value in self.__dict__.items():\n", + " if not '_' in attribute:\n", + " string_list.append(f\"{attribute}: {value}\")\n", + " \n", + " return '\\n'.join(string_list)\n", + " \n", + " def _make_path(self, absolute=True):\n", + " relative_path = Path(\n", + " os.path.join(\n", + " f\"sub-{self.subject}\",\n", + " f\"ses-{self.session}\",\n", + " self.datatype,\n", + " )\n", + " )\n", + "\n", + " if absolute and root:\n", + " return self.root / relative_path\n", + " else:\n", + " return relative_path\n", + "\n", + " def _make_basename(self):\n", + " fname_elem = [\n", + " f\"sub-{self.subject}\",\n", + " f\"ses-{self.session}\",\n", + " f\"task-{self.task}\",\n", + " self.suffix,\n", + " ]\n", + " if self.description:\n", + " fname_elem.insert(3, f\"desc-{self.description}\")\n", + " if self.run:\n", + " fname_elem.insert(3, f\"run-{self.run}\")\n", + " if self.acquisition:\n", + " fname_elem.insert(3, f\"acq-{self.acquisition}\")\n", + " \n", + " return \"_\".join(fname_elem)\n", + " \n", + " def parse_filename(self, file: str | os.PathLike):\n", + " if isinstance(file, str):\n", + " file = Path(file)\n", + "\n", + "\n", + " file_parts = {}\n", + " desired_keys = ['task','run','desc','acq']\n", + " splitted_filename = file.stem.split('_')\n", + "\n", + " if len(file.parts) > 2:\n", + " file_parts['root'] = file.parents[3]\n", + " file_parts['datatype'] = file.parents[2]\n", + " elif len(file.parts) > 1:\n", + " file_parts['datatype'] = file.parents[1]\n", + " else:\n", + " file_parts['datatype'] = splitted_filename[-1]\n", + "\n", + " file_parts['subject'] = file.name.split('_')[0].split('-')[1]\n", + " file_parts['session'] = file.name.split('_')[1].split('-')[1]\n", + "\n", + " for desired_key in desired_keys:\n", + " \n", + " if desired_key in file.stem:\n", + " value = [\n", + " part.split('-')[1] \n", + " for part in splitted_filename\n", + " if desired_key in part\n", + " ][0]\n", + " else:\n", + " value = None\n", + "\n", + " if desired_key == 'desc':\n", + " desired_key = 'description'\n", + " \n", + " elif desired_key == 'acq':\n", + " desired_key = 'acquisition'\n", + " \n", + " file_parts[desired_key] = value\n", + " \n", + " file_parts['suffix'] = splitted_filename[-1]\n", + " file_parts['extension'] = file.suffix\n", + "\n", + " return file_parts\n", + "\n", + "@dataclass\n", + "class BidsPath(BasePath):\n", + " subject: str\n", + " session: str\n", + " datatype: str\n", + " task: str\n", + " suffix: str\n", + " extension: str\n", + " root: Path | None = None\n", + " run: str | None = None\n", + " acquisition: str | None = None\n", + " description: str | None = None\n", + " \n", + " @classmethod\n", + " def from_filename(cls, file: str | os.PathLike):\n", + " file_parts = super().parse_filename(cls, file)\n", + " return cls(**file_parts)\n", + "\n", + " @property\n", + " def basename(self):\n", + " return super()._make_basename()\n", + " \n", + " @property\n", + " def filename(self):\n", + " return self.basename + self.extension \n", + " \n", + " @property\n", + " def absolute_path(self):\n", + " if self.root:\n", + " return super()._make_path(absolute= True)\n", + " else:\n", + " warn(\"There was no root path detected. Setting relative \"\\\n", + " \"path as the root path\")\n", + " return super()._make_path(absolute=False)\n", + " \n", + " \n", + " @property\n", + " def relative_path(self):\n", + " return super()._make_path(absolute= False)\n", + " \n", + " @property\n", + " def fullpath(self):\n", + " return self.pathname / self.filename\n", + "\n", + "@dataclass\n", + "class BidsQuery(BidsPath):\n", + " root: Path | str | os.PathLike\n", + " subject: str | None = None\n", + " session: str | None = None\n", + " datatype: str | None = None\n", + " task: str | None = None\n", + " run: str | None = None\n", + " acquisition: str | None = None\n", + " description: str | None = None\n", + " suffix: str | None = None\n", + " extension: str | None = None\n", + "\n", + " def __post_init__(self) -> None:\n", + " required_attrs = ['subject', \n", + " 'session', \n", + " 'datatype', \n", + " 'task', \n", + " 'suffix', \n", + " 'extension']\n", + "\n", + " for attr in required_attrs:\n", + " if getattr(self, attr) is None:\n", + " setattr(self, attr, '*')\n", + " \n", + " @property\n", + " def filename(self):\n", + " return super().filename.replace(\"_*.*\",\"\").replace(\"**\",\"*\")\n", + " \n", + " def generate(self):\n", + " if self.root:\n", + " return self.root.rglob(os.fspath(self.relative_path/self.filename))\n", + " else:\n", + " raise Exception(\"Root was not defined. Please instantiate the object\"\\\n", + " \" by setting root to a desired path\")\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 126, + "metadata": {}, + "outputs": [], + "source": [ + "test = BidsPath.from_filename('sub-01_ses-01_task-checker_run-01_desc-caps_brainstates.pkl')" + ] + }, + { + "cell_type": "code", + "execution_count": 127, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "root: None\n", + "subject: 01\n", + "session: 01\n", + "datatype: brainstates\n", + "task: checker\n", + "suffix: brainstates\n", + "extension: .pkl\n", + "run: 01\n", + "acquisition: None\n", + "description: caps\n" + ] + } + ], + "source": [ + "print(test)" + ] + }, + { + "cell_type": "code", + "execution_count": 108, + "metadata": {}, + "outputs": [], + "source": [ + "test.session = \"02\"" + ] + }, + { + "cell_type": "code", + "execution_count": 109, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'sub-01_ses-02_task-checker_run-01_desc-caps_brainstates.pkl'" + ] + }, + "execution_count": 109, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "test.filename" + ] + }, + { + "cell_type": "code", + "execution_count": 128, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/tmp/ipykernel_3895458/3283975140.py:133: UserWarning: There was no root path detected. Setting relative path as the root path\n", + " warn(\"There was no root path detected. Setting relative \"\\\n" + ] + }, + { + "data": { + "text/plain": [ + "PosixPath('sub-01/ses-01/brainstates')" + ] + }, + "execution_count": 128, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "test.absolute_path" + ] + }, + { + "cell_type": "code", + "execution_count": 134, + "metadata": {}, + "outputs": [], + "source": [ + "test = BidsQuery(root = Path(root),\n", + " subject = \"01\",\n", + " description = 'caps',\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 130, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'sub-01_ses-*_task-*_run-01_desc-caps_*'" + ] + }, + "execution_count": 130, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "test.filename" ] }, { @@ -38,6 +642,300 @@ "outputs": [], "source": [] }, + { + "cell_type": "code", + "execution_count": 131, + "metadata": {}, + "outputs": [], + "source": [ + "t = Path('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-checker_run-01_desc-caps_brainstates.pkl')" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "9" + ] + }, + "execution_count": 87, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(t.parts)" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "PosixPath('/data2/Projects/eeg_fmri_natview/derivatives')" + ] + }, + "execution_count": 61, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "t.parents[3]" + ] + }, + { + "cell_type": "code", + "execution_count": 135, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-dme_run-02_desc-caps_brainstates.tsv\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-monkey1_run-02_desc-caps_brainstates.tsv\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-monkey1_run-01_desc-caps_brainstates.tsv\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-checker_run-01_desc-caps_brainstates.tsv\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-rest_run-01_desc-caps_brainstates.tsv\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-inscapes_run-01_desc-caps_brainstates.tsv\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-dme_run-02_desc-caps_brainstates.json\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-monkey1_run-02_desc-caps_brainstates.json\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-checker_run-01_desc-caps_brainstates.json\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-inscapes_run-01_desc-caps_brainstates.json\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-tp_run-02_desc-caps_brainstates.json\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-monkey1_run-02_desc-caps_brainstates.pkl\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-inscapes_run-01_desc-caps_brainstates.pkl\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-tp_run-02_desc-caps_brainstates.pkl\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-dme_run-02_desc-caps_brainstates.pkl\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-tp_run-01_desc-caps_brainstates.tsv\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-tp_run-02_desc-caps_brainstates.tsv\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-dme_run-01_desc-caps_brainstates.tsv\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-monkey1_run-01_desc-caps_brainstates.json\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-rest_run-01_desc-caps_brainstates.json\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-tp_run-01_desc-caps_brainstates.json\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-dme_run-01_desc-caps_brainstates.json\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-monkey1_run-01_desc-caps_brainstates.pkl\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-rest_run-01_desc-caps_brainstates.pkl\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-tp_run-01_desc-caps_brainstates.pkl\n", + "/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-dme_run-01_desc-caps_brainstates.pkl\n" + ] + } + ], + "source": [ + "for file in test.generate():\n", + " print(file)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "bids_path = BidsPath(root = \"/data2/Projects/eeg_fmri_natview/derivatives\",\n", + " subject=\"01\",\n", + " session = \"01\",\n", + " datatype = \"eeg\",\n", + " task = \"rest\",\n", + " run = \"01\",\n", + " suffix = \"eeg\",\n", + " extension = \"pkl\",\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "BidsPath(root=PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'), subject='01', session='01', datatype='eeg', task='rest', suffix='eeg', extension='pkl', run='01', acquisition=None, description=None)" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bids_path" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-02/ses-02/eeg/sub-02_ses-02_task-rest_run-01_eeg.pkl')" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bids_path.subject = \"02\"\n", + "bids_path.fullpath" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['gfpBk', 'customGfpBk', 'rawBk', 'raw', 'gfp', 'bandsEnv',\n", + " 'customEnv', 'bandsEnvBk', 'customEnvBk', 'bandsGfpBk', 'bandsGfp',\n", + " 'customGfp', 'CustomEnvelopes', 'EEGbandsEnvelopes'], dtype=object)" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "architecture.database['description'].unique()" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array([], dtype=float64)" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "architecture.select(subject=[\"01\",\"02\"])['subject'].unique()" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "all([\"a\", None, \"b\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['checker', 'rest'], dtype=object)" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "architecture.database['task'].unique()" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
rootsubjectsessiondatatypetaskrunacquisitiondescriptionsuffixextensionfilename
\n", + "
" + ], + "text/plain": [ + "Empty DataFrame\n", + "Columns: [root, subject, session, datatype, task, run, acquisition, description, suffix, extension, filename]\n", + "Index: []" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "architecture.select(\n", + " task = ['dme','dmh','inscapes','monkey1','monkey2','monkey5','peer','tp']\n", + ")" + ] + }, { "cell_type": "code", "execution_count": 3, diff --git a/tests/system/test_bids_selector.py b/tests/system/test_bids_selector.py index 1ac1db5..21ec45e 100644 --- a/tests/system/test_bids_selector.py +++ b/tests/system/test_bids_selector.py @@ -1,115 +1,288 @@ import pytest -import pandas as pd from pathlib import Path -from eeg_research.system.bids_selector import BidsArchitecture +import pandas as pd +import numpy as np +from eeg_research.system.bids_selector import BasePath, BidsPath, BidsQuery, BidsArchitecture @pytest.fixture -def sample_bids_root(tmp_path): - """Create a sample BIDS directory structure for testing.""" - root = tmp_path / "bids_dataset" - # Create sample BIDS structure - for sub in ["01", "02", "03", "04"]: - for ses in ["01", "02", "03"]: - for modality in ["eeg","mri"]: - path = root / f"sub-{sub}" / f"ses-{ses}" / modality - path.mkdir(parents=True) - # Create sample files - (path / f"sub-{sub}_ses-{ses}_task-rest_run-01_desc-clean_{modality}.vhdr").touch() - (path / f"sub-{sub}_ses-{ses}_task-anothertask_run-01_{modality}.vhdr").touch() - return root +def bids_dataset(tmp_path: Path): + """Create a temporary BIDS dataset structure.""" + # Create base directories + data_dir = tmp_path / "data" + subjects = ["001", "002", "003"] + ses = "01" + run = "01" + acq = "anAcq" + desc = "aDescription" + + # Generate all combinations of files + for sub in subjects: + base_path = data_dir / f"sub-{sub}" / f"ses-{ses}" / "eeg" + base_path.mkdir(parents=True, exist_ok=True) + + (base_path / f"sub-{sub}_ses-{ses}_task-aTask_eeg.vhdr").touch() + (base_path / f"sub-{sub}_ses-{ses}_task-aTask_run-{run}_eeg.vhdr").touch() + (base_path / f"sub-{sub}_ses-{ses}_task-aTask_acq-{acq}_run-01_eeg.vhdr").touch() + (base_path / f"sub-{sub}_ses-{ses}_task-aTask_acq-{acq}_run-01_desc-{desc}_eeg.vhdr").touch() + (base_path / f"sub-{sub}_ses-{ses}_task-aTask_run-01_acq-anAcq_desc-aDescription_eeg.vhdr").touch() -@pytest.fixture -def bids_selector(sample_bids_root): - """Create BidsArchitecture instance with sample data.""" - return BidsArchitecture(root=sample_bids_root) - -def test_construct_path(bids_selector): - bids_selector.subject = "01" - bids_selector.session = "01" - bids_selector.datatype = "eeg" - path = bids_selector._construct_path() - assert str(path) == "sub-01/ses-01/eeg" - -def test_construct_file(bids_selector): - bids_selector.subject = "01" - bids_selector.task = "rest" - bids_selector.extension = "vhdr" - filename = bids_selector._construct_file() - assert "sub-01" in filename - assert "task-rest" in filename - assert filename.endswith(".vhdr") - -def test_parse_filename(bids_selector, sample_bids_root): - file = sample_bids_root / "sub-01/ses-01/eeg/sub-01_ses-01_task-rest_run-01_desc-clean_eeg.vhdr" - result = bids_selector.parse_filename(file) - assert result["subject"] == "01" - assert result["session"] == "01" - assert result["task"] == "rest" - assert result["run"] == "01" - assert result["description"] == "clean" - -def test_standardize_input_str(bids_selector): - assert bids_selector._standardize_input_str("sub-01") == "01" - assert bids_selector._standardize_input_str("ses-02") == "02" - assert bids_selector._standardize_input_str("task-rest") == "rest" - assert bids_selector._standardize_input_str("run-01") == "01" - assert bids_selector._standardize_input_str("test") == "test" - -def test_get_range(bids_selector): - series = pd.Series(["01", "02", "03", "04"]) - result = bids_selector._get_range(series, "02", "04") - assert all(result == [False, True, True, False]) - -def test_get_single_loc(bids_selector): - series = pd.Series(["01", "02", "03"]) - result = bids_selector._get_single_loc(series, "02") - assert all(result == [False, True, False]) - with pytest.raises(Exception): - bids_selector._get_single_loc(series, "04") - -def test_is_numerical(bids_selector): - series = pd.Series(["01", "02", "03"]) - assert bids_selector._is_numerical(series) == True - series = pd.Series(["01", "abc", "03"]) - assert bids_selector._is_numerical(series) == False - -def test_interpret_string(bids_selector): - series = pd.Series(["01", "02", "03", "04"]) - result = bids_selector._interpret_string(series, "02-04") - assert all(result == [False, True, True, False]) - with pytest.raises(ValueError): - bids_selector._interpret_string(series, "a-b") - -def test_select_unique_vals(bids_selector): - result = bids_selector.select( - subject="01", - session="01", + return data_dir + +# BasePath Tests +def test_base_path_str(): + base = BasePath(root=Path("/data"), subject="001", session="01") + assert "root: /data" in str(base) + assert "subject: 001" in str(base) + +def test_base_path_make_path(): + base = BasePath(root=Path("/data"), subject="001", session="01", datatype="eeg") + assert str(base._make_path(absolute=True)) == "/data/sub-001/ses-01/eeg" + assert str(base._make_path(absolute=False)) == "sub-001/ses-01/eeg" + +def test_base_path_make_basename(): + base = BasePath( + subject="001", + session="01", task="rest", - datatype = "eeg", - suffix = "eeg", + suffix="eeg", + run="01", + acquisition="test", + description="clean" ) - assert len(result) == 1 - assert "sub-01" in str(result.iloc[0]["filename"]) - assert "task-rest" in str(result.iloc[0]["filename"]) + expected = "sub-001_ses-01_task-rest_acq-test_run-01_desc-clean_eeg" + assert base._make_basename() == expected + +def test_base_path_parse_filename(): + file = Path("/data/sub-001/ses-01/eeg/sub-001_ses-01_task-rest_run-01_desc-clean_eeg.vhdr") + parts = BasePath.parse_filename(None, file) + assert parts["subject"] == "001" + assert parts["session"] == "01" + assert parts["task"] == "rest" + assert parts["run"] == "01" + assert parts["description"] == "clean" + +# BidsPath Tests +def test_bids_path_from_filename(): + file = Path("sub-001_ses-01_task-rest_eeg.vhdr") + bids = BidsPath.from_filename(file) + assert bids.subject == "001" + assert bids.session == "01" + assert bids.task == "rest" + assert bids.suffix == "eeg" + assert bids.extension == ".vhdr" + assert bids.relative_path == Path("sub-001/ses-01/eeg") -def test_select_list_vals(bids_selector): - result = bids_selector.select( - subject=["01","02"], - session=["01","02"], +def test_bids_path_properties(): + bids = BidsPath( + root=Path("/data"), + subject="001", + session="01", + datatype="eeg", task="rest", - datatype = "eeg", - suffix = "eeg", + suffix="eeg", + extension=".vhdr" ) - assert len(result) == 4 - assert "sub-01" in str(result.iloc[0]["filename"]) - assert "ses-01" in str(result.iloc[0]["filename"]) - assert "task-rest" in str(result.iloc[0]["filename"]) - assert "sub-01" in str(result.iloc[1]["filename"]) - assert "ses-02" in str(result.iloc[1]["filename"]) - assert "task-rest" in str(result.iloc[1]["filename"]) - assert "sub-02" in str(result.iloc[2]["filename"]) - assert "ses-01" in str(result.iloc[2]["filename"]) - assert "task-rest" in str(result.iloc[2]["filename"]) - assert "sub-02" in str(result.iloc[3]["filename"]) - assert "ses-02" in str(result.iloc[3]["filename"]) - assert "task-rest" in str(result.iloc[3]["filename"]) + assert bids.basename == "sub-001_ses-01_task-rest_eeg" + assert bids.filename == "sub-001_ses-01_task-rest_eeg.vhdr" + assert str(bids.absolute_path) == "/data/sub-001/ses-01/eeg" + assert str(bids.relative_path) == "sub-001/ses-01/eeg" + +# BidsQuery Tests +def test_bids_query(): + query = BidsQuery(root=Path("/data")) + assert query.subject == "*" + assert query.session == "*" + assert query.datatype == "*" + assert query.task == "*" + + path_cond = "sub-*/ses-*/*" + assert str(query.relative_path) == path_cond + +cases = [ + { + "task" : "aTask" + }, + { + "run": "01" + }, + { + "task": "aTask", + "run": "01", + }, + { + "acquisition": "anAcq", + }, + { + "task": "aTask", + "acquisition": "anAcq", + }, + { + "task": "aTask", + "run" : "01", + "acquisition": "anAcq", + }, + { + "description": "aDescription", + }, + { + "task": "aTask", + "description": "aDescription", + }, + { + "task": "aTask", + "run" : "01", + "description": "aDescription", + }, + { + "task": "aTask", + "run" : "01", + "acquisition": "anAcq", + "description": "aDescription", + }, + { + "suffix": "eeg", + }, + { + "task": "aTask", + "suffix": "eeg", + }, + { + "task": "aTask", + "acquisition": "anAcq", + "suffix": "eeg", + }, + { + "task": "aTask", + "run": "01", + "suffix": "eeg", + }, + { + "task": "aTask", + "description": "aDescription", + "suffix": "eeg", + }, + { + "extension":"vhdr", + }, + { + "suffix": "eeg", + "extension" :"vhdr", + }, + { + "task": "aTask", + "run": "01", + "extension": "vhdr", + }, + { + "task": "aTask", + "description": "aDescription", + "extension": "vhdr", + }, +] + +expected = [ + "sub-*_ses-*_task-aTask*", + "sub-*_ses-*_task-*_run-01*", + "sub-*_ses-*_task-aTask*_run-01*", + "sub-*_ses-*_task-*_acq-anAcq*", + "sub-*_ses-*_task-aTask*_acq-anAcq*", + "sub-*_ses-*_task-aTask*_acq-anAcq*_run-01*", + "sub-*_ses-*_task-*_desc-aDescription*", + "sub-*_ses-*_task-aTask*_desc-aDescription*", + "sub-*_ses-*_task-aTask*_run-01*_desc-aDescription*", + "sub-*_ses-*_task-aTask*_acq-anAcq*_run-01*_desc-aDescription*", + "sub-*_ses-*_task-*_eeg.*", + "sub-*_ses-*_task-aTask*_eeg.*", + "sub-*_ses-*_task-aTask*_acq-anAcq*_eeg.*", + "sub-*_ses-*_task-aTask*_run-01*_eeg.*", + "sub-*_ses-*_task-aTask*_desc-aDescription*_eeg.*", + "sub-*_ses-*_task-*.vhdr", + "sub-*_ses-*_task-*_eeg.vhdr", + "sub-*_ses-*_task-aTask*_run-01*.vhdr", + "sub-*_ses-*_task-aTask*_desc-aDescription*.vhdr", + +] + +@pytest.mark.parametrize("case, expected", zip(cases, expected)) +def test_bids_query_filename(case, expected): + # Add the root path to the case dictionary + + # Create an instance of BidsQuery + query = BidsQuery(root = Path("/data"),**case) + + # Assert the filename matches the expected value + assert query.filename == expected, f"Failed for case: {case}" + +def test_bids_query_generate(): + query = BidsQuery(root=Path("/data"), subject="001") + assert hasattr(query, "generate") + +@pytest.mark.parametrize("case, expected", zip(cases, expected)) +def test_bids_architecture_database_call(bids_dataset, case, expected): + architecture = BidsArchitecture(root=bids_dataset, **case) + layout = architecture.get_layout() + + # Basic validation + assert not(layout.database.empty) + + # Validate structure + assert all(col in layout.database.columns for col in [ + 'subject', 'session', 'datatype', 'task', 'run', + 'acquisition', 'description', 'suffix', 'extension' + ]) + + # Validate specific queries based on case + if 'task' in case: + assert all(layout.database['task'] == case['task']) + + if 'run' in case: + assert all(layout.database['run'] == case['run']) + + if 'acquisition' in case: + assert all(layout.database['acquisition'] == case['acquisition']) + + if 'description' in case: + assert all(layout.database['description'] == case['description']) + + if 'suffix' in case: + assert all(layout.database['suffix'] == case['suffix']) + + if 'extension' in case: + assert all(layout.database['extension'] == f".{case['extension']}") + + # Validate file existence + assert all(Path(f).exists() for f in layout.database['filename']) + + # Validate BIDS naming convention + assert all(layout.database['filename'].apply( + lambda x: str(Path(x).name).startswith('sub-') + )) + +# BidsArchitecture Tests +def test_bids_architecture_selection_methods(): + arch = BidsArchitecture(root=Path("/data")) + + # Test numerical checks + test_series = pd.Series(["1", "2", "3"]) + assert arch._is_numerical(test_series) == True + + # Test range selection + test_series = pd.Series(["1", "2", "3", "4", "5"]) + result = arch._get_range(test_series, "2", "4") + assert all(result == [False, True, True, False, False]) + + # Test string interpretation + result = arch._interpret_string(test_series, "2-4") + assert all(result == [False, True, True, False, False]) + +def test_bids_architecture_select(): + arch = BidsArchitecture(root=Path("/data")) + arch.database = pd.DataFrame({ + "subject": ["001", "002", "003"], + "session": ["01", "01", "02"], + "task": ["rest", "rest", "task"] + }) + + result = arch.select(subject="001", session="01") + assert len(result) == 1 + assert result.iloc[0]["subject"] == "001" From 63e9b86e2bba282407f57d6a5af17e46a7e1697e Mon Sep 17 00:00:00 2001 From: Samuel Louviot Date: Sat, 7 Dec 2024 06:05:23 -0500 Subject: [PATCH 5/5] debugged datatype in BIDS architecture and artifact annotator --- .../tools/artifacts_annotator.py | 10 - src/eeg_research/system/bids_selector.py | 52 +- src/eeg_research/system/test_lab.ipynb | 2153 ++++++++++++++++- tests/system/test_bids_selector.py | 22 +- 4 files changed, 2104 insertions(+), 133 deletions(-) diff --git a/src/eeg_research/preprocessing/tools/artifacts_annotator.py b/src/eeg_research/preprocessing/tools/artifacts_annotator.py index 188f52b..adb477a 100644 --- a/src/eeg_research/preprocessing/tools/artifacts_annotator.py +++ b/src/eeg_research/preprocessing/tools/artifacts_annotator.py @@ -270,16 +270,6 @@ def print_statistics(self) -> 'ZscoreAnnotator': np.round(self.statistics['tot_good']['ratio']*100,2) }%)""") - for artifact_type in self.statistics['tot_bad']['artifact_types']: - this_artifact = self.statistics[artifact_type] - - this_artifact_duration = np.round(this_artifact['seconds'],2) - this_artifact_perc = np.round(this_artifact['ratio']*100,2) - - messages_list.extend(f""" - |__{artifact_type} duration (sec): {this_artifact_duration}s ({ - this_artifact_perc}%)""") - self.statistics_message = ''.join(messages_list) print(self.statistics_message) return self diff --git a/src/eeg_research/system/bids_selector.py b/src/eeg_research/system/bids_selector.py index 9496569..aa9a01f 100644 --- a/src/eeg_research/system/bids_selector.py +++ b/src/eeg_research/system/bids_selector.py @@ -19,14 +19,10 @@ class that would be less strict. from functools import reduce from pathlib import Path from warnings import warn +from functools import cached_property import pandas as pd - -def is_numerical(dataframe: pd.DataFrame, column_name: str): - return all(dataframe[column_name].apply(lambda string: string.isdigit())) - - @dataclass class BasePath: root: Path | None = None @@ -91,14 +87,11 @@ def parse_filename(self, file: Path): desired_keys = ["task", "run", "desc", "acq"] splitted_filename = file.stem.split("_") - if len(file.parts) > 2: - file_parts["root"] = file.parents[3] - file_parts["datatype"] = file.parents[2] - elif len(file.parts) > 1: - file_parts["datatype"] = file.parents[1] + if len(file.parts) > 1: + file_parts["datatype"] = file.parts[-2] else: file_parts["datatype"] = splitted_filename[-1] - + file_parts["subject"] = file.name.split("_")[0].split("-")[1] file_parts["session"] = file.name.split("_")[1].split("-")[1] @@ -172,7 +165,10 @@ def relative_path(self): @property def fullpath(self): - return self.pathname / self.filename + if getattr(self,'root', False): + return self.absolute_path / self.filename + else: + return self.relative_path / self.filename @dataclass class BidsQuery(BidsPath): @@ -307,7 +303,8 @@ def __add__(self, other): # noqa: ANN204, D105, ANN001 def __iter__(self): return self.database["filename"].values - def get_layout(self) -> pd.DataFrame: + @cached_property + def database(self) -> pd.DataFrame: """Scan filesystem and build DataFrame of matching files. Args: @@ -335,13 +332,14 @@ def get_layout(self) -> pd.DataFrame: for file in self.generate(): bids_path = BidsPath.from_filename(file) for key, value in bids_path.__dict__.items(): - data_base_dict[key].append(value) - - data_base_dict['filename'].append(file) + if key == "root": + data_base_dict['root'].append(self.root) + else: + data_base_dict[key].append(value) - self.database = pd.DataFrame(data_base_dict) + data_base_dict['filename'].append(file) - return self + return pd.DataFrame(data_base_dict) def print_summary(self) -> str: """Public string representation when calling print(). @@ -442,7 +440,7 @@ def _get_single_loc( def _is_numerical( self, dataframe_column: pd.core.series.Series ) -> pd.core.series.Series: - return all(dataframe_column.apply(lambda string: string.isdigit())) + return all(dataframe_column.apply(lambda x: str(x).isdigit())) def _interpret_string( self, @@ -567,7 +565,23 @@ def select(self, **kwargs) -> pd.DataFrame: selection = reduce(lambda x, y: x & y, condition_for_select) return self.database.loc[selection] + + def report(self): + return BidsReporter(self.database) + + +#TODO I want to add a method to the BidsArchitecture to generate a "report". It +# will return a BidsReporter object. I also have to finish to write the dunder +# methods of BidsReporter. +@dataclass +class BidsReporter: + database: pd.DataFrame + def __post_init__(self): + for column in self.database.columns: + setattr(self,column+"s",tuple(self.database[column].unique())) + + class BidsSelector: pass diff --git a/src/eeg_research/system/test_lab.ipynb b/src/eeg_research/system/test_lab.ipynb index e53f362..6f78c4d 100644 --- a/src/eeg_research/system/test_lab.ipynb +++ b/src/eeg_research/system/test_lab.ipynb @@ -2,40 +2,2009 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "from pathlib import Path\n", + "from eeg_research.system.bids_selector import BidsArchitecture, BidsQuery, BidsPath, BidsReporter\n", + "import shutil\n", + "import os\n", + "old = \"custom\"\n", + "new = old.capitalize()\n", + "root = Path(\"/data2/Projects/eeg_fmri_natview/derivatives\")\n", + "architecture = BidsArchitecture(\n", + " root = root,\n", + " datatype='eeg',\n", + " suffix='eeg',\n", + " extension = '.pkl'\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "('peer',\n", + " 'monkey1',\n", + " 'checker',\n", + " 'rest',\n", + " 'tp',\n", + " 'inscapes',\n", + " 'dme',\n", + " 'dmh',\n", + " 'monkey5',\n", + " 'monkey2')" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "report = BidsReporter(architecture.database)\n", + "report.tasks" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "root = Path(\"/data2/Projects/eeg_fmri_natview/derivatives\")\n", + "architecture = BidsArchitecture(root = root)\n", + "df = architecture.select(task = ['checker', 'rest'],\n", + " suffix = ['brainstates','eeg','eyetracking'],\n", + " extension = \".pkl\")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "PosixPath('/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/multimodal/sub-01_ses-01_task-checker_run-01_desc-GfpBk8_multimodal.pkl')" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "path = BidsPath(root = root,\n", + " subject = \"01\",\n", + " session = \"01\",\n", + " datatype = \"multimodal\",\n", + " task = \"checker\",\n", + " run = \"01\",\n", + " description = \"GfpBk8\",\n", + " suffix = \"multimodal\",\n", + " extension = \".pkl\")\n", + "path.fullpath" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 01\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/brainstates/sub-01_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eyetracking/sub-01_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 02\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-02/ses-01/brainstates/sub-02_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-02/ses-01/eyetracking/sub-02_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-02/ses-01/eeg/sub-02_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 03\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-03/ses-01/brainstates/sub-03_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-03/ses-01/eyetracking/sub-03_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-03/ses-01/eeg/sub-03_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg')\n", + "For subject: 04\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 05\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-05/ses-02/brainstates/sub-05_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-05/ses-02/eyetracking/sub-05_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-05/ses-02/eeg/sub-05_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 01\n", + " Run: 01\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 06\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-06/ses-01/brainstates/sub-06_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-06/ses-01/eyetracking/sub-06_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-06/ses-01/eeg/sub-06_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-06/ses-02/brainstates/sub-06_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-06/ses-02/eyetracking/sub-06_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-06/ses-02/eeg/sub-06_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 07\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-07/ses-01/brainstates/sub-07_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-07/ses-01/eyetracking/sub-07_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-07/ses-01/eeg/sub-07_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-07/ses-02/brainstates/sub-07_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-07/ses-02/eyetracking/sub-07_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-07/ses-02/eeg/sub-07_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 08\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-08/ses-01/brainstates/sub-08_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-08/ses-01/eyetracking/sub-08_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-08/ses-01/eeg/sub-08_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-08/ses-02/brainstates/sub-08_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-08/ses-02/eyetracking/sub-08_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-08/ses-02/eeg/sub-08_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 09\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-09/ses-01/brainstates/sub-09_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-09/ses-01/eyetracking/sub-09_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-09/ses-01/eeg/sub-09_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 11\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-11/ses-01/brainstates/sub-11_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-11/ses-01/eyetracking/sub-11_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-11/ses-01/eeg/sub-11_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-11/ses-02/brainstates/sub-11_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-11/ses-02/eyetracking/sub-11_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-11/ses-02/eeg/sub-11_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 12\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-12/ses-01/brainstates/sub-12_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-12/ses-01/eyetracking/sub-12_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-12/ses-01/eeg/sub-12_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-12/ses-02/brainstates/sub-12_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-12/ses-02/eyetracking/sub-12_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-12/ses-02/eeg/sub-12_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 13\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-13/ses-01/brainstates/sub-13_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-13/ses-01/eyetracking/sub-13_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-13/ses-01/eeg/sub-13_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-13/ses-02/brainstates/sub-13_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-13/ses-02/eyetracking/sub-13_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-13/ses-02/eeg/sub-13_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 14\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-14/ses-01/brainstates/sub-14_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-14/ses-01/eyetracking/sub-14_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-14/ses-01/eeg/sub-14_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-14/ses-02/brainstates/sub-14_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-14/ses-02/eyetracking/sub-14_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-14/ses-02/eeg/sub-14_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 15\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-15/ses-01/brainstates/sub-15_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-15/ses-01/eyetracking/sub-15_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-15/ses-01/eeg/sub-15_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-15/ses-02/brainstates/sub-15_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-15/ses-02/eyetracking/sub-15_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-15/ses-02/eeg/sub-15_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 16\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-16/ses-02/brainstates/sub-16_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-16/ses-02/eyetracking/sub-16_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-16/ses-02/eeg/sub-16_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eyetracking', 'eeg')\n", + "For subject: 17\n", + " All modalities exist: ('brainstates', 'eyetracking', 'eeg')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-17/ses-01/brainstates/sub-17_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-17/ses-01/eyetracking/sub-17_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-17/ses-01/eeg/sub-17_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-17/ses-02/brainstates/sub-17_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-17/ses-02/eyetracking/sub-17_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-17/ses-02/eeg/sub-17_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 03\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-17/ses-03/brainstates/sub-17_ses-03_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-17/ses-03/eyetracking/sub-17_ses-03_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-17/ses-03/eeg/sub-17_ses-03_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 18\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-18/ses-01/brainstates/sub-18_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-18/ses-01/eyetracking/sub-18_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-18/ses-01/eeg/sub-18_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 20\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-20/ses-01/brainstates/sub-20_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-20/ses-01/eyetracking/sub-20_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-20/ses-01/eeg/sub-20_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-20/ses-02/brainstates/sub-20_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-20/ses-02/eyetracking/sub-20_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-20/ses-02/eeg/sub-20_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 21\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-21/ses-01/brainstates/sub-21_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-21/ses-01/eyetracking/sub-21_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-21/ses-01/eeg/sub-21_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-21/ses-02/brainstates/sub-21_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-21/ses-02/eyetracking/sub-21_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-21/ses-02/eeg/sub-21_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('brainstates', 'eeg', 'eyetracking')\n", + "For subject: 22\n", + " All modalities exist: ('brainstates', 'eeg', 'eyetracking')\n", + " Session: 01\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-22/ses-01/brainstates/sub-22_ses-01_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-22/ses-01/eyetracking/sub-22_ses-01_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-22/ses-01/eeg/sub-22_ses-01_task-checker_run-01_desc-Gfp_eeg.pkl\n", + " Session: 02\n", + " Run: 01\n", + " Brainstate file: /data2/Projects/eeg_fmri_natview/derivatives/sub-22/ses-02/brainstates/sub-22_ses-02_task-checker_run-01_desc-caps_brainstates.pkl\n", + " Eyetracking file: /data2/Projects/eeg_fmri_natview/derivatives/sub-22/ses-02/eyetracking/sub-22_ses-02_task-checker_run-01_eyetracking.pkl\n", + " EEG files: /data2/Projects/eeg_fmri_natview/derivatives/sub-22/ses-02/eeg/sub-22_ses-02_task-checker_run-01_desc-Gfp_eeg.pkl\n", + "('eeg', 'eyetracking')\n", + "For subject: 10\n", + "('eeg', 'eyetracking')\n", + "For subject: 19\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "subjects = architecture.database['subject'].unique()\n", + "description = 'Gfp'\n", + "for sub in subjects:\n", + " selection = architecture.select(subject = sub, \n", + " datatype = ['brainstates','eeg','eyetracking'],\n", + " task = 'checker', \n", + " suffix = ['brainstates','eeg','eyetracking'],\n", + " extension = \".pkl\")\n", + " report = BidsReporter(selection)\n", + " modalities = report.suffixs\n", + " print(f\"For subject: {sub}\")\n", + " if len(modalities) == 3:\n", + " print(f\" All modalities exist: {modalities}\")\n", + " for session in report.sessions:\n", + " print(f\" Session: {session}\")\n", + " for run in report.runs:\n", + " print(f\" Run: {run}\")\n", + " mother_condition = selection.loc[(selection['run'] == run) &\n", + " (selection['session'] == session)]\n", + " bs_file = mother_condition.loc[selection['suffix'] == 'brainstates', 'filename']\n", + " eye_file = mother_condition.loc[selection['suffix'] == 'eyetracking', 'filename']\n", + " eeg_file = mother_condition.loc[(selection['description'] == description) &\n", + " (selection['suffix'] == 'eeg'), 'filename']\n", + " if any([bs_file.empty, eye_file.empty, eeg_file.empty]):\n", + " continue\n", + " print(f\" Brainstate file: {bs_file.values[0]}\")\n", + " print(f\" Eyetracking file: {eye_file.values[0]}\")\n", + " print(f\" EEG files: {eeg_file.values[0]}\")\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bs_file.empty" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [], + "source": [ + "#df.loc[df['subject'] == '03']\n", + "\n", + "param_eeg = {\n", + " \"subject\": \"03\",\n", + " \"task\" : \"checker\"\n", + "}\n", + "eeg_selection = architecture.select(**param_eeg)" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "('01',)" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "report = BidsReporter(eeg_selection)\n", + "report.sessions" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
rootsubjectsessiondatatypetaskrunacquisitiondescriptionsuffixextensionfilename
391/data2/Projects/eeg_fmri_natview/derivatives0301brainstateschecker01Nonecapsbrainstates.tsv/data2/Projects/eeg_fmri_natview/derivatives/s...
397/data2/Projects/eeg_fmri_natview/derivatives0301brainstateschecker01Nonecapsbrainstates.json/data2/Projects/eeg_fmri_natview/derivatives/s...
402/data2/Projects/eeg_fmri_natview/derivatives0301brainstateschecker01Nonecapsbrainstates.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
405/data2/Projects/eeg_fmri_natview/derivatives0301eegchecker01NoneGfpeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
406/data2/Projects/eeg_fmri_natview/derivatives0301eegchecker01NoneCustomEnveeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
409/data2/Projects/eeg_fmri_natview/derivatives0301eegchecker01NoneRaweeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
414/data2/Projects/eeg_fmri_natview/derivatives0301eegchecker01NoneRawBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
415/data2/Projects/eeg_fmri_natview/derivatives0301eegchecker01NoneGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
424/data2/Projects/eeg_fmri_natview/derivatives0301eegchecker01NoneBandsGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
425/data2/Projects/eeg_fmri_natview/derivatives0301eegchecker01NoneCustomGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
430/data2/Projects/eeg_fmri_natview/derivatives0301eegchecker01NoneBandsGfpeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
463/data2/Projects/eeg_fmri_natview/derivatives0301eegchecker01NoneCustomEnvBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
464/data2/Projects/eeg_fmri_natview/derivatives0301eegchecker01NoneCustomGfpeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
470/data2/Projects/eeg_fmri_natview/derivatives0301eegchecker01NoneBandsEnveeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
471/data2/Projects/eeg_fmri_natview/derivatives0301eegchecker01NoneBandsEnvBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
478/data2/Projects/eeg_fmri_natview/derivatives0301respirationchecker01NoneNonerespiration.tsv/data2/Projects/eeg_fmri_natview/derivatives/s...
486/data2/Projects/eeg_fmri_natview/derivatives0301eyetrackingchecker01NoneNoneeyetracking.tsv/data2/Projects/eeg_fmri_natview/derivatives/s...
495/data2/Projects/eeg_fmri_natview/derivatives0301eyetrackingchecker01NoneNoneeyetracking.json/data2/Projects/eeg_fmri_natview/derivatives/s...
504/data2/Projects/eeg_fmri_natview/derivatives0301eyetrackingchecker01NoneNoneeyetracking.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
506/data2/Projects/eeg_fmri_natview/derivatives0301multimodalchecker01NonebandsEnv8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
507/data2/Projects/eeg_fmri_natview/derivatives0301multimodalchecker01NonecustomEnv8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
508/data2/Projects/eeg_fmri_natview/derivatives0301multimodalchecker01Nonegfp8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
512/data2/Projects/eeg_fmri_natview/derivatives0301multimodalchecker01NonebandsEnvBk8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
513/data2/Projects/eeg_fmri_natview/derivatives0301multimodalchecker01NonegfpBk8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
516/data2/Projects/eeg_fmri_natview/derivatives0301multimodalchecker01NonecustomEnvBk8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
542/data2/Projects/eeg_fmri_natview/derivatives0301multimodalchecker01NonebandsGfpBk8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
543/data2/Projects/eeg_fmri_natview/derivatives0301multimodalchecker01NonecustomGfpBk8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
\n", + "
" + ], + "text/plain": [ + " root subject session \\\n", + "391 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "397 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "402 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "405 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "406 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "409 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "414 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "415 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "424 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "425 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "430 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "463 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "464 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "470 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "471 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "478 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "486 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "495 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "504 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "506 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "507 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "508 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "512 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "513 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "516 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "542 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "543 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "\n", + " datatype task run acquisition description suffix \\\n", + "391 brainstates checker 01 None caps brainstates \n", + "397 brainstates checker 01 None caps brainstates \n", + "402 brainstates checker 01 None caps brainstates \n", + "405 eeg checker 01 None Gfp eeg \n", + "406 eeg checker 01 None CustomEnv eeg \n", + "409 eeg checker 01 None Raw eeg \n", + "414 eeg checker 01 None RawBk eeg \n", + "415 eeg checker 01 None GfpBk eeg \n", + "424 eeg checker 01 None BandsGfpBk eeg \n", + "425 eeg checker 01 None CustomGfpBk eeg \n", + "430 eeg checker 01 None BandsGfp eeg \n", + "463 eeg checker 01 None CustomEnvBk eeg \n", + "464 eeg checker 01 None CustomGfp eeg \n", + "470 eeg checker 01 None BandsEnv eeg \n", + "471 eeg checker 01 None BandsEnvBk eeg \n", + "478 respiration checker 01 None None respiration \n", + "486 eyetracking checker 01 None None eyetracking \n", + "495 eyetracking checker 01 None None eyetracking \n", + "504 eyetracking checker 01 None None eyetracking \n", + "506 multimodal checker 01 None bandsEnv8 multimodal \n", + "507 multimodal checker 01 None customEnv8 multimodal \n", + "508 multimodal checker 01 None gfp8 multimodal \n", + "512 multimodal checker 01 None bandsEnvBk8 multimodal \n", + "513 multimodal checker 01 None gfpBk8 multimodal \n", + "516 multimodal checker 01 None customEnvBk8 multimodal \n", + "542 multimodal checker 01 None bandsGfpBk8 multimodal \n", + "543 multimodal checker 01 None customGfpBk8 multimodal \n", + "\n", + " extension filename \n", + "391 .tsv /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "397 .json /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "402 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "405 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "406 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "409 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "414 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "415 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "424 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "425 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "430 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "463 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "464 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "470 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "471 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "478 .tsv /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "486 .tsv /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "495 .json /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "504 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "506 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "507 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "508 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "512 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "513 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "516 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "542 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "543 .pkl /data2/Projects/eeg_fmri_natview/derivatives/s... " + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eeg_selection" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
rootsubjectsessiondatatypetaskrunacquisitiondescriptionsuffixextensionfilename
403/data2/Projects/eeg_fmri_natview/derivatives0301/data2/Projects/eeg_fmri_natview/derivatives/s...dme02NoneGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
404/data2/Projects/eeg_fmri_natview/derivatives0301/data2/Projects/eeg_fmri_natview/derivatives/s...tp01NoneCustomEnvBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
405/data2/Projects/eeg_fmri_natview/derivatives0301/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NoneGfpeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
406/data2/Projects/eeg_fmri_natview/derivatives0301/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NoneCustomEnveeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
407/data2/Projects/eeg_fmri_natview/derivatives0301/data2/Projects/eeg_fmri_natview/derivatives/s...inscapes01NoneRawBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
....................................
470/data2/Projects/eeg_fmri_natview/derivatives0301/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NoneBandsEnveeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
471/data2/Projects/eeg_fmri_natview/derivatives0301/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NoneBandsEnvBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
472/data2/Projects/eeg_fmri_natview/derivatives0301/data2/Projects/eeg_fmri_natview/derivatives/s...inscapes01NoneBandsGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
473/data2/Projects/eeg_fmri_natview/derivatives0301/data2/Projects/eeg_fmri_natview/derivatives/s...inscapes01NoneBandsEnvBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
474/data2/Projects/eeg_fmri_natview/derivatives0301/data2/Projects/eeg_fmri_natview/derivatives/s...tp02NoneRawBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
\n", + "

72 rows × 11 columns

\n", + "
" + ], + "text/plain": [ + " root subject session \\\n", + "403 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "404 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "405 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "406 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "407 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + ".. ... ... ... \n", + "470 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "471 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "472 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "473 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "474 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + "\n", + " datatype task run \\\n", + "403 /data2/Projects/eeg_fmri_natview/derivatives/s... dme 02 \n", + "404 /data2/Projects/eeg_fmri_natview/derivatives/s... tp 01 \n", + "405 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "406 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "407 /data2/Projects/eeg_fmri_natview/derivatives/s... inscapes 01 \n", + ".. ... ... .. \n", + "470 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "471 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "472 /data2/Projects/eeg_fmri_natview/derivatives/s... inscapes 01 \n", + "473 /data2/Projects/eeg_fmri_natview/derivatives/s... inscapes 01 \n", + "474 /data2/Projects/eeg_fmri_natview/derivatives/s... tp 02 \n", + "\n", + " acquisition description suffix extension \\\n", + "403 None GfpBk eeg .pkl \n", + "404 None CustomEnvBk eeg .pkl \n", + "405 None Gfp eeg .pkl \n", + "406 None CustomEnv eeg .pkl \n", + "407 None RawBk eeg .pkl \n", + ".. ... ... ... ... \n", + "470 None BandsEnv eeg .pkl \n", + "471 None BandsEnvBk eeg .pkl \n", + "472 None BandsGfpBk eeg .pkl \n", + "473 None BandsEnvBk eeg .pkl \n", + "474 None RawBk eeg .pkl \n", + "\n", + " filename \n", + "403 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "404 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "405 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "406 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "407 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + ".. ... \n", + "470 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "471 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "472 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "473 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "474 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "\n", + "[72 rows x 11 columns]" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "architecture.select(subject = \"03\",\n", + " suffix = \"eeg\")" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
rootsubjectsessiondatatypetaskrunacquisitiondescriptionsuffixextensionfilename
0/data2/Projects/eeg_fmri_natview/derivatives0101/data2/Projects/eeg_fmri_natview/derivatives/s...peer01NoneGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
1/data2/Projects/eeg_fmri_natview/derivatives0101/data2/Projects/eeg_fmri_natview/derivatives/s...peer01NoneCustomGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
2/data2/Projects/eeg_fmri_natview/derivatives0101/data2/Projects/eeg_fmri_natview/derivatives/s...monkey102NoneGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
3/data2/Projects/eeg_fmri_natview/derivatives0101/data2/Projects/eeg_fmri_natview/derivatives/s...monkey102NoneCustomGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
4/data2/Projects/eeg_fmri_natview/derivatives0101/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NoneGfpeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
....................................
2191/data2/Projects/eeg_fmri_natview/derivatives1902/data2/Projects/eeg_fmri_natview/derivatives/s...rest01NoneBandsGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
2192/data2/Projects/eeg_fmri_natview/derivatives1902/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NoneBandsGfpBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
2193/data2/Projects/eeg_fmri_natview/derivatives1902/data2/Projects/eeg_fmri_natview/derivatives/s...rest01NoneBandsGfpeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
2194/data2/Projects/eeg_fmri_natview/derivatives1902/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NoneBandsGfpeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
2195/data2/Projects/eeg_fmri_natview/derivatives1902/data2/Projects/eeg_fmri_natview/derivatives/s...rest01NoneRawBkeeg.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
\n", + "

2196 rows × 11 columns

\n", + "
" + ], + "text/plain": [ + " root subject session \\\n", + "0 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "1 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "2 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "3 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "4 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "... ... ... ... \n", + "2191 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "2192 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "2193 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "2194 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "2195 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "\n", + " datatype task run \\\n", + "0 /data2/Projects/eeg_fmri_natview/derivatives/s... peer 01 \n", + "1 /data2/Projects/eeg_fmri_natview/derivatives/s... peer 01 \n", + "2 /data2/Projects/eeg_fmri_natview/derivatives/s... monkey1 02 \n", + "3 /data2/Projects/eeg_fmri_natview/derivatives/s... monkey1 02 \n", + "4 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "... ... ... .. \n", + "2191 /data2/Projects/eeg_fmri_natview/derivatives/s... rest 01 \n", + "2192 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "2193 /data2/Projects/eeg_fmri_natview/derivatives/s... rest 01 \n", + "2194 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "2195 /data2/Projects/eeg_fmri_natview/derivatives/s... rest 01 \n", + "\n", + " acquisition description suffix extension \\\n", + "0 None GfpBk eeg .pkl \n", + "1 None CustomGfpBk eeg .pkl \n", + "2 None GfpBk eeg .pkl \n", + "3 None CustomGfpBk eeg .pkl \n", + "4 None Gfp eeg .pkl \n", + "... ... ... ... ... \n", + "2191 None BandsGfpBk eeg .pkl \n", + "2192 None BandsGfpBk eeg .pkl \n", + "2193 None BandsGfp eeg .pkl \n", + "2194 None BandsGfp eeg .pkl \n", + "2195 None RawBk eeg .pkl \n", + "\n", + " filename \n", + "0 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "1 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "3 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "4 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "... ... \n", + "2191 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2192 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2193 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2194 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2195 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "\n", + "[2196 rows x 11 columns]" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "root = Path(\"/data2/Projects/eeg_fmri_natview/derivatives\")\n", + "architecture = BidsArchitecture(\n", + " root = root,\n", + " datatype='eeg',\n", + " suffix='eeg',\n", + " extension = '.pkl'\n", + ")\n", + "architecture.database" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [], + "source": [ + "import pickle\n", + "filename = \"/data2/Projects/eeg_fmri_natview/derivatives/sub-01/ses-01/eeg/sub-01_ses-01_task-peer_run-01_desc-GfpBk_eeg.pkl\"\n", + "with open(filename, 'rb') as file:\n", + " data = pickle.load(file)" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.0" + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "min(data['time'])" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "('dme',\n", + " 'peer',\n", + " 'rest',\n", + " 'checker',\n", + " 'tp',\n", + " 'inscapes',\n", + " 'monkey1',\n", + " 'monkey2',\n", + " 'monkey5',\n", + " 'dmh')" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "reporter.tasks" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [], + "source": [ + "import pickle\n", + "with open(selection['filename'].values[0], 'rb') as file:\n", + " data = pickle.load(file)" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "dict_keys(['brainstates', 'eyetracking'])" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "data.keys()" + ] + }, + { + "cell_type": "code", + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ - "from pathlib import Path\n", - "from eeg_research.system.bids_selector import BidsArchitecture, BidsQuery, BidsPath\n", - "root = Path(\"/data2/Projects/eeg_fmri_natview/derivatives\")\n", - "architecture = BidsArchitecture(\n", - " root = root,\n", - " datatype='eeg',\n", - " suffix='eeg',\n", - " run = \"*\",\n", - " extension = '.pkl'\n", - ")\n" + "reporter = BidsReporter(architecture.database)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'dme'" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "reporter.tasks" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['sub-01_ses-01_task-checker_run-01_desc-rawBk'], dtype=object)" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = architecture.select(subject = \"01\")\n", + "df['filename'].apply(lambda s:s.stem.replace(\"_eeg\",\"\")).values" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['sub-01_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-01_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-02_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-02_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-03_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-03_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-04_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-04_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-04_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-04_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-05_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-05_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-05_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-05_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-06_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-06_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-06_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-06_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-07_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-07_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-07_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-07_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-08_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-08_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-08_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-08_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-09_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-09_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-11_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-11_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-11_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-11_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-12_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-12_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-12_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-12_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-13_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-13_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-13_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-13_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-14_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-14_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-14_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-14_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-15_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-15_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-15_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-15_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-16_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-16_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-16_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-16_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-17_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-17_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-17_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-17_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-17_ses-03_task-checker_run-01_desc-raw',\n", + " 'sub-17_ses-03_task-checker_run-01_desc-rawBk',\n", + " 'sub-18_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-18_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-20_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-20_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-20_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-20_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-21_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-21_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-21_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-21_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-22_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-22_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-22_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-22_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-10_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-10_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-10_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-10_ses-02_task-checker_run-01_desc-rawBk',\n", + " 'sub-19_ses-01_task-checker_run-01_desc-raw',\n", + " 'sub-19_ses-01_task-checker_run-01_desc-rawBk',\n", + " 'sub-19_ses-02_task-checker_run-01_desc-raw',\n", + " 'sub-19_ses-02_task-checker_run-01_desc-rawBk'], dtype=object)" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "architecture.database['filename'].apply(lambda s:s.stem.replace(\"_eeg\",\"\")).values" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "sub-01_ses-01_task-checker_run-01_desc-rawBk\n" + ] + } + ], + "source": [ + "for n, row in architecture.database.iterrows():\n", + " print(row['filename'].stem.replace(\"_eeg\",\"\"))" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 44, "metadata": {}, "outputs": [ { "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
rootsubjectsessiondatatypetaskrunacquisitiondescriptionsuffixextensionfilename
0/data2/Projects/eeg_fmri_natview/derivatives0101/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonecustomEnv8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
1/data2/Projects/eeg_fmri_natview/derivatives0101/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonecustomEnvBk8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
2/data2/Projects/eeg_fmri_natview/derivatives0201/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonecustomEnv8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
3/data2/Projects/eeg_fmri_natview/derivatives0201/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonecustomEnvBk8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
4/data2/Projects/eeg_fmri_natview/derivatives0301/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonecustomEnv8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
....................................
75/data2/Projects/eeg_fmri_natview/derivatives1002/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonecustomEnvBk8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
76/data2/Projects/eeg_fmri_natview/derivatives1901/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonecustomEnv8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
77/data2/Projects/eeg_fmri_natview/derivatives1901/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonecustomEnvBk8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
78/data2/Projects/eeg_fmri_natview/derivatives1902/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonecustomEnv8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
79/data2/Projects/eeg_fmri_natview/derivatives1902/data2/Projects/eeg_fmri_natview/derivatives/s...checker01NonecustomEnvBk8multimodal.pkl/data2/Projects/eeg_fmri_natview/derivatives/s...
\n", + "

80 rows × 11 columns

\n", + "
" + ], "text/plain": [ - "BidsArchitecture(root=PosixPath('/data2/Projects/eeg_fmri_natview/derivatives'), subject='*', session='*', datatype='eeg', task='*', acquisition=None, run='**', description=None, suffix='eeg', extension='.pkl')" + " root subject session \\\n", + "0 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "1 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "2 /data2/Projects/eeg_fmri_natview/derivatives 02 01 \n", + "3 /data2/Projects/eeg_fmri_natview/derivatives 02 01 \n", + "4 /data2/Projects/eeg_fmri_natview/derivatives 03 01 \n", + ".. ... ... ... \n", + "75 /data2/Projects/eeg_fmri_natview/derivatives 10 02 \n", + "76 /data2/Projects/eeg_fmri_natview/derivatives 19 01 \n", + "77 /data2/Projects/eeg_fmri_natview/derivatives 19 01 \n", + "78 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "79 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "\n", + " datatype task run \\\n", + "0 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "1 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "2 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "3 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "4 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + ".. ... ... .. \n", + "75 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "76 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "77 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "78 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "79 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "\n", + " acquisition description suffix extension \\\n", + "0 None customEnv8 multimodal .pkl \n", + "1 None customEnvBk8 multimodal .pkl \n", + "2 None customEnv8 multimodal .pkl \n", + "3 None customEnvBk8 multimodal .pkl \n", + "4 None customEnv8 multimodal .pkl \n", + ".. ... ... ... ... \n", + "75 None customEnvBk8 multimodal .pkl \n", + "76 None customEnv8 multimodal .pkl \n", + "77 None customEnvBk8 multimodal .pkl \n", + "78 None customEnv8 multimodal .pkl \n", + "79 None customEnvBk8 multimodal .pkl \n", + "\n", + " filename \n", + "0 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "1 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "3 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "4 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + ".. ... \n", + "75 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "76 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "77 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "78 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "79 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "\n", + "[80 rows x 11 columns]" ] }, - "execution_count": 2, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "architecture.get_layout()" + "architecture.database" ] }, { @@ -79,13 +2048,13 @@ " \n", " \n", " \n", - " 0\n", + " 72\n", " /data2/Projects/eeg_fmri_natview/derivatives\n", - " 01\n", + " 02\n", " 01\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", - " dme\n", - " 01\n", + " tp\n", + " 02\n", " None\n", " gfpBk\n", " eeg\n", @@ -93,13 +2062,13 @@ " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", " \n", " \n", - " 1\n", + " 73\n", " /data2/Projects/eeg_fmri_natview/derivatives\n", - " 01\n", + " 02\n", " 01\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", - " dme\n", - " 01\n", + " tp\n", + " 02\n", " None\n", " customGfpBk\n", " eeg\n", @@ -107,12 +2076,12 @@ " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", " \n", " \n", - " 2\n", + " 74\n", " /data2/Projects/eeg_fmri_natview/derivatives\n", - " 01\n", + " 02\n", " 01\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", - " peer\n", + " monkey1\n", " 01\n", " None\n", " gfpBk\n", @@ -121,12 +2090,12 @@ " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", " \n", " \n", - " 3\n", + " 75\n", " /data2/Projects/eeg_fmri_natview/derivatives\n", - " 01\n", + " 02\n", " 01\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", - " peer\n", + " monkey1\n", " 01\n", " None\n", " customGfpBk\n", @@ -135,15 +2104,15 @@ " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", " \n", " \n", - " 4\n", + " 76\n", " /data2/Projects/eeg_fmri_natview/derivatives\n", - " 01\n", + " 02\n", " 01\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", - " monkey1\n", + " dme\n", " 02\n", " None\n", - " gfpBk\n", + " rawBk\n", " eeg\n", " .pkl\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", @@ -163,51 +2132,51 @@ " ...\n", " \n", " \n", - " 2191\n", + " 2137\n", " /data2/Projects/eeg_fmri_natview/derivatives\n", - " 19\n", + " 10\n", " 02\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", " checker\n", " 01\n", " None\n", - " customGfpBk\n", + " bandsEnvBk\n", " eeg\n", " .pkl\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", " \n", " \n", - " 2192\n", + " 2138\n", " /data2/Projects/eeg_fmri_natview/derivatives\n", - " 19\n", + " 10\n", " 02\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", " rest\n", " 01\n", " None\n", - " bandsGfp\n", + " bandsGfpBk\n", " eeg\n", " .pkl\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", " \n", " \n", - " 2193\n", + " 2139\n", " /data2/Projects/eeg_fmri_natview/derivatives\n", - " 19\n", + " 10\n", " 02\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", - " rest\n", + " checker\n", " 01\n", " None\n", - " customGfp\n", + " bandsGfpBk\n", " eeg\n", " .pkl\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", " \n", " \n", - " 2194\n", + " 2140\n", " /data2/Projects/eeg_fmri_natview/derivatives\n", - " 19\n", + " 10\n", " 02\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", " checker\n", @@ -219,78 +2188,78 @@ " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", " \n", " \n", - " 2195\n", + " 2141\n", " /data2/Projects/eeg_fmri_natview/derivatives\n", - " 19\n", + " 10\n", " 02\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", - " checker\n", + " rest\n", " 01\n", " None\n", - " customGfp\n", + " bandsGfp\n", " eeg\n", " .pkl\n", " /data2/Projects/eeg_fmri_natview/derivatives/s...\n", " \n", " \n", "\n", - "

2196 rows × 11 columns

\n", + "

170 rows × 11 columns

\n", "" ], "text/plain": [ " root subject session \\\n", - "0 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", - "1 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", - "2 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", - "3 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", - "4 /data2/Projects/eeg_fmri_natview/derivatives 01 01 \n", + "72 /data2/Projects/eeg_fmri_natview/derivatives 02 01 \n", + "73 /data2/Projects/eeg_fmri_natview/derivatives 02 01 \n", + "74 /data2/Projects/eeg_fmri_natview/derivatives 02 01 \n", + "75 /data2/Projects/eeg_fmri_natview/derivatives 02 01 \n", + "76 /data2/Projects/eeg_fmri_natview/derivatives 02 01 \n", "... ... ... ... \n", - "2191 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", - "2192 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", - "2193 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", - "2194 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", - "2195 /data2/Projects/eeg_fmri_natview/derivatives 19 02 \n", + "2137 /data2/Projects/eeg_fmri_natview/derivatives 10 02 \n", + "2138 /data2/Projects/eeg_fmri_natview/derivatives 10 02 \n", + "2139 /data2/Projects/eeg_fmri_natview/derivatives 10 02 \n", + "2140 /data2/Projects/eeg_fmri_natview/derivatives 10 02 \n", + "2141 /data2/Projects/eeg_fmri_natview/derivatives 10 02 \n", "\n", " datatype task run \\\n", - "0 /data2/Projects/eeg_fmri_natview/derivatives/s... dme 01 \n", - "1 /data2/Projects/eeg_fmri_natview/derivatives/s... dme 01 \n", - "2 /data2/Projects/eeg_fmri_natview/derivatives/s... peer 01 \n", - "3 /data2/Projects/eeg_fmri_natview/derivatives/s... peer 01 \n", - "4 /data2/Projects/eeg_fmri_natview/derivatives/s... monkey1 02 \n", + "72 /data2/Projects/eeg_fmri_natview/derivatives/s... tp 02 \n", + "73 /data2/Projects/eeg_fmri_natview/derivatives/s... tp 02 \n", + "74 /data2/Projects/eeg_fmri_natview/derivatives/s... monkey1 01 \n", + "75 /data2/Projects/eeg_fmri_natview/derivatives/s... monkey1 01 \n", + "76 /data2/Projects/eeg_fmri_natview/derivatives/s... dme 02 \n", "... ... ... .. \n", - "2191 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", - "2192 /data2/Projects/eeg_fmri_natview/derivatives/s... rest 01 \n", - "2193 /data2/Projects/eeg_fmri_natview/derivatives/s... rest 01 \n", - "2194 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", - "2195 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "2137 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "2138 /data2/Projects/eeg_fmri_natview/derivatives/s... rest 01 \n", + "2139 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "2140 /data2/Projects/eeg_fmri_natview/derivatives/s... checker 01 \n", + "2141 /data2/Projects/eeg_fmri_natview/derivatives/s... rest 01 \n", "\n", " acquisition description suffix extension \\\n", - "0 None gfpBk eeg .pkl \n", - "1 None customGfpBk eeg .pkl \n", - "2 None gfpBk eeg .pkl \n", - "3 None customGfpBk eeg .pkl \n", - "4 None gfpBk eeg .pkl \n", + "72 None gfpBk eeg .pkl \n", + "73 None customGfpBk eeg .pkl \n", + "74 None gfpBk eeg .pkl \n", + "75 None customGfpBk eeg .pkl \n", + "76 None rawBk eeg .pkl \n", "... ... ... ... ... \n", - "2191 None customGfpBk eeg .pkl \n", - "2192 None bandsGfp eeg .pkl \n", - "2193 None customGfp eeg .pkl \n", - "2194 None bandsGfp eeg .pkl \n", - "2195 None customGfp eeg .pkl \n", + "2137 None bandsEnvBk eeg .pkl \n", + "2138 None bandsGfpBk eeg .pkl \n", + "2139 None bandsGfpBk eeg .pkl \n", + "2140 None bandsGfp eeg .pkl \n", + "2141 None bandsGfp eeg .pkl \n", "\n", " filename \n", - "0 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", - "1 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", - "2 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", - "3 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", - "4 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "72 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "73 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "74 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "75 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "76 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", "... ... \n", - "2191 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", - "2192 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", - "2193 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", - "2194 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", - "2195 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2137 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2138 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2139 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2140 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", + "2141 /data2/Projects/eeg_fmri_natview/derivatives/s... \n", "\n", - "[2196 rows x 11 columns]" + "[170 rows x 11 columns]" ] }, "execution_count": 3, @@ -299,7 +2268,7 @@ } ], "source": [ - "architecture.database" + "architecture.select(subject = [\"02\",\"10\",\"11\"])" ] }, { diff --git a/tests/system/test_bids_selector.py b/tests/system/test_bids_selector.py index 21ec45e..64e40a5 100644 --- a/tests/system/test_bids_selector.py +++ b/tests/system/test_bids_selector.py @@ -220,41 +220,39 @@ def test_bids_query_generate(): @pytest.mark.parametrize("case, expected", zip(cases, expected)) def test_bids_architecture_database_call(bids_dataset, case, expected): architecture = BidsArchitecture(root=bids_dataset, **case) - layout = architecture.get_layout() - # Basic validation - assert not(layout.database.empty) + assert not(architecture.database.empty) # Validate structure - assert all(col in layout.database.columns for col in [ + assert all(col in architecture.database.columns for col in [ 'subject', 'session', 'datatype', 'task', 'run', 'acquisition', 'description', 'suffix', 'extension' ]) # Validate specific queries based on case if 'task' in case: - assert all(layout.database['task'] == case['task']) + assert all(architecture.database['task'] == case['task']) if 'run' in case: - assert all(layout.database['run'] == case['run']) + assert all(architecture.database['run'] == case['run']) if 'acquisition' in case: - assert all(layout.database['acquisition'] == case['acquisition']) + assert all(architecture.database['acquisition'] == case['acquisition']) if 'description' in case: - assert all(layout.database['description'] == case['description']) + assert all(architecture.database['description'] == case['description']) if 'suffix' in case: - assert all(layout.database['suffix'] == case['suffix']) + assert all(architecture.database['suffix'] == case['suffix']) if 'extension' in case: - assert all(layout.database['extension'] == f".{case['extension']}") + assert all(architecture.database['extension'] == f".{case['extension']}") # Validate file existence - assert all(Path(f).exists() for f in layout.database['filename']) + assert all(Path(f).exists() for f in architecture.database['filename']) # Validate BIDS naming convention - assert all(layout.database['filename'].apply( + assert all(architecture.database['filename'].apply( lambda x: str(Path(x).name).startswith('sub-') ))