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

[ENH] Add Sources link to all raw datatypes sidecar JSON #906

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 7 additions & 5 deletions src/03-modality-agnostic-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ For example, the [EDF](https://www.edfplus.info/)
data format can only contain recording dates after 1985.
Shifting dates is RECOMMENDED, but not required.

The source file path of each recording is also OPTIONAL and can be stored under the ``sources`` column. Similar to [derivatives](./05-derivatives/02-common-data-types.md), it is OPTIONAL to include ``sources``, specifying the filename(s) of the source file used to generate this dataset. If the filename(s) contains patient identifiable information, then it should not be stored.
Copy link
Member

Choose a reason for hiding this comment

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

double backticks render code in RST, but for MD, it's single backticks 😉

Also: the files under the filename column are relative to the scans.tsv file (this is implicit unfortunately, but relatively clear from the context that this is meant by the text on line 435). --> What should the files under the sources column be relative to? ... should we wait for #918 and make this BIDS-URIs? ... or should it be relative to the dataset root - as you seem to do in your current example?


Additional fields can include external behavioral measures relevant to the
scan.
For example vigilance questionnaire score administered after a resting
Expand All @@ -463,11 +465,11 @@ All such included additional fields SHOULD be documented in an accompanying
Example `_scans.tsv`:

```Text
filename acq_time
func/sub-control01_task-nback_bold.nii.gz 1877-06-15T13:45:30
func/sub-control01_task-motor_bold.nii.gz 1877-06-15T13:55:33
meg/sub-control01_task-rest_split-01_meg.nii.gz 1877-06-15T12:15:27
meg/sub-control01_task-rest_split-02_meg.nii.gz 1877-06-15T12:15:27
filename acq_time sources
func/sub-control01_task-nback_bold.nii.gz 1877-06-15T13:45:30 sourcedata/sub01/dicoms
func/sub-control01_task-motor_bold.nii.gz 1877-06-15T13:55:33 sourcedata/sub01/motordicoms
meg/sub-control01_task-rest_split-01_meg.nii.gz 1877-06-15T12:15:27 sourcedata/sub01/restdicoms
meg/sub-control01_task-rest_split-02_meg.nii.gz 1877-06-15T12:15:27 sourcedata/sub01/restdicoms2
```

## Sessions file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ When adding additional metadata please use the CamelCase version of
whenever possible. See also
[recommendations on JSON files](../02-common-principles.md#keyvalue-files-dictionaries).

### Source Filename

Similar to [derivatives](../05-derivatives/02-common-data-types.md), it is OPTIONAL to include ``Sources`` as a key in the sidecar JSON, specifying the filename(s) of the source file used to generate this dataset. If the filename(s) contains patient identifiable information, then it should not be stored in ``Sources``.

{{ MACROS___make_metadata_table(
{
"Sources": ("OPTIONAL", "URI of source file used to generate the current file. Care should be taken not to leak patient identifiable information for publicly shared datasets.")
}
) }}

## Anatomy imaging data

{{ MACROS___make_filename_template(datatypes=["anat"]) }}
Expand Down
11 changes: 10 additions & 1 deletion src/04-modality-specific-files/02-magnetoencephalography.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ SHOULD be present:
}
) }}

Similar to [derivatives](../05-derivatives/02-common-data-types.md), it is OPTIONAL to include ``Sources`` as a key in the sidecar JSON, specifying the filename(s) of the source file used to generate this dataset. If the filename(s) contains patient identifiable information, then it should not be stored in ``Sources``.

{{ MACROS___make_metadata_table(
{
"Sources": ("OPTIONAL", "URI of source file used to generate the current file. Care should be taken not to leak patient identifiable information for publicly shared datasets.")
}
) }}

Example:

```JSON
Expand Down Expand Up @@ -198,7 +206,8 @@ Example:
"ContinuousHeadLocalization": true,
"HeadCoilFrequency": [1470,1530,1590],
"DigitizedLandmarks": true,
"DigitizedHeadPoints": true
"DigitizedHeadPoints": true,
"Sources": ["001-upright-meg.ds"],
}
```

Expand Down
11 changes: 10 additions & 1 deletion src/04-modality-specific-files/03-electroencephalography.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ SHOULD be present:
}
) }}

Similar to [derivatives](../05-derivatives/02-common-data-types.md), it is OPTIONAL to include ``Sources`` as a key in the sidecar JSON, specifying the filename(s) of the source file used to generate this dataset. If the filename(s) contains patient identifiable information, then it should not be stored in ``Sources``.

