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

sourcedata indexed on Windows #1111

Open
kaare-mikkelsen opened this issue Dec 9, 2024 · 1 comment
Open

sourcedata indexed on Windows #1111

kaare-mikkelsen opened this issue Dec 9, 2024 · 1 comment

Comments

@kaare-mikkelsen
Copy link

kaare-mikkelsen commented Dec 9, 2024

Problem:
bids.layout.BIDSlayout also includes files from the sourcedata folder.

Example:
The top folder of my BIDS dataset looks like this:
Image

ROOT='D:/BIDS_pilot'

layout=bids.BIDSLayout(ROOT)

#get all subjects
layout.get_subjects()

This returns

['82', '88', '91', '95', '003', '004', '005', '006']

Which is a little confusing, given that there's clearly only 1 subject folder (and only one subject listed in participants.tsv).

However, asking for all files from subject 82:

#get all files from subject 82:
layout.get(subject='82')

[<BIDSDataFile filename='D:\BIDS_pilot\sourcedata\Sub001\lab\ASSRParadigm\sub-82_ASSRParadigm-behavioral-data_1730798988.tsv'>,
 <BIDSFile filename='D:\BIDS_pilot\sourcedata\Sub001\lab\ASSRParadigm\sub-82_ASSRParadigm-EyeTracking_1730798988.edf'>,
 <BIDSDataFile filename='D:\BIDS_pilot\sourcedata\Sub001\lab\SetupParadigm\sub-82_SetupParadigm-behavioral-data_1730798988.tsv'>,
 <BIDSFile filename='D:\BIDS_pilot\sourcedata\Sub001\lab\SetupParadigm\sub-82_SetupParadigm-EyeTracking_1730798988.edf'>,
 <BIDSDataFile filename='D:\BIDS_pilot\sourcedata\Sub001\lab\sub-82_events_1730798988.tsv'>,
 <BIDSFile filename='D:\BIDS_pilot\sourcedata\Sub001\lab\sub-82_ParadigmRunner-log_1730798988.log'>]

But, the documentation says that "By default, indexing ignores all files in 'code/', 'stimuli/', 'sourcedata/', 'models/', and any hidden files/dirs beginning with '.' at root level."
So what is likely to be the issue?

I am using pybids 0.18.1 on windows.

@effigies
Copy link
Collaborator

I suspect this is an issue with Windows paths, since they've got backslash separators. Windows isn't supported or tested on. I don't really know the scope, but I could open a PR to start testing on Windows and see how big a task it would be to get things working.

@effigies effigies changed the title pyBIDS also indexes my sourcedata? sourcedata indexed on Windows Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants