Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ before_install:
- travis_retry sudo apt-get -y install nodejs
- travis_retry sudo apt-get -y install npm
# Install BIDS-Validator
- sudo npm install -g bids-validator
- sudo npm install -g bids-validator@1.5.4

install:
# make octave file the JSONio submodule
Expand All @@ -56,4 +56,7 @@ jobs:
before_script:
- npm install `cat npm-requirements.txt`
script:
- remark . --frail
- remark README.md --frail
- remark ./notebooks/ --frail
- remark ./tests/ --frail
- remark ./docs/ --frail
60 changes: 36 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!-- lint disable -->

**Try it**

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/cpp-lln-lab/CPP_BIDS/master?filepath=notebooks%2Fbasic_usage.ipynb)

**Cite it**

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4007674.svg)](https://doi.org/10.5281/zenodo.4007674)

**Unit tests and coverage**

[![](https://img.shields.io/badge/Octave-CI-blue?logo=Octave&logoColor=white)](https://github.com/cpp-lln-lab/CPP_BIDS/actions)
Expand All @@ -17,34 +23,34 @@

[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)

---
* * *

# CPP_BIDS

<!-- vscode-markdown-toc -->
<!-- TOC -->

- 1. [Output format](#Outputformat)
- 1.1. [Modality agnostic aspect](#Modalityagnosticaspect)
- 2. [Documentation](#Documentation)
- 3. [Contributing](#Contributing)
- 3.1. [Guidestyle](#Guidestyle)
- 3.2. [BIDS naming convention](#BIDSnamingconvention)
- 3.3. [Contributors ✨](#Contributors)
- [CPP_BIDS](#cpp_bids)
- [Output format](#output-format)
- [Modality agnostic aspect](#modality-agnostic-aspect)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Guidestyle](#guidestyle)
- [BIDS naming convention](#bids-naming-convention)
- [Change log](#change-log)
- [Contributors ✨](#contributors-)

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->
<!-- /TOC -->

<!-- lint enable -->

A set of function for matlab and octave to create
[BIDS-compatible](https://bids-specification.readthedocs.io/en/stable/) folder
structure and filenames for the output of behavioral, EEG, fMRI, eyetracking
studies.

## 1. <a name='Outputformat'></a>Output format
## Output format

### 1.1. <a name='Modalityagnosticaspect'></a>Modality agnostic aspect
### Modality agnostic aspect

Subjects, session and run number labels will be numbers with zero padding up to
3 values (e.g subject 1 will become `sub-001`).
Expand All @@ -63,31 +69,33 @@ data set BIDS compliant. See `convertSourceToRaw.m` for more details.

For example:

```
```bash
sub-090/ses-003/sub-090_ses-003_task-auditoryTask_run-023_events_date-202007291536.tsv
```

## 2. <a name='Documentation'></a>Documentation
## Documentation

- [Installation](./docs/installation.md)
- [How to use it: jupyter notebooks](./notebooks)
- [Functions description](./docs/functions_description.md)
- [Functions description](./docs/functions-description.md)

## 3. <a name='Contributing'></a>Contributing
## Contributing

Feel free to open issues to report a bug and ask for improvements.

### 3.1. <a name='Guidestyle'></a>Guidestyle
### Guidestyle

- We use camelCase.

- We keep the McCabe complexity as reported by the
[check_my_code function](https://github.com/Remi-Gau/check_my_code)
below 15.

- We use the
[MISS_HIT linter](https://florianschanda.github.io/miss_hit/style_checker.html)
to automatically fix some linting issues.

### 3.2. <a name='BIDSnamingconvention'></a>BIDS naming convention
### BIDS naming convention

Here are the naming templates used.

Expand Down Expand Up @@ -137,18 +145,21 @@ future BEP format in a dedicated eyetracker folder
`<matches>[_recording-<label>]_stim.tsv.gz`
`<matches>[_recording-<label>]_stim.json`

### change log
### Change log

<!-- 93b4c584bf22883a3c4f8b9031b70e381deef272 -->

### 3.3. <a name='Contributors'></a>Contributors ✨
### Contributors ✨

Thanks goes to these wonderful people
([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->

<!-- prettier-ignore-start -->

<!-- markdownlint-disable -->

<table>
<tr>
<td align="center"><a href="https://github.com/CerenB"><img src="https://avatars1.githubusercontent.com/u/10451654?v=4" width="100px;" alt=""/><br /><sub><b>CerenB</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/CPP_BIDS/commits?author=CerenB" title="Code">💻</a> <a href="#design-CerenB" title="Design">🎨</a> <a href="https://github.com/cpp-lln-lab/CPP_BIDS/commits?author=CerenB" title="Documentation">📖</a> <a href="#userTesting-CerenB" title="User Testing">📓</a> <a href="#ideas-CerenB" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/cpp-lln-lab/CPP_BIDS/issues?q=author%3ACerenB" title="Bug reports">🐛</a></td>
Expand All @@ -158,6 +169,7 @@ Thanks goes to these wonderful people
</table>

<!-- markdownlint-enable -->

<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->
Expand Down
41 changes: 21 additions & 20 deletions docs/functions_description.md → docs/functions-description.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# functions description

<!-- vscode-markdown-toc -->
<!-- lint disable -->

- 1. [userInputs](#userInputs)
- 2. [createFilename](#createFilename)
- 3. [saveEventsFile](#saveEventsFile)
- 4. [checkCFG](#checkCFG)
- 4.1. [CFG content](#CFGcontent)
- 5. [createBoldJson](#createBoldJson)
<!-- TOC -->

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->
- [functions description](#functions-description)
- [userInputs](#userinputs)
- [createFilename](#createfilename)
- [saveEventsFile](#saveeventsfile)
- [checkCFG](#checkcfg)
- [CFG content](#cfg-content)
- [createBoldJson](#createboldjson)

## 1. <a name='userInputs'></a>userInputs
<!-- /TOC -->

<!-- lint enable -->

## userInputs

Get subject, run and session number and make sure they are positive integer
values.
Expand All @@ -40,7 +41,7 @@ session
If you use it with `cfg.subject.askGrpSess = [1 1]`, it will ask you about both.
This is the default behavior.

## 2. <a name='createFilename'></a>createFilename
## createFilename

Create the BIDS compliant directories and filenames (but not the files) for the
behavioral output for this subject / session / run.
Expand All @@ -56,18 +57,18 @@ For the moment the date of acquisition is appended to the filename
- can work for fMRI experiment if `cfg.testingDevice` is set to `mri`,
- can work for simple eyetracking data if `cfg.eyeTracker.do` is set to 1.

## 3. <a name='saveEventsFile'></a>saveEventsFile
## saveEventsFile

Function to save output files for events that will be BIDS compliant.

If the user DOES NOT provide `onset`, `trial_type`, this events will be skipped.
`duration` will be set to `n/a` if no value is provided.

## 4. <a name='checkCFG'></a>checkCFG
## checkCFG

Check that we have all the fields that we need in the experiment parameters.

### 4.1. <a name='CFGcontent'></a>CFG content
### CFG content

```matlab
% The following can be modified by users but their effect might
Expand Down Expand Up @@ -133,9 +134,9 @@ cfg.fileName.datasetDescription

```

## 5. <a name='createBoldJson'></a>createBoldJson
## createBoldJson

```
```bash
createBoldJson(cfg)
```

Expand All @@ -148,7 +149,7 @@ complete than the info you could from DICOM conversion.
If you put the following line at the end of your experiment script, it will dump
the content of the `extraInfo` structure in the json file.

```
```bash
createBoldJson(cfg, extraInfo)
```

Expand Down
40 changes: 20 additions & 20 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# Installation

<!-- vscode-markdown-toc -->
<!-- lint disable -->

- 1. [Download with git](#Downloadwithgit)
- 2. [Add as a submodule](#Addasasubmodule)
- 2.1. [Example for submodule usage](#Exampleforsubmoduleusage)
- 3. [Direct download](#Directdownload)
<!-- TOC -->

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->
- [Installation](#installation)
- [Download with git](#download-with-git)
- [Add as a submodule](#add-as-a-submodule)
- [Example for submodule usage](#example-for-submodule-usage)
- [Direct download](#direct-download)

## 1. <a name='Downloadwithgit'></a>Download with git
<!-- /TOC -->

<!-- lint enable -->

## Download with git

```bash
cd fullpath_to_directory_where_to_install
Expand Down Expand Up @@ -43,7 +44,7 @@ number
git checkout -b version1 v0.0.1
```

## 2. <a name='Addasasubmodule'></a>Add as a submodule
## Add as a submodule

Add it as a submodule in the repo you are working on.

Expand All @@ -69,7 +70,7 @@ git submodule update --remote --merge

Remember that updates to submodules need to be committed as well.

### 2.1. <a name='Exampleforsubmoduleusage'></a>Example for submodule usage
### Example for submodule usage

So say you want to clone a repo that has some nested submodules, then you would
type this to get the content of all the submodules at once (here with assumption
Expand All @@ -91,14 +92,13 @@ git submodule foreach --recursive 'git submodule init'
git submodule foreach --recursive 'git submodule update'
```

## 3. <a name='Directdownload'></a>Direct download
## Direct download

Download the code. Unzip. And add to the matlab path.

Pick a specific version:

https://github.com/cpp-lln-lab/CPP_BIDS/releases

Or take the latest commit (NOT RECOMMENDED):
Pick a specific version from
[HERE](https://github.com/cpp-lln-lab/CPP_BIDS/releases)

https://github.com/cpp-lln-lab/CPP_BIDS/archive/master.zip
Or take the
[latest commit](https://github.com/cpp-lln-lab/CPP_BIDS/archive/master.zip) (NOT
RECOMMENDED).
1 change: 1 addition & 0 deletions node_modules/.bin/atob

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

1 change: 1 addition & 0 deletions node_modules/.bin/esparse

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

1 change: 1 addition & 0 deletions node_modules/.bin/esvalidate

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

1 change: 1 addition & 0 deletions node_modules/.bin/js-yaml

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

1 change: 1 addition & 0 deletions node_modules/.bin/json5

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

1 change: 1 addition & 0 deletions node_modules/.bin/rc

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

1 change: 1 addition & 0 deletions node_modules/.bin/remark

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

21 changes: 21 additions & 0 deletions node_modules/@types/unist/LICENSE

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

16 changes: 16 additions & 0 deletions node_modules/@types/unist/README.md

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

Loading