Number of unique participants for each modality in BIDS dataset?

Hi all,

Is there any BIDS app or script that summarizes a dataset by parsing all the modalities and counting how many unique participants are available for each modality (e.g., anat: t1w/t2w, func: task-restingstate/task-motor, dwi: acq-singleshelldir42, etc.)? Basically, we need a head count for every type of scan in the dataset.

Thank you.

1 Like

For reference: the conversation was started here but it felt more appropriate to have it on Neurostars.

You mentioned the possibility of doing this in R. It’d be really good to have also some R tools for this.

The R ecosystem for BIDS is not necessarily under-developped (though it might be I don’t have good visibility on this) but there is at least one R package to help interacting with BIDS (mostly MRI I think).

So if you were thinking of developing some R tools for this, it might be good to maybe add them to this repo.

1 Like

Pinging @bbuchsbaum , in case he has a solution to my question with bidser.

“bidser” has the function “search_files”

so, for example:

bp ← bids_project(“myproject”)

t1w ← search_files(bp, kind=“t1w”, suffix=“nii.gz”)
task_motor ← search_files(bp, task=“motor”, kind=“bold”, suffix=“nii.gz”)

in other words, if you know the scan types you want to count, you could search for them like above.

would this work for you? “bidser” is a work in progress, but should be up to this task.