Skip to content

[SCHEMA] bep012 functional derivatives#1209

Open
rwblair wants to merge 29 commits intobids-standard:masterfrom
rwblair:schema/bep012
Open

[SCHEMA] bep012 functional derivatives#1209
rwblair wants to merge 29 commits intobids-standard:masterfrom
rwblair:schema/bep012

Conversation

@rwblair
Copy link
Copy Markdown
Member

@rwblair rwblair commented Aug 16, 2022

My attempt at schematizing bep012. New in this PR, regex based column names.

@rwblair rwblair requested a review from effigies August 16, 2022 19:55
@rwblair
Copy link
Copy Markdown
Member Author

rwblair commented Aug 16, 2022

Can't figure out the yamllint error. That line looks a lot like other checks with includes statements

Copy link
Copy Markdown
Member

@tsalo tsalo left a comment

Choose a reason for hiding this comment

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

The new suffixes need to be defined, and I noticed a few typos, but other than that it looks pretty comprehensive.

The three tough things about this BEP are:

  1. Columns that use regular expressions. Do we need a new object field for these (e.g., pattern), or is name fine?
  2. One-to-many mapping for columns that use regular expressions. Do we need a new object field for these, or can we assume that any regex-based column can appear multiple times in the same TSV file?
  3. The new column suffixes that can be applied additively. Do we need a new object type for these? They're not really columns, and they can be applied to a wide range of existing columns.

EDIT: Can you also update your branch to pull in the recent test changes?

Comment on lines +5 to +6
- ".nii"
- ".nii.gz"
Copy link
Copy Markdown
Member

@tsalo tsalo Aug 18, 2022

Choose a reason for hiding this comment

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

Suggested change
- ".nii"
- ".nii.gz"
- $ref: rules.datatypes.func.func.extensions

Would this work?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if it will work, it doesn't seem to cost much to be explicit. Either way, a thing to note is that it's $ref, not _ref.

- dataset.DatasetType == "derivative"
- '!(["alff", "falff"].includes(suffix))'
fields:
BandpassFilter: optional
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Per our discussion today, I think this may need a level_addendum. I assume we'll want a more conventional metadata table instead of the current one, which has a "Required for suffix" column instead of the typical "Requirement Level" column.

a: anatomically derived ROIs (white matter and CSF),
t: temporal variance, w: white matter voxels only, c: CSF voxels only
cosine_x:
name: ^cosine_[0-9a-zA-Z]+$
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These new regex-based names are new. I think having regex-based names fits, but one other novel aspect is that the columns will have a one-to-many relationship. All other columns and metadata fields have had one-to-one mappings so far (one object definition for each column/field). Do we need an additional field in the object schema to account for this?

- "lfcdw"
- "vmhc"

functional_derivatives_timeseries:
Copy link
Copy Markdown
Collaborator

@effigies effigies Aug 18, 2022

Choose a reason for hiding this comment

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

Missing datatype: func here and elsewhere.

Comment on lines +2 to +13
BandpassFilterOpt:
selectors:
- dataset.DatasetType == "derivative"
- '!(["alff", "falff"].includes(suffix))'
fields:
BandpassFilter: optional
BandpassFilterReq:
selectors:
- dataset.DatasetType == "derivative"
- '["alff", "falff"].includes(suffix)'
fields:
BandpassFilter: required
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we can just do this a a single table:

Suggested change
BandpassFilterOpt:
selectors:
- dataset.DatasetType == "derivative"
- '!(["alff", "falff"].includes(suffix))'
fields:
BandpassFilter: optional
BandpassFilterReq:
selectors:
- dataset.DatasetType == "derivative"
- '["alff", "falff"].includes(suffix)'
fields:
BandpassFilter: required
BandpassFilter:
selectors:
- dataset.DatasetType == "derivative"
- '["alff", "falff"].includes(suffix)'
fields:
BandpassFilter:
level: required
level_addendum: for suffixes `alff` and `falff`

TimeseriesMetadata:
selectors:
- dataset.DatasetType == "derivative"
- suffix == "timeseries"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This should match any of these suffixes.

@@ -0,0 +1,44 @@
---
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

timeseries.tsv can contain a superset of what's in these other files.

Suggested change
---
---
GeneralTimeSeries:
selectors:
- dataset.DatasetType == "derivative"
- suffix == 'timeseries'
columns:
- trans_x: optional
- trans_y: optional
- trans_z: optional
- rot_x: optional
- rot_y: optional
- rot_z: optional
- framewise_displacement: optional
- rmsd: optional
- rms: optional
- non_steady_state_x: optional
- dvars: optional
- std_dvars: optional
- cosine_x: optional
- legendre: optional
- compcor: optional
- melodic_x: optional
additional_columns: allowed

rwblair and others added 11 commits August 19, 2022 08:21
…yaml

Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
…yaml

Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
…yaml

Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
…yaml

Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
…yaml

Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
…yaml

Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
…yaml

Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
…yaml

Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
…yaml

Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
…yaml

Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
[SCHEMA] Add object definitions for BEP012 Functional Derivatives
@sappelhoff sappelhoff added BEP schema Issues related to the YAML schema representation of the specification. Patch version release. labels Sep 1, 2022
type: string
unit: hexadecimal
compcor:
name: '[a|t|w|c]_compcor_cor_[0-9a-zA-Z]+'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just FTR (attn @bendichter) something similarish came up in BEP032 context where for different shape of electrodes we would like to have columns describring the shapes, e.g.

name   shape   shape_radius  shape_width
1      square       n/a         1
2      circle        1         n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BEP schema Issues related to the YAML schema representation of the specification. Patch version release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants