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

[SCHEMA] bep012 functional derivatives #1209

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5cb8bef
Merge branch 'schema/common_derivatives' of github.com:rwblair/bids-s…
rwblair Apr 19, 2022
ceb3cd8
Merge branch 'schema/common_derivatives' of github.com:rwblair/bids-s…
rwblair Apr 20, 2022
49cdb82
incomplete first pass at bep012 schema
rwblair Apr 20, 2022
4ac9a38
Merge branch 'master' of github.com:bids-standard/bids-specification …
rwblair Aug 15, 2022
a5c130f
expand bep12 datatypes
rwblair Aug 16, 2022
daa0cc2
Merge branch 'master' of github.com:bids-standard/bids-specification …
rwblair Aug 16, 2022
aa0fb95
would help if I actually committed the files.
rwblair Aug 16, 2022
fee20fb
fix missing quote
rwblair Aug 17, 2022
7452a99
Update src/schema/rules/sidecars/derivatives/functional_derivatives.yaml
rwblair Aug 18, 2022
262b4c6
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
6c67e9a
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
fde5ddd
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
06122bb
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
d10b4f6
Update src/schema/objects/columns.yaml
rwblair Aug 19, 2022
08f1e38
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
65ce47f
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
34ad6c3
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
203e2b3
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
c3a3204
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
931ae95
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
1178463
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
9a592ce
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
09fb799
Update src/schema/rules/datatypes/derivatives/functional_derivatives.…
rwblair Aug 19, 2022
137af27
Merge remote-tracking branch 'upstream/master' into schema/bep012
effigies Aug 19, 2022
b2ba2db
Add suffix definitions.
tsalo Aug 22, 2022
21c0a20
Add extension definitions.
tsalo Aug 22, 2022
daa34cc
Update suffixes.yaml
tsalo Aug 22, 2022
c0c6993
Add metadata fields.
tsalo Aug 22, 2022
e4ffa0b
Merge pull request #1 from tsalo/schema-bep012-tsalo
rwblair Aug 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions src/schema/objects/columns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ color:
Hexadecimal. Label color for visualization.
type: string
unit: hexadecimal
compcor:
name: ^[a|t|w|c]_compcor_cor_[0-9a-zA-Z]+$
rwblair marked this conversation as resolved.
Show resolved Hide resolved
display_name: CompCor
description: |
CompCor (Behzadi, et al., 2007) calculated with voxels chosen based on:
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
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?

display_name: Cosine <X>
description: Discrete cosine basis vectors
derived_from:
name: derived_from
display_name: Derived from
Expand Down Expand Up @@ -88,13 +99,24 @@ duration:
- type: string
enum:
- n/a
dvars:
name: dvars
display_name: DVARS
description: Change in variance (Brett, 2006, Power, et al., 2012)
type: number
filename:
name: filename
display_name: Filename
description: |
Relative paths to files.
type: string
format: participant_relative
framwise_displacement:
name: framewise_displacement
display_name: Framwise Displacement
description: Framewise displacement (Power, et al., 2012)
type: number
unit: mm
group__channel:
name: group
display_name: Channel group
Expand Down Expand Up @@ -179,6 +201,14 @@ index:
description: |
The label integer index.
type: integer
legendre_x:
name: ^legendre_[0-9a-zA-Z]+$
display_name: Legendre <X>
description: Legendre polynomial basis vectors
non_steady_state_x:
name: ^non_steady_state_[0-9a-zA-Z]+$
display_name: Non Steady State <X>
description: Initial non-steady-state volumes. One column per volume.
low_cutoff:
name: low_cutoff
display_name: Low cutoff
Expand All @@ -204,6 +234,10 @@ mapping:
description: |
Corresponding integer label in the standard BIDS label lookup.
type: integer
melodic:
name: ^melodic_[0-9a-zA-Z]+$
display_name: FSL MELODIC
description: Columns from the mixing matrix in FSL MELODIC
material:
name: material
display_name: Electrode material
Expand Down Expand Up @@ -341,6 +375,36 @@ response_time:
- type: string
enum:
- n/a
rmsd:
name: rmsd
display_name: Root Mean Square Derivation
description: Root mean square deviation (Jenkinson, 1999)
type: number
unit: mm
rms:
name: rms
display_name: Root Mean Square
description: Root mean square of translation parameters (Van Dijk, et al., 2012)
type: number
unit: mm
rot_x:
name: rot_x
display_name: X Axis Rotation
description: Rotation parameters
type: number
unit: rad
rot_y:
name: rot_y
display_name: Y Axis Rotation
description: Rotation parameters
type: number
unit: rad
rot_z:
name: rot_z
display_name: Z Axis Rotation
description: Rotation parameters
type: number
unit: rad
sample:
name: sample
display_name: Sample index
Expand Down Expand Up @@ -470,6 +534,11 @@ status_description:
Freeform text description of noise or artifact affecting data quality on the channel.
It is meant to explain why the channel was declared bad in the `status` column.
type: string
std_dvars:
name: std_dvars
display_name: Standardized DVARS
description: Standardized DVARS (Nichols, 2013)
type: number
stim_file:
name: stim_file
display_name: Stimulus file
Expand Down Expand Up @@ -508,6 +577,24 @@ time:
For example, 5.
type: number
unit: s
trans_x:
name: trans_x
display_name: X Axis Translation
description: Translation parameters
type: number
unit: mm
trans_y:
name: trans_y
display_name: Y Axis Translation
description: Translation parameters
type: number
unit: mm
trans_z:
name: trans_z
display_name: Z Axis Translation
description: Translation parameters
type: number
unit: mm
trial_type:
name: trial_type
display_name: Trial type
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
functional_derivatives_maps:
_ref: rules.datatypes.func.func
extensions:
- ".nii"
- ".nii.gz"
Copy link
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
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.

