Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Select magnitude images in collect_data for BIDS 1.5.0 #594

Merged
merged 4 commits into from
Mar 30, 2022

Conversation

tsalo
Copy link
Contributor

@tsalo tsalo commented Dec 17, 2020

Closes #591.

In BIDS 1.5.0, the part entity will be released. part can have a value of mag, phase, real, or imag, of which only mag is used for most preprocessing pipelines. When part is not provided, the data are assumed to be magnitude.

Changes proposed:

  • Add part == mag or None to filters in collect_data() for T1w, T2w, FLAIR, and BOLD data.
  • Add new entities (part, inv, flip, and mt) to config file.

@effigies
Copy link
Member

effigies commented Jan 5, 2021

@tsalo can you merge/rebase master? The CI failure may have already been fixed.

@tsalo
Copy link
Contributor Author

tsalo commented Jan 5, 2021

Done!

@tsalo
Copy link
Contributor Author

tsalo commented Jan 5, 2021

BTW would it be reasonable to select T1w and T1map instead of just T1w? Same for T2w.

@effigies
Copy link
Member

effigies commented Jan 5, 2021

Because we haven't tested fMRIPrep on T1map data, I would be inclined instead to encourage users to create a BIDS filter file to find the T1maps, until we gain some confidence that we can work with them automatically.

I'm currently imagining a new section to the docs with "Advanced and experimental use cases" where we explain how to do things that are possible but not (yet) supported. Open to other ideas.

@effigies
Copy link
Member

effigies commented Jan 5, 2021

RE the current failure, I think we need to update https://github.com/nipreps/niworkflows/blob/master/niworkflows/data/nipreps.json to include part.

@tsalo
Copy link
Contributor Author

tsalo commented Jan 5, 2021

Because we haven't tested fMRIPrep on T1map data, I would be inclined instead to encourage users to create a BIDS filter file to find the T1maps, until we gain some confidence that we can work with them automatically.

That makes sense. Thanks for the clarification.

I'm currently imagining a new section to the docs with "Advanced and experimental use cases" where we explain how to do things that are possible but not (yet) supported. Open to other ideas.

That sounds awesome!

RE the current failure, I think we need to update https://github.com/nipreps/niworkflows/blob/master/niworkflows/data/nipreps.json to include part.

Done. I also added the rest of the new entities. LMK if that's a problem.

@tsalo
Copy link
Contributor Author

tsalo commented Jan 5, 2021

I think this may require a new pybids release. I could pin to a commit in the setup.cfg though?

@effigies
Copy link
Member

effigies commented Jan 5, 2021

Ah, you're right. We're using a vanilla BIDSLayout, not passing our own. I think it's fine to leave the new entities in our JSON.

@tyarkoni Any objections to a PyBIDS release with entities that precede the BIDS spec release that makes them official? They're already merged into master, just pending a release.

@tyarkoni
Copy link

tyarkoni commented Jan 5, 2021

None objection!

Copy link
Member

@oesteban oesteban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to also update the default_path_patterns in nipreps.json if we want to generate derivatives of these data types.

@tsalo
Copy link
Contributor Author

tsalo commented Jan 22, 2021

@oesteban that's a good point. I know where part comes in, but I'm less sure about how to handle the other entities. They all apply specifically to anatomical data, but incorporating them might require basically supporting qMRI (i.e., considering which suffixes accept each entity rather than bundling all anatomical suffixes together).

@oesteban
Copy link
Member

I know I'd use part-mag for preprocessed fieldmaps. Although the raw spec does not allow it for the moment, we can push at least that to the BIDS-Derivatives.

@tsalo
Copy link
Contributor Author

tsalo commented Feb 3, 2021

I've updated the default path patterns to include part. I don't think the other ones are necessary just yet, and I'm reticent to try incorporating all of qMRI in this PR.

@effigies effigies changed the base branch from master to maint/1.4.x March 29, 2022 14:34
@effigies effigies force-pushed the filter-part-entity branch from 9aeaa92 to 523de7f Compare March 29, 2022 14:34
@effigies effigies added this to the 1.4.6 milestone Mar 29, 2022
@effigies
Copy link
Member

This will depend on bids-standard/pybids#826.

@effigies effigies modified the milestones: 1.4.6, 1.4.7 Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filter out phase, real, and imaginary data in collect_data
4 participants