pybids icon indicating copy to clipboard operation
pybids copied to clipboard

sourcedata indexed on Windows

Open kaare-mikkelsen opened this issue 1 year ago • 1 comments

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.

kaare-mikkelsen avatar Dec 09 '24 09:12 kaare-mikkelsen

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 avatar Dec 13 '24 21:12 effigies