- ".gii"
- ".dscalar.nii"
entities:
_ref: rules.datatypes.func.func.entities
space: OPTIONAL
resolution: OPTIONAL
density: OPTIONAL
desc: OPTIONAL
rwblair marked this conversation as resolved.
Show resolved Hide resolved
suffixes:
- "mean"
- "std"
- "tsnr"
- "sfs"
- "alff"
- "falff"
- "reho"
- "dcb"
- "dcw"
- "ecb"
- "ecw"
- "lfcdb"
- "lfcdw"
- "vmhc"
tsalo marked this conversation as resolved.
Show resolved Hide resolved

functional_derivatives_timeseries:
Copy link
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.

extensions:
- ".tsv"
- ".json"
- ".time.gii"
- ".dtseries.nii"
entities:
_ref: rules.datatypes.func.func.entities
desc: OPTIONAL
rwblair marked this conversation as resolved.
Show resolved Hide resolved
suffixies:
rwblair marked this conversation as resolved.
Show resolved Hide resolved
- timeseries

functional_derivatives_roi_based_timeseries:
extensions:
- ".nii"
- ".tsv"
- ".json"
entities:
_ref: rules.datatypes.func.func.entities
desc: OPTIONAL
rwblair marked this conversation as resolved.
Show resolved Hide resolved
atlas: OPTIONAL
suffixies:
rwblair marked this conversation as resolved.
Show resolved Hide resolved
- timeseries

functional_derivatives_motion_timeseries:
extensions:
- ".tsv"
- ".json"
entities:
_ref: rules.datatypes.func.func.entities
desc: OPTIONAL
rwblair marked this conversation as resolved.
Show resolved Hide resolved
suffixies:
rwblair marked this conversation as resolved.
Show resolved Hide resolved
- motion

functional_derivatives_outliers_timeseries:
extensions:
- ".tsv"
- ".json"
entities:
_ref: rules.datatypes.func.func.entities
desc: OPTIONAL
rwblair marked this conversation as resolved.
Show resolved Hide resolved
suffixies:
rwblair marked this conversation as resolved.
Show resolved Hide resolved
- outliers

functional_derivatives_spatiotemporal_timeseries:
extensions:
- ".tsv"
- ".nii.gz"
entities:
_ref: rules.datatypes.func.func.entities
desc: OPTIONAL
rwblair marked this conversation as resolved.
Show resolved Hide resolved
suffixies:
rwblair marked this conversation as resolved.
Show resolved Hide resolved
- mixing
- components

functional_derivatives_spatiotemporal_decomp_timeseries:
extensions:
- ".json"
entities:
_ref: rules.datatypes.func.func.entities
desc: OPTIONAL
rwblair marked this conversation as resolved.
Show resolved Hide resolved
suffixies:
rwblair marked this conversation as resolved.
Show resolved Hide resolved
- decomposition
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
BandpassFilterOpt:
selectors:
- dataset.DatasetType == "derivative"
- '!(["alff", "falff"].includes(suffix))'
fields:
BandpassFilter: optional
Copy link
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.

BandpassFilterReq:
selectors:
- dataset.DatasetType == "derivative"
- '["alff", "falff"].includes(suffix)'
fields:
BandpassFilter: required
Copy link
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`

NeighborhoodOpt:
selectors:
- dataset.DatasetType == "derivative"
- '!(["reho"].includes(suffix))'
fields:
Neighborhood: optional
NeighborhoodReq:
selectors:
- dataset.DatasetType == "derivative"
- '["reho"].includes(suffix)
tsalo marked this conversation as resolved.
Show resolved Hide resolved
fields:
Neighborhood: required
ThresholdOpt:
selectors:
- dataset.DatasetType == "derivative"
- '!(["dcb", "dcw", "ecb", "ecw"].includes(suffix))'
fields:
Threshold: optional
Method: optional
ThresholdReq:
selectors:
- dataset.DatasetType == "derivative"
- '["dcb", "dcw", "ecb", "ecw"].includes(suffix)'
fields:
Threshold: required
Method: required
rwblair marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
Copy link
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

MotionRelatedTimeSeries:
selectors:
- dataset.DatasetType == "derivative"
- suffix == 'motion'
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
additional_columns: allowed_if_defined

TemporalOutlierMasks:
selectors:
- dataset.DatasetType == "derivative"
- suffix == 'outlier'
columns:
- non_steady_state_x: optional
additional_columns: allowed_if_defined

OtherTimeSeries:
selectors:
- dataset.DatasetType == "derivative"
- suffix == 'outlier'
columns:
- dvars: optional
- std_dvars: optional
- cosine_x: optional
- legendre: optional
additional_columns: allowed_if_defined

SpatiotemporalDecompositions:
selectors:
- dataset.DatasetType == "derivative"
- '["components", "mixing"].includes(suffix)'
columns:
- compcor: optional
- melodic_x: optional
additional_columns: allowed_if_defined