Skip to content
Snippets Groups Projects
Commit a632e692 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

enhanced doc

parent b49fa2ff
No related branches found
No related tags found
1 merge request!2ENH: Folder
...@@ -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
......
...@@ -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.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment