Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
BIDS-cfood
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
crawler-extensions
BIDS-cfood
Commits
a632e692
Commit
a632e692
authored
2 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
enhanced doc
parent
b49fa2ff
No related branches found
No related tags found
1 merge request
!2
ENH: Folder
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+27
-0
27 additions, 0 deletions
README.md
README_SETUP.md
+5
-2
5 additions, 2 deletions
README_SETUP.md
src/bids-cfood/cfood.yml
+1
-1
1 addition, 1 deletion
src/bids-cfood/cfood.yml
with
33 additions
and
3 deletions
README.md
+
27
−
0
View file @
a632e692
...
@@ -12,6 +12,33 @@ that can read folder structures that comply with the
...
@@ -12,6 +12,33 @@ that can read folder structures that comply with the
Please read the
[
README_SETUP.md
](
README_SETUP.md
)
for instructions on how to
Please read the
[
README_SETUP.md
](
README_SETUP.md
)
for instructions on how to
setup this code.
setup this code.
## Design
The BIDS Standard defines rules for how data is stored in files and how those
(and directories) must be named. Those rules can be checked with the
`bids-validator`
. The current implementation of this cfood and the corresponding
[
converter
](
https://gitlab.indiscale.com/caosdb/src/crawler-converters/bids-converter
)
does the following:
-
the
`dataset_description.json`
is parsed and translated to CaosDB Entities
-
the key value pairs of folder and file names (e.g. "sub-
<sub-label>
") are
parsed and the stored in appropriate Records
-
the contents of measurement folders such as 'eeg', 'func' or 'anat' are
assigned to DataAcquisition Records. Each Record shall reference the full
information for the acquisition. Thus files are typically grouped according
to their values of the 'acq', 'run', and possibly 'task' keys. If files
correspond to multiple acquisitions (the filename is missing some key value
pairs), then those files are referenced by all corresponding Records. This
grouping is done by the BIDS
<datatype>
DirConverter classes of the
bids-converter.
-
Based on the suffix of files parents for files are selected.
-
The data model references the corresponding BIDS documentation in the
description where appropriate.
-
The session folder may be omitted in BIDS. The crawler always creates at least
one session. See BIDSSubjectDirConverter classes of the bids-converter.
## Notes
-
Currently the folders
`sourcedata`
and
`derivates`
are being ignored.
-
Currently parametric maps are ignored (ANAT)
## Further Reading
## Further Reading
...
...
This diff is collapsed.
Click to expand it.
README_SETUP.md
+
5
−
2
View file @
a632e692
...
@@ -14,13 +14,17 @@ After you started a server that mounts the test data (possibly use `test-profile
...
@@ -14,13 +14,17 @@ After you started a server that mounts the test data (possibly use `test-profile
you can run
`pytest `
integrationtests
`.
you can run
`pytest `
integrationtests
`.
### Manual Tests
### Manual Tests
You can crawl examples from the `
bids-examples
` submodule:
You can crawl examples from the `
bids-examples
` submodule
. The follwing shows it for the `
eeg_matchingpennies
` data set
:
```sh
```sh
# all commands are assumed to be run from the bids-cfood folder
# add the model
# add the model
python -m caosadvancedtools.models.parser src/bids-cfood/model.yml --sync
python -m caosadvancedtools.models.parser src/bids-cfood/model.yml --sync
# insert files
# insert files
python -m caosadvancedtools.loadFiles -p /examples /opt/caosdb/mnt/extroot/examples/eeg_matchingpennies
python -m caosadvancedtools.loadFiles -p /examples /opt/caosdb/mnt/extroot/examples/eeg_matchingpennies
# run crawler
caosdb-crawler --debug -s update -i src/bids-cfood/identifiables.yml --remove-prefix /bids-examples --add-prefix /examples src/bids-cfood/cfood.yml bids-examples/eeg_matchingpennies
```
```
## Usage
## Usage
You will need to copy (parts of) the cfood definition `
./src/bids-cfood/cfood.yml
`
You will need to copy (parts of) the cfood definition `
./src/bids-cfood/cfood.yml
`
into your cfood.
into your cfood.
...
@@ -28,4 +32,3 @@ into your cfood.
...
@@ -28,4 +32,3 @@ into your cfood.
sourcedata and derivates are being ignored.
This diff is collapsed.
Click to expand it.
src/bids-cfood/cfood.yml
+
1
−
1
View file @
a632e692
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment