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] BEP 003: Common Derivatives #265

Merged
merged 236 commits into from Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from 231 commits
Commits
Show all changes
236 commits
Select commit Hold shift + click to select a range
58dcce7
Adding derivatives
chrisgorgo Dec 16, 2018
ed96fda
adding derivatives to the index
chrisgorgo Dec 16, 2018
9a15097
rename
chrisgorgo Dec 16, 2018
2e6d5e7
rename
chrisgorgo Dec 16, 2018
9557d9c
fix index
chrisgorgo Dec 16, 2018
32d0b33
fixed links
chrisgorgo Dec 16, 2018
99a1ccc
fixed links
chrisgorgo Dec 16, 2018
567f329
template cleanup
chrisgorgo Dec 31, 2018
5ef3b65
Update src/05-derivatives/05-diffusion-derivatives.md
francopestilli Jan 3, 2019
548b435
Update src/05-derivatives/05-diffusion-derivatives.md
francopestilli Jan 3, 2019
a2fd24b
Update src/05-derivatives/05-diffusion-derivatives.md
francopestilli Jan 3, 2019
5cbf9e3
Update src/05-derivatives/05-diffusion-derivatives.md
francopestilli Jan 3, 2019
0d1bf41
Update src/05-derivatives/05-diffusion-derivatives.md
francopestilli Jan 3, 2019
5ce9347
Update src/05-derivatives/05-diffusion-derivatives.md
francopestilli Jan 3, 2019
a5917b1
Update src/05-derivatives/05-diffusion-derivatives.md
francopestilli Jan 3, 2019
0f29a1f
Update src/05-derivatives/05-diffusion-derivatives.md
francopestilli Jan 3, 2019
cdb835f
Merge branch 'master' of github.com:bids-standard/bids-specification …
chrisgorgo Jan 3, 2019
b515b04
syntax fixes
chrisgorgo Jan 3, 2019
447c63b
remove old extensions
chrisgorgo Jan 3, 2019
6122053
Merge branch 'master' of github.com:bids-standard/bids-specification …
chrisgorgo Feb 28, 2019
43017d1
Update src/99-appendices/08-coordinate-systems.md
satra Feb 28, 2019
df3b737
Update src/99-appendices/08-coordinate-systems.md
satra Feb 28, 2019
af0ff9a
bring back space
chrisgorgo Feb 28, 2019
140868b
Update src/05-derivatives/01-introduction.md
effigies Mar 4, 2019
df9fee6
Update src/05-derivatives/01-introduction.md
effigies Mar 4, 2019
8dc0d1b
Update src/05-derivatives/02-common-data-types.md
yarikoptic Mar 4, 2019
8182a8b
Update src/99-appendices/08-coordinate-systems.md
effigies Mar 4, 2019
a519499
Update src/05-derivatives/02-common-data-types.md
effigies Mar 4, 2019
a97a5ad
Update src/05-derivatives/02-common-data-types.md
effigies Mar 4, 2019
2c41d50
Update src/05-derivatives/03-structural-derivatives.md
effigies Mar 4, 2019
cf3e990
Update src/05-derivatives/03-structural-derivatives.md
effigies Mar 4, 2019
7351e2a
Update src/05-derivatives/03-structural-derivatives.md
effigies Mar 4, 2019
b941c3c
fix formatting
chrisgorgo Mar 4, 2019
06a2560
Merge branch 'master' of github.com:bids-standard/bids-specification …
chrisgorgo Mar 4, 2019
eec7a3e
added a rule concerning pipline_name consistency
chrisgorgo Mar 4, 2019
efd1cf0
fix spaces
chrisgorgo Mar 4, 2019
e0f82da
get rid of derivatived
chrisgorgo Mar 4, 2019
be7f547
add mention of source data in stanalone derivatives datasets
chrisgorgo Mar 5, 2019
c6fc93f
fix label T1w example
chrisgorgo Mar 5, 2019
0c52a0d
fix missing bracket
chrisgorgo Mar 5, 2019
a75283d
add missing 'w' in T2w
chrisgorgo Mar 5, 2019
672585c
Limit number of allowed suffixes for scalar derivatives
chrisgorgo Mar 5, 2019
f549b42
Update src/99-appendices/08-coordinate-systems.md
effigies Mar 5, 2019
e2c3d39
adding CODEOWNERS
chrisgorgo Mar 5, 2019
0693c4b
Merge branch 'enh/derivatives' of github.com:chrisfilo/bids-specifica…
chrisgorgo Mar 5, 2019
6864ba9
adding missing end line
chrisgorgo Mar 5, 2019
374a85d
fix syntax
chrisgorgo Mar 5, 2019
0c1d4a8
removing group
chrisgorgo Mar 5, 2019
a6f55ee
[ENC] getting rid of type- key
edickie Mar 6, 2019
101bc95
Merge pull request #3 from edickie/patch-1
chrisgorgo Mar 6, 2019
12ff0a6
bringing back space
edickie Mar 6, 2019
1e2cc33
clarify allowed values for 'space'
chrisgorgo Mar 6, 2019
7be89b7
adding volumetric template used in in HCP
chrisgorgo Mar 6, 2019
06ee174
Merge pull request #4 from edickie/patch-2
chrisgorgo Mar 6, 2019
bec8c23
added HCP spaces and introduced hybrid spaces
chrisgorgo Mar 6, 2019
a30ed5a
shorten labels, add links
chrisgorgo Mar 6, 2019
ea2bc96
Various proposed changes to diffusion derivatives
Lestropie Mar 6, 2019
ecbbe14
Derivatives: Diffusion: Tractography: Split "Parameters" dictionary
Lestropie Mar 6, 2019
797c9b6
FIX: Link subsections in functional derivatives
effigies Mar 6, 2019
e777e1d
Merge pull request #7 from effigies/fix/subsection_links
chrisgorgo Mar 6, 2019
a5ef0c1
MNIfsLR32k + clarifications
chrisgorgo Mar 6, 2019
7e4fa68
small fixes
chrisgorgo Mar 6, 2019
a3f70f3
Merge branch 'enh/derivatives' of github.com:chrisfilo/bids-specifica…
chrisgorgo Mar 6, 2019
394efeb
remove transforms since they are not part of this PR
chrisgorgo Mar 6, 2019
7540011
remove transforms since they are not part of this PR
chrisgorgo Mar 6, 2019
da97988
Merge branch 'enh/derivatives' into enh/derivatives
Lestropie Mar 7, 2019
8f9c92e
ENH: Rename regressors.tsv to timeseries.tsv
effigies Mar 5, 2019
a9fd0fe
Typo
effigies Mar 5, 2019
2d386ff
ENH: Rework metadata description
effigies Mar 6, 2019
c3c9377
FIX: Subsection name, link
effigies Mar 6, 2019
d33fbe9
RF: Remove "regressor" term
effigies Mar 7, 2019
2ecdbde
adding myself to contributers
edickie Mar 7, 2019
79e3f8d
STY: Slightly less repetitive wording
effigies Mar 7, 2019
27bb9a3
Merge pull request #2 from effigies/enh/derivatives
chrisgorgo Mar 7, 2019
78a9350
Merge pull request #8 from edickie/patch-1
chrisgorgo Mar 7, 2019
132cb3e
HCPMNI
chrisgorgo Mar 7, 2019
100432a
Merge pull request #5 from chrisfilo/enh/cifti_spaces
chrisgorgo Mar 7, 2019
4aab67e
fix syntax
chrisgorgo Mar 7, 2019
dcc5642
fix syntax (for realz now)
chrisgorgo Mar 8, 2019
b2c7eeb
adding very inflated surfaces
edickie Mar 8, 2019
1a5f03c
Merge pull request #10 from edickie/patch-3
chrisgorgo Mar 8, 2019
bd00db2
Update src/05-derivatives/05-diffusion-derivatives.md
oesteban Mar 8, 2019
bb67fd7
[INFRA] Adding instructions for naming PRs
chrisgorgo Mar 15, 2019
4e08507
REF: initial rewriting of coordinate system keys
satra Mar 15, 2019
e7aae15
Update src/05-derivatives/01-introduction.md
chrisgorgo Mar 15, 2019
32183c2
Further widespread changes to diffusion derivatives
Lestropie Mar 16, 2019
18dc84f
Resolve build issues in diffusion derivatives
Lestropie Mar 16, 2019
fe07487
Further resolution of build issues in diffusion derivatives
Lestropie Mar 16, 2019
bc773d6
Merge pull request #11 from satra/enh/coordinates
chrisgorgo Mar 16, 2019
c42c4bb
fixes
chrisgorgo Mar 16, 2019
abf6e8f
[ENH] CoordinateSystem clarifications and examples
chrisgorgo Mar 16, 2019
617e00a
[ENH] CoordinateSystem clarifications and examples
chrisgorgo Mar 16, 2019
c7c135e
address Satra's comments
chrisgorgo Mar 17, 2019
1c7d9df
address Satra's comments
chrisgorgo Mar 17, 2019
aa16797
Merge branch 'master' of github.com:bids-standard/bids-specification …
chrisgorgo Mar 20, 2019
84ee5d4
Merge branch 'master' of github.com:bids-standard/bids-specification
chrisgorgo Mar 20, 2019
3bd3543
Merge branch 'master' into enh/derivatives
chrisgorgo Mar 20, 2019
dc4b48a
fix a link typo
chrisgorgo Mar 20, 2019
900a2b0
removal of the Definition section in Coordinate Spaces appendix
chrisgorgo Mar 20, 2019
b0d15dd
Update src/99-appendices/08-coordinate-systems.md
effigies Mar 20, 2019
08f6e8a
Update src/99-appendices/08-coordinate-systems.md
effigies Mar 20, 2019
497adf4
Merge branch 'enh/derivatives' into enh/space_examples
chrisgorgo Mar 20, 2019
4b18cb4
Merge branch 'enh/space_examples' of github.com:chrisfilo/bids-specif…
chrisgorgo Mar 20, 2019
999723a
fixes
chrisgorgo Mar 20, 2019
efd026d
adding desc to structural derivatives
chrisgorgo Mar 21, 2019
a78065a
Merge branch 'enh/derivatives' into enh/space_examples
chrisgorgo Mar 21, 2019
b97c7f0
anat->native + cleanup
chrisgorgo Mar 22, 2019
7f8fb99
cleaning leftover anat's
chrisgorgo Mar 22, 2019
26653c9
fix syntax
chrisgorgo Mar 22, 2019
3878971
clarify links between raw and derived datasets
chrisgorgo Mar 22, 2019
fd1fb89
fixes
chrisgorgo Mar 22, 2019
93b2e17
native -> individual
chrisgorgo Mar 24, 2019
bbb27a4
bringing back custom space
chrisgorgo Mar 24, 2019
ccc33be
add volspace for meshes
chrisgorgo Mar 24, 2019
319b580
fixes
chrisgorgo Mar 24, 2019
fcb7967
ReferenceMap -> SpatialReference
chrisgorgo Mar 30, 2019
6fac7ec
Merge pull request #12 from chrisfilo/enh/space_examples
chrisgorgo Mar 30, 2019
e43e566
Merge branch 'master' of github.com:bids-standard/bids-specification …
chrisgorgo Apr 14, 2019
dd7f997
Merge pull request #109 from chrisgorgo/enh/derivatives
chrisgorgo Apr 14, 2019
4ebc41a
Merge branch 'master' into derivatives
effigies Apr 16, 2019
74ff6d0
Diffusion derivatives: Further fixes for #205
Lestropie Apr 24, 2019
1d0613e
Diffusion derivatives: Formatting
Lestropie Apr 24, 2019
41ecca4
Diffusion derivatives: Further fix of superscript usage
Lestropie Apr 24, 2019
fd9a572
Diffusion derivatives: Fix error in DKI & WMTI model descriptions
Lestropie Apr 24, 2019
6f788a5
Diffusion derivatives: Use subscripts in model descriptions
Lestropie Apr 24, 2019
f28ba08
DOC: really minor typo
yarikoptic Apr 30, 2019
b48d068
Merge pull request #205 from Lestropie/enh/derivatives
francopestilli May 5, 2019
d44d712
ENH: use <label> for _desc- - not some <value> + clarify <value>
yarikoptic May 9, 2019
cf47f33
Merge pull request #224 from yarikoptic/enh-desc-label
effigies May 9, 2019
4a0506a
Merge remote-tracking branch 'upstream/master' into derivatives
effigies May 16, 2019
75f4367
Merge remote-tracking branch 'upstream/master' into derivatives
effigies May 17, 2019
5069065
FIX: Apply suggestions from @sappelhoff review
effigies May 28, 2019
9d281fe
FIX: Code block with indentations
effigies May 28, 2019
78f8143
ENH: Use pymdownx.superfences
effigies May 28, 2019
35899c8
FIX: Language for code block, missing comma
effigies May 28, 2019
0821f71
Drop modality-specific derivatives for now
effigies Jul 9, 2019
6ee22e2
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies Jul 9, 2019
bcf6406
ENH: Restore derivative sub-BEPs to BEP list for now
effigies Jul 9, 2019
e4a4d65
FIX: Remove modality-specific files from mkdocs.yml
effigies Jul 9, 2019
f880fff
Apply suggestions from code review
effigies Jul 15, 2019
ac1c4fe
Apply suggestions from code review
effigies Jul 16, 2019
e1de6de
FIX: Table alignment
effigies Jul 16, 2019
064cad4
FIX: Consistent list
effigies Jul 16, 2019
442b98d
FIX: Weird list style
effigies Jul 16, 2019
96294ae
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies Jul 16, 2019
cad13dd
FIX: Weird list style
effigies Jul 16, 2019
8584fc7
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies Aug 14, 2019
7bde6ce
FIX: Clarify naming derivatives after pipeline
effigies Aug 14, 2019
85c54ea
RF: Abstract PipelineDescription.Container from Docker and Singularit…
effigies Aug 14, 2019
64d306a
Pacify linkchecker
effigies Aug 14, 2019
9f95aa6
[STY] Add missing table fence
oesteban Aug 15, 2019
5b037cd
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies Aug 22, 2019
6921e62
[SPEC] Separate out imaging-specific "common derivatives"
effigies Aug 16, 2019
2bc990d
ENH: Clarify data type, EEG examples, space/desc wording
effigies Sep 4, 2019
c384f97
[STY] Remove blank lines
effigies Aug 16, 2019
10a9a71
Merge pull request #310 from effigies/common-imaging
effigies Sep 12, 2019
49314d0
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies Sep 12, 2019
5e90628
MAINT: Update TOC, CODEOWNERS
effigies Sep 12, 2019
9268670
ENH: Add language around non-compliant derivative datasets and files
effigies Sep 12, 2019
dbdcfbc
STY: Drop double newline
effigies Sep 17, 2019
6ca0598
STY: Fix link style
effigies Sep 17, 2019
70dc262
Update src/05-derivatives/01-introduction.md
effigies Sep 18, 2019
2c5db7c
Update src/02-common-principles.md
effigies Oct 8, 2019
54f6281
Merge pull request #334 from effigies/fix/relaxation
effigies Oct 8, 2019
dbc38b0
Merge branch 'master' into common-derivatives
effigies Oct 8, 2019
4fa236f
specify further the pipeline following #345
Oct 23, 2019
e793715
Update src/05-derivatives/01-introduction.md
Oct 30, 2019
fe17c4c
Update src/05-derivatives/01-introduction.md
Oct 30, 2019
7b418ea
Update src/05-derivatives/01-introduction.md
Oct 30, 2019
28b2b59
Update src/05-derivatives/01-introduction.md
Oct 30, 2019
33de3f1
Merge pull request #358 from bids-standard/CPernet-patch-1
effigies Oct 30, 2019
45d93f9
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies Nov 4, 2019
c200cff
FIX: Links to coordinate system appendix
effigies Nov 4, 2019
dd626c1
[FIX] Revise template-generated coordinate systems (#307)
oesteban Dec 5, 2019
a4c190c
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies Dec 16, 2019
8cd172a
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies Jan 29, 2020
2753da1
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies Feb 24, 2020
4550458
STY: Grey -> Gray
effigies Feb 24, 2020
facda86
Update derivatives introduction with Oscar's suggestions
effigies Apr 2, 2020
002f763
Accept Oscar's suggestions for common data types
effigies Apr 2, 2020
97cd4d0
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies Apr 17, 2020
f18b77f
BF: minor - mising _ before space following <source_keywords>
yarikoptic May 11, 2020
cda4fb2
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies May 20, 2020
1fe71b8
FIX: Minor bugs
effigies May 21, 2020
a7beb3d
[ENH] Add ``res`` and ``den`` keywords to indicate resolution of resa…
oesteban May 22, 2020
e5b41c0
MNT: Postpone thickness GIFTI example to structural derivatives
effigies May 24, 2020
ead9a84
ENH: Apply Robert's suggestions
effigies May 24, 2020
9aaf323
Update BIDSVersion in derivatives example JSON
effigies May 24, 2020
83b2fae
ENH: Update wording for clarity
effigies May 24, 2020
89566f1
dparc -> dseg
effigies May 24, 2020
bb90961
STY: Drop quotes in dseg.tsv and reformat with spaces
effigies May 24, 2020
94f1814
Update link, conform RFC2119 terms
effigies May 24, 2020
2841b34
Use relative paths
effigies May 24, 2020
2d9923c
Add resolution/density to masks and segmentations
effigies May 24, 2020
5f620fd
STY: Typo
effigies May 24, 2020
0d4c1a0
MNT: Drop admonition for now
effigies May 25, 2020
debe853
Preface for individual/study templates
effigies May 25, 2020
d95e799
Revert to pre-derivatives description of XXXCoordinateSystem
effigies May 26, 2020
e0102fc
FIX: Rename derivative directories to use <pipeline>-<variant>
effigies May 26, 2020
56c1d98
Apply suggestions from code review
effigies May 27, 2020
b21a9b8
FIX: Clarify recommendation of desc to when no other entity suits
effigies May 27, 2020
82be287
Update examples with T1w, events, EDF (EEG)
effigies May 27, 2020
0e2fcd2
ENH: Drop "dictionary" for JSON "object"
effigies May 27, 2020
9efc022
Rename PipelineDescription to GeneratedBy, rework table and examples,…
effigies May 29, 2020
fa5808e
FIX: More dictionary -> object
effigies May 29, 2020
8a6821c
Do not abbreviate abbreviation
effigies May 29, 2020
6a91d34
Rename: keyword -> entity
effigies May 29, 2020
80cc32f
Rewrite Sources description to clarify the A/B/C and X/Y/Z examples
effigies May 29, 2020
ddcec7a
More cleanup
effigies May 30, 2020
1c0ed0a
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies May 30, 2020
7ef9a9d
Update src/05-derivatives/03-imaging.md
effigies May 30, 2020
55d54ea
Reorganize derivatives
effigies May 30, 2020
bbd0df1
STY: Clean up links, formatting, outdated text
effigies May 30, 2020
6817af9
Fix link
effigies May 30, 2020
1f1b46d
Update TOC
effigies May 30, 2020
fa78c94
Make dataset description example consistent with folder name example
effigies Jun 1, 2020
ded6875
Remove RawSources overlap with SpatialReference, some additional clar…
effigies Jun 1, 2020
5af5c1e
ENH: Change single ROI binary image suffix from dseg to mask
effigies May 30, 2020
9f1d3a0
Improve wording
effigies May 30, 2020
4225839
Clarify discrete surface segmentations
effigies May 30, 2020
82fab3d
Swap mapping/color and add an example dseg with new labels
effigies May 30, 2020
18d462d
Replace "tissue class" with more general "anatomical structure"
effigies May 31, 2020
e0508a7
Add labels for masks
effigies May 31, 2020
b1d64ff
Update src/05-derivatives/03-imaging.md
effigies Jun 1, 2020
20b2269
Fix section links, capitalization
effigies Jun 1, 2020
5dd98d2
Drop "Gray and White Matter" label
effigies Jun 1, 2020
f43c0d4
Drop extraneous line, make punctuation consistent
effigies Jun 1, 2020
37c2bf2
Missing paren
effigies Jun 2, 2020
02408bf
Apply suggestions from code review
effigies Jun 3, 2020
f9734a5
Apply suggestions from code review
effigies Jun 3, 2020
95c4af7
Update src/05-derivatives/03-imaging.md
effigies Jun 3, 2020
131160c
Update src/05-derivatives/03-imaging.md
effigies Jun 4, 2020
0aaa881
Update src/05-derivatives/03-imaging.md
effigies Jun 4, 2020
3096fbe
Update src/05-derivatives/03-imaging.md
satra Jun 4, 2020
7bfc0e4
ENH: Add RECOMMENDED DatasetType key to dataset description (#494)
effigies Jun 4, 2020
affa960
Merge remote-tracking branch 'upstream/master' into common-derivatives
effigies Jun 4, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -13,4 +13,8 @@
/src/04-modality-specific-files/01-magnetic-resonance-imaging-data.md @chrisgorgo
/src/04-modality-specific-files/03-electroencephalography.md @sappelhoff @ezemikulan
/src/04-modality-specific-files/04-intracranial-electroencephalography.md @ezemikulan
/src/05-derivatives/03-imaging.md @effigies
/src/05-derivatives/04-structural-derivatives.md @edickie @ahoopes
/src/05-derivatives/05-functional-derivatives.md @effigies
/src/05-derivatives/06-diffusion-derivatives.md @francopestilli @oesteban @Lestropie
/src/99-appendices/06-meg-file-formats.md @monkeyman192
1 change: 1 addition & 0 deletions Pipfile
Expand Up @@ -6,6 +6,7 @@ name = "pypi"
[packages]
mkdocs = "==1.0.4"
mkdocs-material = "==4.1.2"
pymdown-extensions = "==6.0.0"
mkdocs-branchcustomization-plugin = "~=0.1.3"

[dev-packages]
Expand Down
16 changes: 5 additions & 11 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions mkdocs.yml
Expand Up @@ -9,6 +9,7 @@ extra_javascript:
markdown_extensions:
- toc:
anchorlink: true
- pymdownx.superfences
plugins:
- search
- branchcustomization:
Expand All @@ -32,8 +33,12 @@ nav:
- Physiological and other continuous recordings: 04-modality-specific-files/06-physiological-and-other-continuous-recordings.md
- Behavioral experiments (with no MRI): 04-modality-specific-files/07-behavioral-experiments.md
- Genetic Descriptor: 04-modality-specific-files/08-genetic-descriptor.md
- Longitudinal and multi-site studies: 05-longitudinal-and-multi-site-studies.md
- BIDS Extension Proposals: 06-extensions.md
- Derivatives:
- BIDS Derivatives: 05-derivatives/01-introduction.md
- Common data types and metadata: 05-derivatives/02-common-data-types.md
- Imaging data types: 05-derivatives/03-imaging.md
- Longitudinal and multi-site studies: 06-longitudinal-and-multi-site-studies.md
- BIDS Extension Proposals: 07-extensions.md
- Appendix:
- Contributors: 99-appendices/01-contributors.md
- Licenses: 99-appendices/02-licenses.md
Expand Down
2 changes: 1 addition & 1 deletion src/01-introduction.md
Expand Up @@ -46,7 +46,7 @@ different backgrounds.
The BIDS specification can be extended in a backwards compatible way and will
evolve over time. This is accomplished through community-driven BIDS Extension
Proposals (BEPs). For more information about the BEP process, see
[Extending the BIDS specification](06-extensions.md).
[Extending the BIDS specification](07-extensions.md).

## Citing BIDS

Expand Down
173 changes: 140 additions & 33 deletions src/02-common-principles.md
Expand Up @@ -120,39 +120,34 @@ in the appendix.

## Source vs. raw vs. derived data

BIDS in its current form is designed to harmonize and describe raw (unprocessed
or minimally processed due to file format conversion) data. During analysis such
data will be transformed and partial as well as final results will be saved.
BIDS was originally designed to describe and apply consistent naming conventions
to raw (unprocessed or minimally processed due to file format conversion) data.
During analysis such data will be transformed and partial as well as final results
will be saved.
Derivatives of the raw data (other than products of DICOM to NIfTI conversion)
MUST be kept separate from the raw data. This way one can protect the raw data
from accidental changes by file permissions. In addition it is easy to
distinguish partial results from the raw data and share the latter. Similar
rules apply to source data which is defined as data before harmonization and/or
file format conversion (for example E-Prime event logs or DICOM files).

This specification currently does not go into details of recommending a
particular naming scheme for including different types of source data (raw event
logs, parameter files, etc. before conversion to BIDS) and data derivatives
(correlation maps, brain masks, contrasts maps, etc.). However, in the case that
these data are to be included:

1. These data MUST be kept in separate `sourcedata` and `derivatives` folders
each with a similar folder structure as presented below for the BIDS-managed
data. For example:
`derivatives/fmriprep/sub-01/ses-pre/sub-01_ses-pre_mask.nii.gz` or
distinguish partial results from the raw data and share the latter.
See [Storage of derived datasets](#storage-of-derived-datasets) for more on
organizing derivatives.

Similar rules apply to source data, which is defined as data before
harmonization, reconstruction, and/or file format conversion (for example, E-Prime event logs or
DICOM files). This specification currently does not go into details of
recommending a particular naming scheme for including different types of
source data (raw event logs, parameter files, etc. before conversion to BIDS).
However, in the case that these data are to be included:

1. These data MUST be kept in separate `sourcedata` folder with a similar
folder structure as presented below for the BIDS-managed data. For example:
`sourcedata/sub-01/ses-pre/func/sub-01_ses-pre_task-rest_bold.dicom.tgz` or
`sourcedata/sub-01/ses-pre/func/MyEvent.sce`.

1. A README file SHOULD be found at the root of the `sourcedata` or the
`derivatives` folder (or both). This file should describe the nature of the
raw data or the derived data. In the case of the existence of a
`derivatives` folder, we RECOMMEND including details about the software
stack and settings used to generate the results. Inclusion of non-imaging
objects that improve reproducibility are encouraged (scripts, settings
files, etc.).

1. We RECOMMEND including the PDF print-out with the actual sequence parameters
generated by the scanner in the `sourcedata` folder.
1. A README file SHOULD be found at the root of the `sourcedata` folder or the
effigies marked this conversation as resolved.
Show resolved Hide resolved
`derivatives` folder, or both.
effigies marked this conversation as resolved.
Show resolved Hide resolved
This file should describe the nature of the raw data or the derived data.
We RECOMMEND including the PDF print-out with the actual sequence
parameters generated by the scanner in the `sourcedata` folder.
effigies marked this conversation as resolved.
Show resolved Hide resolved

Alternatively one can organize their data in the following way

Expand All @@ -167,15 +162,120 @@ my_dataset/
sub-02/
...
derivatives/
pipeline_1/
pipeline_2/
...
```

In this example **only the `rawdata` subfolder needs to be a BIDS compliant
dataset**. This specification does not prescribe anything about the contents of
`sourcedata` and `derivatives` folders in the above example - nor does it
prescribe the `sourcedata`, `derivatives`, or `rawdata` folder names. The above
example is just a convention that can be useful for organizing raw, source, and
derived data while maintaining BIDS compliancy of the raw data folder.
In this example, where `sourcedata` and `derivatives` are not nested inside
effigies marked this conversation as resolved.
Show resolved Hide resolved
`rawdata`, **only the `rawdata` subfolder** needs to be a BIDS-compliant
effigies marked this conversation as resolved.
Show resolved Hide resolved
dataset.
The subfolders of `derivatives` MAY be BIDS-compliant derivatives datasets
effigies marked this conversation as resolved.
Show resolved Hide resolved
(see [Non-compliant derivatives][#non-compliant-derivatives] for further discussion).
This specification does not prescribe anything about the contents of `sourcedata`
folders in the above example - nor does it prescribe the `sourcedata`,
`derivatives`, or `rawdata` folder names.
The above example is just a convention that can be useful for organizing raw,
source, and derived data while maintaining BIDS compliancy of the raw data
folder. When using this convention it is RECOMMENDED to set the `SourceDatasets`
field in `dataset_description.json` of each subfolder of `derivatives` to:

```JSON
{
"SourceDatasets": [ {"URL": "file://../../rawdata/"} ]
}
```

### Storage of derived datasets

Derivatives can be stored/distributed in two ways:

1. Under a `derivatives/` subfolder in the root of the source BIDS dataset
folder to make a clear distinction between raw data and results of data
processing. A data processing pipeline will typically have a dedicated directory
under which it stores all of its outputs. Different components of a pipeline can,
however, also be stored under different subfolders. There are few restrictions on
the directory names; it is RECOMMENDED to use the format `<pipeline>-<variant>` in
cases where it is anticipated that the same pipeline will output more than one variant (e.g.,
`AFNI-blurring`, `AFNI-noblurring`, etc.). For the sake of consistency, the
subfolder name SHOULD be the `GeneratedBy.Name` field in
`data_description.json`, optionally followed by a hyphen and a suffix (see
[Derived dataset and pipeline description][derived-dataset-description]).

Example of derivatives with one directory per pipeline:

```Plain
<dataset>/derivatives/fmriprep-v1.4.1/sub-0001
<dataset>/derivatives/spm/sub-0001
<dataset>/derivatives/vbm/sub-0001
```

Example of a pipeline with split derivative directories:

```Plain
<dataset>/derivatives/spm-preproc/sub-0001
<dataset>/derivatives/spm-stats/sub-0001
```

Example of a pipeline with nested derivative directories:

```Plain
<dataset>/derivatives/spm-preproc/sub-0001
<dataset>/derivatives/spm-preproc/derivatives/spm-stats/sub-0001
```


1. As a standalone dataset independent of the source (raw or derived) BIDS
dataset.
This way of specifying derivatives is particularly useful when the source
dataset is provided with read-only access, for publishing derivatives as
independent bodies of work, or for describing derivatives that were created
from more than one source dataset.
The `sourcedata/` subdirectory MAY be used to include the source dataset(s)
that were used to generate the derivatives.
Likewise, any code used to generate the derivatives from the source data
MAY be included in the `code/` subdirectory.

Example of a derivative dataset including the raw dataset as source:

```Plain
my_processed_data/
code/
processing_pipeline-1.0.0.img
hpc_submitter.sh
...
sourcedata/
dataset_description.json
participants.tsv
sub-01/
sub-02/
...
dataset_description.json
sub-01/
sub-02/
...
```
Comment on lines +239 to +257
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copying @Lestropie's comment from #488 (review):

Given the differential definitions of "source" vs. "raw" datasets in "common principles", it might be better to avoid use of the word "source" in the context of "data from which the derivatives were generated". That or "source" in reference to pre-BIDS-raw data would need to be changed.

I would be okay with an alternate name, but the sourcedata/ keyword is already there, means the data that were transformed to produce the current dataset, and constitutes a boundary between datasets.

There's also some potential ambiguity here in terms of hierarchical directory structure. It's permissible for derivative data to be stored in a sub-directory of the raw dataset, but it's also possible for the raw data to be stored in a sub-directory of the derivative dataset, and none of the directory names are prescribed; so it's a bit of a free-for-all, with the only restriction being storage of raw and derived data at the same hierarchical level.

Yes. I expect you'll end up with chains of derivatives or chains of sources, but not generally both within the same dataset. Extrapolating purely from my own preferences, I would suggest that the derivatives-as-subdirectory is a pre-derivatives hack that will largely go away in the future. Keeping a versioned record of the precise inputs of a derivative is a much more useful way to link datasets. (See: https://doi.org/10.7490/f1000research.1116363.1)

This would mean that for automatic parsing, unambiguously determining what's raw and what's derived would require running the entire validator on each candidate directory.

I had been thinking that we might need something in the dataset_description.json to unambiguously declare a dataset either derivative or raw. At the moment, GeneratedBy is a distinguishing feature, but if #369 is accepted, that won't work. I will make a comment to the main thread.

Also, if the raw dataset is provided read-only, writing a read-write version of it along with the derivative data could be seen to be counteracting the intent of that read-only provision.

I think in practice, these are unenforceable, but if they were, the subdirectory can be chmodded -w.

If the raw data are to be in some way distributed alongside the derivative data, doing so according to the suggestion provided in "common principles":

my_dataset/
  sourcedata/
    ...
  rawdata/
    dataset_description.json
    participants.tsv
    sub-01/
    sub-02/
    ...
  derivatives/
    ...

may be more faithful to such.

Actually looking at it again, this is in (edit: the old version of) "Common principles":

These data MUST be kept in separate sourcedata and derivatives folders

Permitting BIDS-raw data to be stored as a sub-directory within a BIDS-derivatives directory could arguably be seen as contradictory to this requirement, since the derivatives directory is no longer "separate" to the (duplicate of the) raw data but a superset thereof.

So personally I'd probably err on not permitting raw data as sub-directories of derived data.

derivatives/ and sourcedata/ have to constitute boundaries between datasets, or you really can't coherently parse a dataset. What happens on the other side of those boundaries is out of our control. I have seen in practice people nesting input datasets inside output datasets, so this is just trying to give guidance on a consistent, BIDS-y way to do that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

No particular contentions with any of the above from me.

Only other possibility to float in this context would be whether we expect a priori / have learned from experience that a particular inter-dataset filesystem arrangement is likely to lead to fewer problems / less ambiguity, and would consequently warrant being the recommended approach, but without restriction on the alternatives. If anything this might actually make things easier for beginners, as they would no longer be obliged to naively make such a decision up-front.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure there currently exists a consensus on the best way to do it. I obviously have my opinion, but I'm not sure that we should really recommend one, as I think it's going to depend on the use case. For example, some approaches may be more conducive to doing processing while others are better for packaging up and distributing.

Hopefully this makes clear that datasets should be independently distributable. If that's the case, then their relative locations should be irrelevant, and moving to an alternative (or no) nesting should be more-or-less trivial.

Happy to consider any wording you might suggest that will get these ideas across. I think I'm running out of generative capacity at the moment.


Throughout this specification, if a section applies particularly to derivatives,
then Case 1 will be assumed for clarity in templates and examples, but removing
`/derivatives/<pipeline>` from the template name will provide the equivalent for
Case 2.
In both cases, every derivatives dataset is considered a BIDS dataset and must
include a `dataset_description.json` file at the root level (see
[Dataset description][dataset-description].
Consequently, files should be organized to comply with BIDS to the full extent
possible (that is, unless explicitly contradicted for derivatives).
Any subject-specific derivatives should be housed within each subject’s directory;
if session-specific derivatives are generated, they should be deposited under a
session subdirectory within the corresponding subject directory; and so on.

### Non-compliant deriatives

Nothing in this specification should be interpreted to disallow the
storage/distribution of non-compliant derivatives of BIDS datasets.
In particular, if a BIDS dataset contains a `derivatives/` sub-directory,
the contents of that directory may be a heterogeneous mix of BIDS Derivatives
datasets and non-compliant derivatives.

## The Inheritance Principle

Expand Down Expand Up @@ -509,3 +609,10 @@ meaning of file names and setting requirements on their contents or metadata.
Validation and parsing tools MAY treat the presence of non-standard files and
directories as an error, so consult the details of these tools for mechanisms
to suppress warnings or provide interpretations of your file names.

[]: <> (################)
[]: <> (Link definitions)
[]: <> (################)

[dataset-description]: 03-modality-agnostic-files.md#dataset-description
[derived-dataset-description]: 03-modality-agnostic-files.md#derived-dataset-and-pipeline-description
61 changes: 61 additions & 0 deletions src/03-modality-agnostic-files.md
Expand Up @@ -54,6 +54,67 @@ Example:
}
```

#### Derived dataset and pipeline description

As for any BIDS dataset, a `dataset_description.json` file MUST be found at the
top level of the a derived dataset:
`<dataset>/derivatives/<pipeline_name>/dataset_description.json`

In addition to the keys for raw BIDS datasets,
derived BIDS datasets include the following REQUIRED and RECOMMENDED
`dataset_description.json` keys:

| **Key name** | **Description** |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GeneratedBy | REQUIRED. List of [objects][object] with at least one element. |
| SourceDatasets | RECOMMENDED. A list of [objects][object] specifying the locations and relevant attributes of all source datasets. Valid fields in each object include `URL`, `DOI`, and `Version`. |

Each object in the `GeneratedBy` list includes the following REQUIRED, RECOMMENDED
and OPTIONAL keys:

| **Key name** | **Description** |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Name | REQUIRED. Name of the pipeline or process that generated the outputs. Use `"Manual"` to indicate the derivatives were generated by hand, or adjusted manually after an initial run of an automated pipeline. |
| Version | RECOMMENDED. Version of the pipeline. |
| Description | OPTIONAL. Plain-text description of the pipeline or process that generated the outputs. RECOMMENDED if `Name` is `"Manual"`. |
| CodeURL | OPTIONAL. URL where the code used to generate the derivatives may be found. |
| Container | OPTIONAL. [Object][object] specifying the location and relevant attributes of software container image used to produce the derivative. Valid fields in this object include `Type`, `Tag` and `URI`. |

Example:

```JSON
{
"Name": "FMRIPREP Outputs",
"BIDSVersion": "1.4.0",
"GeneratedBy": [
{
"Name": "fmriprep",
"Version": "1.4.1",
effigies marked this conversation as resolved.
Show resolved Hide resolved
"Container": {
"Type": "docker",
"Tag": "poldracklab/fmriprep:1.4.1"
}
},
{
"Name": "Manual",
"Description": "Re-added RepetitionTime metadata to bold.json files"
}
],
"SourceDatasets": [
{
"DOI": "10.18112/openneuro.ds000114.v1.0.1",
"URL": "https://openneuro.org/datasets/ds000114/versions/1.0.1",
"Version": "1.0.1"
}
]
}
```

If a derived dataset is stored as a subfolder of the raw dataset, then the `Name` field
of the first `GeneratedBy` object MUST be a substring of the derived dataset folder name.
That is, in a directory `<dataset>/derivatives/<pipeline>[-<variant>]/`, the first
`GeneratedBy` object should have a `Name` of `<pipeline>`.

### `README`

In addition a free form text file (`README`) describing the dataset in more
Expand Down
@@ -1,6 +1,6 @@
# Magnetoencephalography

Support for Magnetoencephalography (MEG) was developed as a [BIDS Extension Proposal](../06-extensions.md#bids-extension-proposals).
Support for Magnetoencephalography (MEG) was developed as a [BIDS Extension Proposal](../07-extensions.md#bids-extension-proposals).
Please cite the following paper when referring to this part of the standard in
context of the academic literature:

Expand Down
@@ -1,6 +1,6 @@
# Electroencephalography

Support for Electroencephalography (EEG) was developed as a [BIDS Extension Proposal](../06-extensions.md#bids-extension-proposals).
Support for Electroencephalography (EEG) was developed as a [BIDS Extension Proposal](../07-extensions.md#bids-extension-proposals).
Please cite the following paper when referring to this part of the standard in
context of the academic literature:

Expand Down
@@ -1,6 +1,6 @@
# Intracranial Electroencephalography

Support for Intracranial Electroencephalography (iEEG) was developed as a [BIDS Extension Proposal](../06-extensions.md#bids-extension-proposals).
Support for Intracranial Electroencephalography (iEEG) was developed as a [BIDS Extension Proposal](../07-extensions.md#bids-extension-proposals).
Please cite the following paper when referring to this part of the standard in
context of the academic literature:

Expand Down
2 changes: 1 addition & 1 deletion src/04-modality-specific-files/08-genetic-descriptor.md
@@ -1,7 +1,7 @@
# Genetic Descriptor

Support for genetic descriptors was developed as a [BIDS Extension
Proposal](../06-extensions.md#bids-extension-proposals).
Proposal](../07-extensions.md#bids-extension-proposals).
The extension was primarily developed by Cyril Pernet and Clara Moreau with
contributions from Tom Nichols and Jessica Turner.

Expand Down