The is_bids_files() function doesn't correctly detect all/only BIDS files. For example, the ome.zarr directories are not included in the generated table.
|
def is_bids_file(path: StrOrPath) -> bool: |
|
""" |
|
Check if `path` is a valid BIDS data file. E.g. not a directory or JSON sidecar |
|
associated to another data file. |
|
""" |
|
# TODO: other checks? |
|
# - skip files matching patterns in .bidsignore? |
|
path = Path(path) |
|
return ( |
|
not path.is_dir() |
|
and path.name.startswith("sub-") |
|
and not is_associated_sidecar(path) |
|
) |
One possible better way to identify BIDS files could use bidschematools and match the extension to known BIDS extensions.
cc @effigies.
The
is_bids_files()function doesn't correctly detect all/only BIDS files. For example, theome.zarrdirectories are not included in the generated table.bids2table/bids2table/extractors/bids.py
Lines 54 to 66 in 7650e8c
One possible better way to identify BIDS files could use
bidschematoolsand match the extension to known BIDS extensions.cc @effigies.