Skip to content

sourcedata indexed on Windows #1111

Open
@kaare-mikkelsen

Description

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.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions