Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

babs-init raises exception when there is no ses- folders in a non sub- folder. #142

Closed
Michael-Sun opened this issue Sep 28, 2023 · 4 comments · Fixed by #143
Closed

babs-init raises exception when there is no ses- folders in a non sub- folder. #142

Michael-Sun opened this issue Sep 28, 2023 · 4 comments · Fixed by #143
Assignees
Labels
bug Issues noting problems and PRs fixing those problems.

Comments

@Michael-Sun
Copy link

When attempting to run babs-init, it determined that a folder in my BIDS directory 'code' was a subject and raised an exception:

Checking whether each input dataset is a zipped or unzipped dataset...
input dataset '1080_wasabi' is considered as an unzipped dataset.
Performing sanity check for any unzipped input dataset...

babs-init failed! Below is the error message:
Traceback (most recent call last):
File "/dartfs-hpc/rc/home/j/f003z4j/miniconda3/lib/python3.9/site-packages/babs/cli.py", line 234, in babs_init_main
babs_proj.babs_bootstrap(input_ds,
File "/dartfs-hpc/rc/home/j/f003z4j/miniconda3/lib/python3.9/site-packages/babs/babs.py", line 400, in babs_bootstrap
check_validity_unzipped_input_dataset(input_ds, self.type_session)
File "/dartfs-hpc/rc/home/j/f003z4j/miniconda3/lib/python3.9/site-packages/babs/utils.py", line 95, in check_validity_unzipped_input_dataset
raise Exception(
Exception: In input dataset #1 '1080_wasabi', there is no ses-* folder in subject folder 'code'!

@zhao-cy
Copy link
Collaborator

zhao-cy commented Sep 28, 2023

Hi Michael! What's that code folder within your BIDS dataset used for? My understanding is that code should not be located within your BIDS dataset. Could you please remove this code folder?

@mattcieslak
Copy link
Collaborator

mattcieslak commented Sep 28, 2023

@zhao-cy I think it's fairly common to have code directories in BIDS, along with other directories like source_data. We should have BABS only look for sub-* directories directly under the BIDS root

@zhao-cy
Copy link
Collaborator

zhao-cy commented Sep 28, 2023

Ah sorry about this! Yes that's indeed a bug in BABS - thanks for letting us know, Michael! I'll fix it asap.

Note to myself: see function check_validity_unzipped_input_dataset() in utils.py. Seems this issue is only in validating the input datasets, but not when listing the subjects/sessions for analysis.

@zhao-cy zhao-cy self-assigned this Sep 28, 2023
@zhao-cy zhao-cy added the bug Issues noting problems and PRs fixing those problems. label Sep 28, 2023
@zhao-cy
Copy link
Collaborator

zhao-cy commented Sep 28, 2023

Hi @Michael-Sun, I just fixed the issue - could you please re-install BABS from GitHub main branch (instead of using pip install), and test it out on your dataset?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues noting problems and PRs fixing those problems.
Projects
None yet
3 participants