Code Monkey home page Code Monkey logo

Comments (11)

effigies avatar effigies commented on July 17, 2024 1

Okay. The main reason I suggest it is that the output directories have the potential to get very full, and separating run-level from higher-level results might help significantly declutter. But we can always circle back to it later if that does turn out to be an issue.

from fitlins.

adelavega avatar adelavega commented on July 17, 2024

As an example, here is a filename ses-movie_task-movie_run-1_bold_contrast-framewiseDisplacement_stat.nii.gz

From this, I gather session is higher in the hierarchy than task and that's why it gets its own folder?

from fitlins.

effigies avatar effigies commented on July 17, 2024

Yeah, I think that's true. Are there any cases where we would want to preserve session outside the subject?

from fitlins.

tyarkoni avatar tyarkoni commented on July 17, 2024

One way to address this might be to dump a small JSON file in each output directory (if we're not already doing this) that contains metadata that makes it clear what the folder represents. E.g., "Level": "dataset".

from fitlins.

adelavega avatar adelavega commented on July 17, 2024

I think the meta-data file helps.
I'm not so concerned about preserving session, as much as I think the dataset level stuff should be in the same place regardless. And actually, I think since dataset level supersedes session, it should probably not be preserved. If you wanted to do a session level analysis, that would be a contrast at the dataset level, correct?

from fitlins.

effigies avatar effigies commented on July 17, 2024

That's a little difficult because sometimes you have multiple levels in the same directory, as there's no provision in BIDS for new subdirectories. Would it make sense to have level-X as a key/value pair in the filename? That might help with things like:

sub-01_task-nback_run-1_contrast-maineffect_zscore.nii.gz
sub-01_task-nback_run-2_contrast-maineffect_zscore.nii.gz
sub-01_task-nback_contrast-maineffect_zscore.nii.gz

It could be:

sub-01_task-nback_run-1_level-run_contrast-maineffect_zscore.nii.gz
sub-01_task-nback_run-2_level-run_contrast-maineffect_zscore.nii.gz
sub-01_task-nback_level-subject_contrast-maineffect_zscore.nii.gz

from fitlins.

tyarkoni avatar tyarkoni commented on July 17, 2024

That's pretty ugly, but has the benefit of being unambiguous, so I guess I'd go with it. Alternatively, we could drop that info in the sidecars (but I guess those won't contain anything else otherwise, so probably no reason to create them just for that).

from fitlins.

effigies avatar effigies commented on July 17, 2024

Sidecars will still want SourceFile at minimum.

But the only place where we really run into this right now is the run level, because all other levels have corresponding directories. What if we add a level-run subdirectory that can sit inside the subject or session subdirectory?

sub-01/
    [ses-01]/
        level-run/
            sub-01_[ses-01_]task-nback_run-1_contrast-maineffect_zscore.nii.gz
        [sub-01_ses-01_task-nback_contrast-maineffect_zscore.nii.gz]
    sub-01_task-nback_contrast-maineffect_zscore.nii.gz
sub-02/
    ...
task-nback_contrast-maineffect_zscore.nii.gz

It's not spec compliant, but neither are our suffixes.

from fitlins.

tyarkoni avatar tyarkoni commented on July 17, 2024

If we have sidecars anyway, then I'd vote to put Level in there, and probably to make it mandatory for all images (whether or not the context is sufficient to determine level). That way we can be fully compliant and still eliminate any ambiguity. I'm not crazy about a level-run subfolder because I think it will throw some users for a loop the first time they see it.

from fitlins.

adelavega avatar adelavega commented on July 17, 2024

from fitlins.

tyarkoni avatar tyarkoni commented on July 17, 2024

Maybe we should call it BIDSStatsModelLevel or at least AnalysisLevel for clarity.

from fitlins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.