JuliaDynamics / DrWatson.jl

The perfect sidekick to your scientific inquiries
https://juliadynamics.github.io/DrWatson.jl/stable/
Other
827 stars 91 forks source link

Support for BIDS Style Datasets #206

Closed TheCedarPrince closed 3 years ago

TheCedarPrince commented 3 years ago

Hello DrWatson Team.

Would it be possible for DrWatson to handle Brain Image Data Structured (BIDS) datasets? The dataset structure generally looks like this:

image

Source: https://bids.neuroimaging.io/

I was curious if there was a way in DrWatson to handle this natively. I found BIDSTools.jl which supports this sort of parsing:

julia> layout = Layout("/path/to/bids/root/")
Layout:
    root = /path/to/bids/root/
    total subject = 125
    total session = 137
    total files = 2945

julia> for sub in layout.subjects
           for ses in sub.sessions
               for file in ses.files
                   # do something
               end
           end
       end

And was curious if I could replicate the same sort of functionality with DrWatson via datadir() and such. More just looking to see if DrWatson has a generic solution I could use rather than using this separate package.

I look forward to your thoughts and suggestions about this. Thanks!

Datseris commented 3 years ago

Hi there,

the only think I can think of is doing Layout(datadir("path")).

More just looking to see if DrWatson has a generic solution I could use rather than using this separate package.

There is no reason to think this way: If a package offers a functionality that is useful for you, you should use it :)

However, I can also say that given that you have a standardized format, you can write your own function that crawls through this layout.

TheCedarPrince commented 3 years ago

Ah gotcha. The Layout(datadir()) idea is great. Very true. I think I shall just use that package to handle the dataset instead of relying on DrWatson for everything. Thanks @Datseris - closing the issue. :smile: