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] Make electrodes.tsv REQUIRED for iEEG #1854

Open
sappelhoff opened this issue Jun 8, 2024 · 2 comments · May be fixed by #1896
Open

[SCHEMA] Make electrodes.tsv REQUIRED for iEEG #1854

sappelhoff opened this issue Jun 8, 2024 · 2 comments · May be fixed by #1896
Labels
iEEG schema Issues related to the YAML schema representation of the specification. Patch version release.
Milestone

Comments

@sappelhoff
Copy link
Member

As discussed in the issue above ☝️, the electrodes.tsv file should be made REQUIRED for the iEEG modality. If it is impossible for a researcher to supply electrode coordinates (which would be saved in electrodes.tsv), then they may fill the cells with n/a.

@sappelhoff sappelhoff added iEEG schema Issues related to the YAML schema representation of the specification. Patch version release. labels Jun 8, 2024
@sappelhoff sappelhoff added this to the 1.10.0 milestone Jun 8, 2024
@effigies
Copy link
Collaborator

effigies commented Jun 8, 2024

I suppose that the logic here ultimately boils down to "every _ieeg.* data file MUST have an associated electrodes.tsv", but is this a transitive case, where _ieeg.* files need an associated _channels.tsv and each iEEG _channels.tsv file needs an associated _electrodes.tsv? Is it possible to have a common channels.tsv inherited but electrodes.tsv be subject-specific?

@effigies
Copy link
Collaborator

effigies commented Jun 8, 2024

In any event, this will require adding electrodes to the context.associations object:

associations:
# Note that this is not intended to be an exhaustive list of associated files
# or to expose every attribute of those files. It is specifically those files
# and attributes for which a rule needs to be applied from an originating file.
description: |
Associated files, indexed by suffix, selected according to the inheritance principle
type: object
properties:
events:
description: 'Events file'
type: object
properties:
path:
description: 'Path to associated events file'
type: string
onset:
description: 'Contents of the onset column'
type: array
items:
type: string
aslcontext:
description: 'ASL context file'
type: object
properties:
path:
description: 'Path to associated aslcontext file'
type: string
n_rows:
description: 'Number of rows in aslcontext.tsv'
type: integer
volume_type:
description: 'Contents of the volume_type column'
type: array
items:
type: string
m0scan:
description: 'M0 scan file'
type: object
properties:
path:
description: 'Path to associated M0 scan file'
type: string
magnitude:
description: 'Magnitude image file'
type: object
properties:
path:
description: 'Path to associated magnitude file'
type: string
magnitude1:
description: 'Magnitude1 image file'
type: object
properties:
path:
description: 'Path to associated magnitude1 file'
type: string
bval:
description: 'B value file'
type: object
properties:
path:
description: 'Path to associated bval file'
type: string
n_cols:
description: 'Number of columns in bval file'
type: integer
n_rows:
description: 'Number of rows in bval file'
type: integer
values:
description: 'B-values contained in bval file'
type: array
items:
type: number
bvec:
description: 'B vector file'
type: object
properties:
path:
description: 'Path to associated bvec file'
type: string
n_cols:
description: 'Number of columns in bvec file'
type: integer
n_rows:
description: 'Number of rows in bvec file'
type: integer
channels:
description: 'Channels file'
type: object
properties:
path:
description: 'Path to associated channels file'
type: string
type:
description: 'Contents of the type column'
type: array
items:
type: string
coordsystem:
description: 'Coordinate system file'
type: object
properties:
path:
description: 'Path to associated coordsystem file'
type: string

Then the rule would simply be type(associations.electrodes) != "null". If we want to make rules about the contents of electrodes, those will need to go further and define specific contents of electrodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iEEG schema Issues related to the YAML schema representation of the specification. Patch version release.
Projects
None yet
2 participants