{{ MACROS___make_metadata_table(
{
"Sources": ("OPTIONAL", "URI of source file used to generate the current file. Care should be taken not to leak patient identifiable information for publicly shared datasets.")
}
) }}

Example:

```JSON
Expand Down Expand Up @@ -184,7 +192,8 @@ Example:
}
},
"RecordingDuration":600,
"RecordingType":"continuous"
"RecordingType":"continuous",
"Sources": ["001-eeg-recording.vhdr"]
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ Specific iEEG fields MAY be present:
}
) }}

Similar to [derivatives](../05-derivatives/02-common-data-types.md), it is OPTIONAL to include ``Sources`` as a key in the sidecar JSON, specifying the filename(s) of the source file used to generate this dataset. If the filename(s) contains patient identifiable information, then it should not be stored in ``Sources``.

{{ MACROS___make_metadata_table(
{
"Sources": ("OPTIONAL", "URI of source file used to generate the current file. Care should be taken not to leak patient identifiable information for publicly shared datasets.")
}
) }}

Example:

```JSON
Expand Down Expand Up @@ -196,7 +204,8 @@ Example:
"RecordingType":"continuous",
"iEEGGround":"placed on the right mastoid",
"iEEGPlacementScheme":"right occipital temporal surface",
"ElectricalStimulation":false
"ElectricalStimulation":false,
"Sources": ["001-visual.edf"]
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,11 @@ of any `*_<physio>.tsv.gz` file.
}
) }}

Similar to [derivatives](../05-derivatives/02-common-data-types.md), it is OPTIONAL to include ``Sources`` as a key in the sidecar JSON, specifying the filename(s) of the source file used to generate this dataset. If the filename(s) contains patient identifiable information, then it should not be stored in ``Sources``.

{{ MACROS___make_metadata_table(
{
"Sources": ("OPTIONAL", "URI of source file used to generate the current file. Care should be taken not to leak patient identifiable information for publicly shared datasets.")
}
) }}
<!-- Link Definitions -->
3 changes: 3 additions & 0 deletions src/04-modality-specific-files/07-behavioral-experiments.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ In addition of the metadata REQUIRED for some data that can be found in the `beh
(for example `SamplingFrequency` and `StartTime` for `*_<physio|stim>.tsv.gz` files),
it is RECOMMENDED to add the following metadata to the JSON files of this folder.

Similar to [derivatives](../05-derivatives/02-common-data-types.md), it is OPTIONAL to include ``Sources`` as a key in the sidecar JSON, specifying the filename(s) of the source file used to generate this dataset. If the filename(s) contains patient identifiable information, then it should not be stored in ``Sources``.

{{ MACROS___make_metadata_table(
{
"TaskName": "RECOMMENDED",
Expand All @@ -41,5 +43,6 @@ it is RECOMMENDED to add the following metadata to the JSON files of this folder
"InstitutionName": "RECOMMENDED",
"InstitutionAddress": "RECOMMENDED",
"InstitutionalDepartmentName": "RECOMMENDED",
"Sources": ("OPTIONAL", "URI of source file used to generate the current file. Care should be taken not to leak patient identifiable information for publicly shared datasets.")
}
) }}
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,16 @@ We refer to the common principles for the standards for describing dates and tim

All reconstruction-specific parameters that are not specified, but one wants to include, should go into the `ReconMethodParameterValues` field.

#### Source Filename

Similar to [derivatives](../05-derivatives/02-common-data-types.md), it is OPTIONAL to include ``Sources`` as a key in the sidecar JSON, specifying the filename(s) of the source file used to generate this dataset. If the filename(s) contains patient identifiable information, then it should not be stored in ``Sources``.

{{ MACROS___make_metadata_table(
{
"Sources": ("OPTIONAL", "URI of source file used to generate the current file. Care should be taken not to leak patient identifiable information for publicly shared datasets.")
}
) }}

#### Example (`*_pet.json`)

```JSON
Expand Down Expand Up @@ -270,7 +280,8 @@ All reconstruction-specific parameters that are not specified, but one wants to
"ReconMethodParameterUnits": ["none","none"],
"ReconMethodParameterValues": [16,10],
"ReconFilterType": "none",
"AttenuationCorrection": "[137Cs]transmission scan-based"
"AttenuationCorrection": "[137Cs]transmission scan-based",
"Sources": ["pet_file.nii"]
}
```

Expand Down