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] Add metadata term files #774

Merged
merged 76 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
acc3b9a
[SCHEMA] Add metadata term files (#762)
tsalo Apr 13, 2021
2ecfc88
Improve make_metadata_table docstring.
tsalo Apr 13, 2021
b5f182c
Start addressing inconsistencies between rendered and hardcoded tables.
tsalo Apr 13, 2021
63b2027
Merge branch 'master' into metadata-schema
tsalo Apr 14, 2021
4d6cd67
Fix typos in PET metadata
tsalo Apr 26, 2021
c2a02ec
Add metadata fields from qMRI appendix.
tsalo Apr 26, 2021
e8607d2
Fix.
tsalo Apr 26, 2021
c29aa2f
Address duplicate datatypes.
tsalo Apr 26, 2021
58926cf
Wrap example strings in code.
tsalo Apr 26, 2021
675f9f5
Use enum for n/a instead of pattern.
tsalo Apr 26, 2021
4dcab2b
Replace "string" with "n/a" when appropriate.
tsalo Apr 26, 2021
ae7715c
Address some inconsistencies.
tsalo Apr 26, 2021
db5ab58
Take a crack as SpatialReference.
tsalo Apr 26, 2021
47d6d0f
Apply suggestions from code review
tsalo Apr 27, 2021
947ad56
Update tools/schemacode/schema.py
effigies Apr 27, 2021
efffea9
search_structure --> dereference_yaml
tsalo Apr 27, 2021
3deb0a6
Use faster loading approach.
tsalo Apr 27, 2021
4161f1c
Fix deprecation link.
tsalo Apr 27, 2021
446cfe6
Apply suggestions from code review
tsalo Apr 28, 2021
abacfef
Update 01-magnetic-resonance-imaging-data.md
tsalo Apr 28, 2021
f00fdd0
Merge branch 'master' into metadata-schema
tsalo Apr 28, 2021
9ffbe7a
Add B0FieldIdentifier and B0FieldSource.
tsalo Apr 28, 2021
7167252
Revert type changes and add TODOs to check them.
tsalo Apr 28, 2021
96d6b13
Update tools/schemacode/schema.py
effigies Apr 28, 2021
e308008
Replace remaining relative links.
tsalo Apr 28, 2021
830029d
Merge branch 'metadata-schema' of https://github.com/bids-standard/bi…
tsalo Apr 28, 2021
e5bd6e7
Apply suggestions from code review
tsalo Apr 28, 2021
05f5c60
Add new coordinate systems from #775.
tsalo Apr 30, 2021
352930a
Grab hack from #781 (which wasn't merged).
tsalo Apr 30, 2021
d36b00e
Merge branch 'master' into metadata-schema
tsalo May 10, 2021
b7c94f8
Create HED.yaml
tsalo May 10, 2021
efd79f3
boldify table headers
Remi-Gau May 23, 2021
86bc69e
add device info metadata
Remi-Gau May 30, 2021
0737cab
fix table fences
Remi-Gau May 30, 2021
54a3174
fix cell padding
Remi-Gau May 30, 2021
4031283
fix cell padding
Remi-Gau May 30, 2021
8967140
Merge pull request #811 from Remi-Gau/remi-physio-metadata
sappelhoff May 31, 2021
d7a5615
Merge pull request #808 from Remi-Gau/fix_table_header
sappelhoff Jun 1, 2021
95e5599
Merge branch 'master' into metadata-schema
tsalo Jun 7, 2021
e5a5655
Fix up DICOM tags in metadata.
tsalo Jun 7, 2021
3e2a56d
Leverage "name" field for section-specific metadata definitions.
tsalo Jun 7, 2021
b8d0a75
Merge branch 'master' into metadata-schema
tsalo Jun 9, 2021
6ebde13
composite instances --> measurements
tsalo Jun 9, 2021
1405b23
Fix name of HED field.
tsalo Jun 16, 2021
f3fd1b5
Fix string formatting in coordinate system fields.
tsalo Jun 16, 2021
670ca5b
Move "preferably same as" to section-specific text.
tsalo Jun 16, 2021
39f5336
Standardize DICOM Tag format.
tsalo Jun 16, 2021
78499f1
Move mentions of DICOM Tags out of definitions.
tsalo Jun 16, 2021
0954aea
Apply suggestions from code review
tsalo Jun 17, 2021
6273e3d
Generalize SoftwareFilters example.
tsalo Jun 17, 2021
c0df0ad
Distinguish AnatomicalLandmarkCoordinates definitions.
tsalo Jun 17, 2021
30992ee
Rename fmapEchoTime to match new format.
tsalo Jun 17, 2021
6a7e001
Apply suggestions from code review
tsalo Jun 24, 2021
680257d
Apply suggestions from code review
tsalo Jun 29, 2021
c13df8d
Address review.
tsalo Jun 29, 2021
34d9435
Fix example manufacturer names.
tsalo Jun 29, 2021
9ffaa12
Merge branch 'master' into metadata-schema
tsalo Jun 29, 2021
313de15
TEMPORARY: fix osipi URL (revert when osipi.org is back)
sappelhoff Jun 30, 2021
316453f
Fix regex for identifying macros.
tsalo Jun 30, 2021
890b364
Partially address review.
tsalo Jun 30, 2021
e5c130e
Do not assume minItems is 1 for array terms.
tsalo Jun 30, 2021
90c00d2
composite instances --> measurements (again)
tsalo Jul 1, 2021
af31fec
Update src/schema/metadata/MagneticFieldStrength.yaml
tsalo Jul 1, 2021
d9b3576
Update description to PharmaceuticalDoseTime
mnoergaard Jul 5, 2021
4a9bf0d
Update 09-positron-emission-tomography.md
mnoergaard Jul 5, 2021
def5ae3
fix table pipe alignment
sappelhoff Jul 5, 2021
9e6c75d
add pharmaceuticaldosetime fix to schema
sappelhoff Jul 5, 2021
26450b0
fix str examples
sappelhoff Jul 5, 2021
7bb90d8
Apply suggestions from code review
tsalo Jul 5, 2021
a803334
Update src/schema/metadata/RepetitionTimeExcitation.yaml
tsalo Jul 5, 2021
371a7e1
Merge branch 'master' into metadata-schema
tsalo Jul 13, 2021
34760d8
Add DoseCalibrationFactor.
tsalo Jul 13, 2021
85d60e2
Update ScanDate definition and deprecate it.
tsalo Jul 13, 2021
0c76b93
Remove hardcoded tables.
tsalo Jul 13, 2021
763c90a
Remove unused links.
tsalo Jul 13, 2021
43166e1
Update tools/schemacode/schema.py
tsalo Jul 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions pdf_build_src/process_markdowns.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ def process_macros(duplicated_src_dir_path):

# Replace code snippets in the text with their outputs
matches = re.findall("({{.*?}})", contents)
matches = re.findall(re.compile("({{.*?}})", re.DOTALL), contents)
for m in matches:
# Remove macro delimiters to get *just* the function call
function_string = m.strip("{} ")
Expand Down
27 changes: 13 additions & 14 deletions src/02-common-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,19 @@ Note that if a field name included in the data dictionary matches a column name
then that field MUST contain a description of the corresponding column,
using an object containing the following fields:

| **Key name** | **Requirement level** | **Data type** | **Description** |
| ------------ | --------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| LongName | OPTIONAL | [string][] | Long (unabbreviated) name of the column. |
| Description | RECOMMENDED | [string][] | Description of the column. |
| Levels | RECOMMENDED | [object][] of [strings][] | For categorical variables: An object of possible values (keys) and their descriptions (values). |
| Units | RECOMMENDED | [string][] | Measurement units. SI units in CMIXF formatting are RECOMMENDED (see [Units](./02-common-principles.md#units)). |
| TermURL | RECOMMENDED | [string][] | URL pointing to a formal definition of this type of data in an ontology available on the web. |
| HED | OPTIONAL | [object][] of [strings][] or [string][] | Hierarchical Event Descriptor (HED) information, see: [Appendix III](./99-appendices/03-hed.md) for details. |
{{ MACROS___make_metadata_table(
{
"LongName": "OPTIONAL",
"Description": (
"RECOMMENDED",
"The description of the column.",
),
"Levels": "RECOMMENDED",
"Units": "RECOMMENDED",
"TermURL": "RECOMMENDED",
"HED": "OPTIONAL",
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
}
) }}

Please note that while both `Units` and `Levels` are RECOMMENDED, typically only one
of these two fields would be specified for describing a single TSV file column.
Expand Down Expand Up @@ -767,10 +772,4 @@ to suppress warnings or provide interpretations of your file names.

[derived-dataset-description]: 03-modality-agnostic-files.md#derived-dataset-and-pipeline-description

[string]: https://www.w3schools.com/js/js_json_syntax.asp

[strings]: https://www.w3schools.com/js/js_json_syntax.asp

[object]: https://www.json.org/json-en.html

[deprecated]: ./02-common-principles.md#definitions
48 changes: 22 additions & 26 deletions src/03-modality-agnostic-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ Templates:
The file `dataset_description.json` is a JSON file describing the dataset.
Every dataset MUST include this file with the following fields:

| **Key name** | **Requirement level** | **Data type** | **Description** |
|--------------------|-----------------------|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Name | REQUIRED | [string][] | Name of the dataset. |
| BIDSVersion | REQUIRED | [string][] | The version of the BIDS standard that was used. |
| HEDVersion | RECOMMENDED | [string][] | If HED tags are used: The version of the HED schema used to validate HED tags for study. |
| DatasetType | RECOMMENDED | [string][] | The interpretation of the dataset. MUST be one of `"raw"` or `"derivative"`. For backwards compatibility, the default value is `"raw"`. |
| License | RECOMMENDED | [string][] | The license for the dataset. The use of license name abbreviations is RECOMMENDED for specifying a license (see [Appendix II](./99-appendices/02-licenses.md)). The corresponding full license text MAY be specified in an additional `LICENSE` file. |
| Authors | OPTIONAL | [array][] of [strings][] | List of individuals who contributed to the creation/curation of the dataset. |
| Acknowledgements | OPTIONAL | [string][] | Text acknowledging contributions of individuals or institutions beyond those listed in Authors or Funding. |
| HowToAcknowledge | OPTIONAL | [string][] | Text containing instructions on how researchers using this dataset should acknowledge the original authors. This field can also be used to define a publication that should be cited in publications that use the dataset. |
| Funding | OPTIONAL | [array][] of [strings][] | List of sources of funding (grant numbers). |
| EthicsApprovals | OPTIONAL | [array][] of [strings][] | List of ethics committee approvals of the research protocols and/or protocol identifiers. |
| ReferencesAndLinks | OPTIONAL | [array][] of [strings][] | List of references to publications that contain information on the dataset. A reference may be textual or a [URI][uri]. |
| DatasetDOI | OPTIONAL | [string][] | The Digital Object Identifier of the dataset (not the corresponding paper). DOIs SHOULD be expressed as a valid [URI][uri]; bare DOIs such as `10.0.2.3/dfjj.10` are [DEPRECATED][deprecated]. |
{{ MACROS___make_metadata_table(
{
"Name": "REQUIRED",
"BIDSVersion": "REQUIRED",
"HEDVersion": "RECOMMENDED",
"DatasetType": "RECOMMENDED",
"License": "RECOMMENDED",
"Authors": "OPTIONAL",
"Acknowledgements": "OPTIONAL",
"HowToAcknowledge": "OPTIONAL",
"Funding": "OPTIONAL",
"EthicsApprovals": "OPTIONAL",
"ReferencesAndLinks": "OPTIONAL",
"DatasetDOI": "OPTIONAL",
}
) }}

Example:

Expand Down Expand Up @@ -69,10 +71,12 @@ In addition to the keys for raw BIDS datasets,
derived BIDS datasets include the following REQUIRED and RECOMMENDED
`dataset_description.json` keys:

| **Key name** | **Requirement level** | **Data type** | **Description** |
|----------------|-----------------------|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| GeneratedBy | REQUIRED | [array][] of [objects][] | Used to specify provenance of the derived dataset. See table below for contents of each object. |
| SourceDatasets | RECOMMENDED | [array][] of [objects][] | Used to specify the locations and relevant attributes of all source datasets. Valid keys in each object include `URL`, `DOI` (see [URI][uri]), and `Version` with [string][] values. |
{{ MACROS___make_metadata_table(
{
"GeneratedBy": "REQUIRED",
"SourceDatasets": "RECOMMENDED",
}
) }}

Each object in the `GeneratedBy` list includes the following REQUIRED, RECOMMENDED
and OPTIONAL keys:
Expand Down Expand Up @@ -394,16 +398,8 @@ code organization of these scripts at the moment.

<!-- Link Definitions -->

[objects]: https://www.json.org/json-en.html

[object]: https://www.json.org/json-en.html

[string]: https://www.w3schools.com/js/js_json_syntax.asp

[strings]: https://www.w3schools.com/js/js_json_syntax.asp

[array]: https://www.w3schools.com/js/js_json_arrays.asp

[uri]: ./02-common-principles.md#uniform-resource-indicator

[deprecated]: ./02-common-principles.md#definitions
Loading