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

Datatype entity is missed #11

Open
adelavega opened this issue Dec 5, 2022 · 8 comments
Open

Datatype entity is missed #11

adelavega opened this issue Dec 5, 2022 · 8 comments
Assignees
Labels
ancp effort: low Estimated low effort task good first issue Good for newcomers

Comments

@adelavega
Copy link
Collaborator

See: bids-standard#863 (comment)

@erdalkaraca
Copy link
Collaborator

Datatype is not listed as an entity in the schema. Maybe it makes sense to treat it the same way as extension/suffix, i.e. as an additional property of the Artifact class.

@erdalkaraca erdalkaraca self-assigned this Dec 5, 2022
@erdalkaraca
Copy link
Collaborator

This will require to extend the Artifact's definition:

Artifact:
  .doc: >-
    An artifact is a file whose name conforms to the BIDS file naming convention.
  .extends: File
  suffix:
    type: str
    use: required
  **datatype:
    type: str**
  entities:
    type: EntityRef
    min: 1
    max: -1

@adelavega
Copy link
Collaborator Author

yes, I did notice that its not in the schema. I think we will need to think about whether datatype should be deprecated or added to the schema to minimize "exceptions"

@erdalkaraca erdalkaraca added effort: low Estimated low effort task good first issue Good for newcomers labels Dec 7, 2022
@effigies
Copy link
Collaborator

effigies commented Dec 8, 2022

@ghisvail
Copy link

I believe you do need datatype to disambiguate multi-modality suffixes such as mask or events for instance.

@erdalkaraca
Copy link
Collaborator

What I am not sure about yet is how to handle the datatype in derivatives as files are not required to be in a datatype (sub-)folder.
Can we reliably infer the datatype from the suffix in case a file is not in a datatype folder?

@ghisvail
Copy link

Can we reliably infer the datatype from the suffix in case a file is not in a datatype folder?

I don't think the BIDS specs ever defined a 1:1 mapping between suffix and datatype tbh.

It took me several read to understand the modality -> datatype -> suffix hierarchy and how it relates to file collections.

It just happens that most modalities define a 1:1:1 between all three so it's easy to make this shortcut. I started to reconsider when I read about events, and then much later when the derivatives specs were refined.

@ghisvail
Copy link

in derivatives [...] files are not required to be in a datatype (sub-)folder.

AFAIK, datatype is still listed in the derivatives section of the specs, and all proposed derived types feature one.

erdalkaraca added a commit to ANCPLabOldenburg/ancp-bids that referenced this issue Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ancp effort: low Estimated low effort task good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants