diff --git a/docs/collaboration/contributors.md b/docs/collaboration/contributors.md
index 81b2af7e..dd889650 100644
--- a/docs/collaboration/contributors.md
+++ b/docs/collaboration/contributors.md
@@ -27,274 +27,256 @@ Thanks goes to these wonderful people.
Adeen Flinker π |
Adina S. Wagner π¨ π» |
Agah Karakuzu π¬ π π£ π€ π» |
- Agnese Zazio π |
+ Aki Nikolaidis π |
- Aki Nikolaidis π |
Alberto Lazari π |
Alejandro de la Vega π π» β οΈ |
Alessio Giacomel π |
Alex Rockhill π π§ π» |
Alexander Jones π» π |
Alexander L. Cohen π π» π π¬ |
+ Alexander von Lautz π |
- Alexander von Lautz π |
Alexandre Gramfort π π‘ |
Alexandre Hutton π |
Alexandre Routier π |
Alexandru Foias π π£ |
Ali Khan π |
Alizee Wickenheiser π§ |
+ Ana Fouto π |
- Alyssa Dai π» |
- Amber Hopkins π |
- Ana Fouto π |
Anders Eklund π π’ π» |
Andrea Pigorini π |
Andrew Hoopes π |
Andrew Jahn π |
-
-
Andrew Janke π π» |
Anibal SΓ³lon π» π |
Anthony Galassi π π» |
+
+
Arianna Sala π |
Ariel Rokem π π» |
Arjen Stolk π |
- Arman Jahanpour π» |
-
-
Arnaud Delorme π π‘ π€ |
Arnaud Marcoux π |
Arshitha Basavaraj π π π» |
Ashley G. Gillman π |
+
+
Athanasia Monika Mowinckel π |
Aysegul Gunduz π |
Azeez Adebimpe π |
-
-
B. Nolan Nichols π |
Balint Kincses π |
Benjamin Beasley π |
Benjamin Dichter π π» β οΈ |
+
+
Benjamin Gagl π |
Bertrand Thirion π |
Bradley Voytek π |
-
-
- Brent McPherson π» |
Brett L. Foster π |
Brian A. Wandell π |
Brian N. Lundstrom π |
Camille Maumet π |
- Carlo Miniussi π |
- Cecile Madjar π£ π§ |
+ Carlo Miniussi π |
+ Cecile Madjar π£ π§ |
ChloΓ© Pasturel π |
Chris Benjamin π |
Chris GahnstrΓΆm π |
Chris Holdgraf π π€ π» |
Chris J. Gorgolewski π π» π¬ π€ π π’ π π‘ π |
- Chris Rorden π π» |
- Christian BΓΌchel π |
+ Chris Rorden π π» |
+ Christian BΓΌchel π |
Christian Horea π» π |
- Christine Rogers π£ π π€ π π§ |
+ Christine Rogers π£ π π€ π π§ |
Christophe Phillips π |
Christopher J. Honey π |
Christopher J. Markiewicz π¬ π π» π π¨ π‘ π€ π π π§ π’ π£ π π§ |
- Christopher Lee-Messer π |
- Clara Moreau π |
+ Christopher Lee-Messer π |
+ Clara Moreau π |
Clint Hansen π π€ |
Cyril Pernet π¬ π π π¨ π‘ π π€ π’ |
Cyrus Eierud π |
D. Sturgeon π» |
Dan Levitas π |
- Dan Lurie π€ π π§ π π» π¬ |
- Daniel A. Handwerker π |
+ Dan Lurie π€ π π§ π π» π¬ |
+ Daniel A. Handwerker π |
David Alsop π |
David Boas π |
David Groppe π |
David Keator π |
David McAlpine π |
- David Thomas π π£ |
- Dejan Draschkow π |
- Desmond Oathes π |
+ David Thomas π π£ |
+ Dejan Draschkow π |
Dianne Patterson π |
Dimitri Papadopoulos Orfanos π π‘ π€ π¬ π» |
Dmitry Petrov π π» |
Dora Hermes π π» β
π π€ |
Dorien Huijser π |
- Dorota Jarecka π» π |
Douglas N. Greve π |
Duncan Macleod π π |
Dung Truong π π» π§ π€ |
- Dustin Moraczewski π |
Dylan Nielson π π» π§ |
Eduard Ort π π» |
Eleonora Marcantoni π |
+ Elizabeth Bock π π‘ |
- Elizabeth Bock π π‘ |
Elizabeth DuPre π π‘ π π€ π¬ π» |
Elke Warmerdam π£ π |
Erdal Karaca π» |
Eric A. Earl π π¬ π π§ π§ π€ π» |
Eric Achten π π£ π |
Eric Bridgeford π π§ |
+ Erin W. Dickie π π€ π π’ π¬ π» |
- Erin W. Dickie π π€ π π’ π¬ π» |
Ethan Blackwood π π |
Eugene P. Duff π |
Ezequiel Mikulan π π» |
Felipe Orihuela-Espina π |
Fidel Alfaro Almagro π¬ π π‘ π |
Filip Szczepankiewicz π |
+ Filippo Maria Castelli π π£ |
- Filippo Maria Castelli π π£ |
Franco Pestilli π π» π¨ π‘ π€ π π§ π π π π’ |
Franklin W. Feingold π π β
π¬ π€ π¨ π’ π π π π π» |
FranΓ§ois Tadel π π π‘ |
Gaia Rizzo π |
Gang Chen π |
GaΓ«l Varoquaux π |
+ Ghislain Vaillant π» |
- Ghislain Vaillant π» |
Giacomo Bertazzoli π |
Giacomo Guidali π |
Giacomo Mazzamuto π π£ |
Gilles de Hollander π |
Gio Piantoni π |
- Giovanna Nordio π |
-
-
Gitte M. Knudsen π |
Giulio Castegnaro π |
+
+
Giuseppe Gallitto π |
Graham Searle π |
Granville J. Matheson π |
Gregory Kiar π π» π¨ π§ |
Gregory Noack π π» β οΈ |
-
-
Greydon Gilmore π π» |
Guillaume Flandin π π» |
+
+
Gunnar Schaefer π |
Gustav Nilsonne π |
Hamish Innes-Brown π |
Hanne D. Hansen π |
Hanzhang Lu π |
-
-
Hao-Ting Wang π π |
Helena Cockx π π€ π¬ |
+
+
Henk Mutsaerts π¬ π π» π π‘ π π€ π π’ π |
Hernando Ombao π |
Hugo Boniface π π» |
Ilkay Isik π |
Ilona Lipp π |
-
-
International Neuroinformatics Coordinating Facility π΅ π |
Iris Groen π |
+
+
Isla Staden π |
Jaap von der Aar π |
- Jacob Sanz-Robinson π» |
Jakub Kaczmarzyk π π§ π |
James Gholam π |
-
-
James Kent π¬ π» |
Jan Mathijs Schoffelen π |
Jan Petr π¬ π π» π π£ π‘ π π€ π β οΈ π’ |
+
+
Jan-Mathijs Schoffelen π |
Jean-Baptiste Poline π π’ π€ π¨ π» |
- Jean-Charles Mariani π π€ |
Jean-Christophe Houde π π» |
-
-
Jean-Dominique Gallezot π |
Jean-Philippe Lachaux π |
Jeanette Mumford π |
Jefferson Casimir π§ |
+
+
Jeffrey G. Ojemann π |
Jeffrey S. Grethe π¬ π β
π’ π» |
JegouA π» |
-
-
Jelle Dalenberg π |
Jeremy Moreau π π‘ |
Jessica A. Turner π |
Jochem Rieger π |
+
+
John Detre π |
John Pellman π |
John T. Wodder π» |
-
-
Joke Durnez π π§ π» |
Jon Haitz Legarreta GorroΓ±o π» π |
Jonathan C. Lau π |
Jonathan Winawer π |
+
+
Joost Kuijer π |
Jose Manuel Saborit π |
Joseph Wexler π π‘ |
-
-
Joseph Woods π |
Julia Guiomar Niso GalΓ‘n π€ π¨ π π π π π§ π π» π£ β
π¬ π π‘ π’ |
Julia Sprenger π |
- Julia-Katharina Pfarr π» π |
Julien Cohen-Adad π π£ π€ |
- Julio C Hernandez Pavon π |
- Julius Welzel π π‘ π π» π£ π€ π¬ π |
+ Julius Welzel π π‘ π π» π£ π€ π¬ π |
Kai J. Miller π |
Kangjoo Lee π |
Katja Heuer π§ |
Kay Robbins π» π π |
Kevin Larcher π¬ |
- Kimberly Ray π π π€ π |
- Kirstie Whitaker π π‘ π π€ π’ π¬ π» |
+ Kimberly Ray π π π€ π |
+ Kirstie Whitaker π π‘ π π€ π’ π¬ π» |
Klara Gregorova π |
Klaus Gramann π π€ |
Kris Thielemans π |
Kristofer Bouchard π |
Kurt Schilling π |
Laetitia Fesselier π§ |
- Laura and John Arnold Foundation π΅ |
+ Laura and John Arnold Foundation π΅ |
Leandro Beltrachini π |
Lee Kamentsky π |
Lennart Walger π |
Lennart Wittkuhn π |
Liberty Hamilton π |
Luca Pollonini π |
- Luis Hernandez-Garcia π π |
- Luke J. Edwards π π¬ |
+ Luis Hernandez-Garcia π π |
+ Luke J. Edwards π π¬ |
Lyuba Zehl π |
Mainak Jas π π» |
- Mana Biabani π |
Manjari Narayan π |
Manuel Mercier π π€ |
Maqsood Yaqub π |
@@ -302,109 +284,91 @@ Thanks goes to these wonderful people.
Marc Lalancette π π» |
Marco Castellaro π¬ π π» π π‘ β οΈ π’ π |
- Maria Ermolova π |
Maria de la Iglesia π |
Marie-HΓ©lΓ¨ne Bourget π π£ π» π€ |
Mark Mikkelsen π π» π£ π |
Markus Morawski π |
+ Marta Bortoletto π |
- Marta Bortoletto π |
Martin Craig π£ |
Martin Noergaard π π£ π» π€ π’ |
Martin Szinte π |
Martin Wilson π |
Martina Bulgari π |
Mateusz Pawlik π π π€ π§ π |
+ Mathias Goncalves π» π§ π’ |
- Mathias Goncalves π» π§ π’ |
Mathieu Boudreau π¬ π€ π’ |
- Mathieu DugrΓ© π» |
Matt Sanderson π π» |
Matteo Tonietto π |
Matthias GΓΌnther π |
Matthias Van Osch π |
-
-
- Mattia Veronese π |
Maureen J Shader π |
Maurice Pasternak π |
+
+
Max A. van den Boom π» π π π |
Melanie Ganz-Benjaminsen π π£ π» π€ π π π’ |
- Melissa kline π |
Michael Chappell π π£ π |
-
-
Michael Hanke π π€ π§ π π’ |
Michael P. Harms π β οΈ π§ |
Michael P. Milham π‘ π |
Michael P. Notter π¬ π β
π’ π |
- Michael Schirner π |
- Michelle Wang π» |
- MikaΓ«l Naveau π |
- Mohammad Torabi π» |
- Monique Denissen π |
- Murat Bilgel π |
+ Michael Schirner π |
+ MikaΓ«l Naveau π |
Nader Pouratian π |
Natalia Petridou π |
- Natalie Rotstein π |
National Institute of Mental Health π΅ |
-
-
Nell Hardcastle π» π π€ π π π¬ |
- Nicholas Holmes π |
Nicholas Traut π π§ π» |
- Nick F. Ramsey π |
- Nicole C. Swann π |
- Nigel Rogasch π |
- Nikhil Bhagwat π» |
- Nikita Beliy π |
+ Nick F. Ramsey π |
+ Nicole C. Swann π |
+ Nikita Beliy π |
Nima Bigdely Shamlo π |
Olivier David π |
Orrin Devinsky π |
Oscar Esteban π π§ π€ π¬ π» |
- Pamela LaMontagne π π‘ |
- Parul Sethi π π§ β οΈ π» |
+ Pamela LaMontagne π π‘ |
+ Parul Sethi π π§ β οΈ π» |
Patricia Clement π¬ π π» π π£ π‘ π π€ π β οΈ π’ |
Patrick Park π π‘ π¬ π» |
Paule-Joanne Toussaint π |
Peer Herholz π¬ π π π§ β
π’ |
Petra Ritter π |
- Pierre Rioux π |
- Pieter Vandemaele π π» |
+ Pierre Rioux π |
+ Pieter Vandemaele π π» |
Pradeep Reddy Raamana π» π§ |
R. Cameron Craddock π π’ |
Remi Gau π π» π¬ π’ π π» π π π§ π€ |
Richard HΓΆchenberger π π» |
Richard N. Henson π |
- Robert B. Innis π |
- Robert E. Smith π» π |
+ Robert B. Innis π |
+ Robert E. Smith π» π |
Robert Knight π |
Robert Luke π» |
Robert Oostenveld π π§ π’ π‘ β
β οΈ π€ π¬ π π π» π π£ π¨ π π π π πΉ |
- Roberto Guidotti π |
Roberto Toro π§ |
Rohan Goyal π |
- Ross W. Blair π» |
+ Ross W. Blair π» |
Russell A. Poldrack π π π’ |
RΓ©mi Adon π |
Samir Das π |
- Samuel Diebolt π π€ |
Samuel Garcia π€ π π |
- Samuel Guay π |
+ Samuel Guay π |
Samuel Nastase π» |
@@ -412,44 +376,35 @@ Thanks goes to these wonderful people.
Sasha D'Ambrosio π |
Satrajit S. Ghosh π π» |
Scott Makeig π |
- Sebastian Urchs π» π π€ |
Sein Jeung π π‘ π π» π£ π€ π¬ π§ π |
- Seyed Yahya Shirazi π π€ |
-
-
Shashank Bansal π |
- Silvia Isabella π |
Sjoerd B. Vos π |
+
+
Soichi Hayashi π π§ π |
Stefan Appelhoff π π¬ π€ π π‘ π» π β οΈ π’ β
π§ π π π§ π£ |
- Stefanie De Smet π |
Stephan Bickel π |
-
-
- Steven Meisler π π» π¬ π§ π |
+ Steven Meisler π π» π¬ π§ π |
Suyash Bhogawar π π‘ β οΈ π§ π¬ |
Sylvain Baillet π π |
Sylvain Takerkart π |
+
+
SΓ©bastien Tourbier π€ π π’ π π» π |
SΓΆren Grothkopp π π£ π |
Tal Pal Attia π |
-
-
Tal Yarkoni π» π π€ π π π π’ π π¨ |
Tamas Spisak π |
TamΓ‘s JΓ³zsa π |
- Taylor Khuhn π |
Taylor Salo π¬ π π π» |
- Teon L. Brooks π π» β οΈ π¬ π π€ π§ π π’ |
- Thomas Deffieux π π€ |
+ Teon L. Brooks π π» β οΈ π¬ π π€ π§ π π’ |
Thomas E. Nichols π π’ π§ π π§ π» |
Thomas Funck π |
Thomas Kirk π |
Thomas Okell π |
Tibor Auer π¬ π π‘ π§ π’ π π€ |
- Til Ole Bergmann π |
Timo Dickscheid π |
@@ -466,30 +421,25 @@ Thanks goes to these wonderful people.
Ulrike Bingel π |
Vanessa Sochat π |
Vasudev Raguram π» π¨ π π§ |
- Victor Hugo Souza π |
Vince D. Calhoun π |
Vittorio Iacovella π |
+ Viviana Siless π |
- Viviana Siless π |
Vladimir Litvak π |
Wietske van der Zwaag π£ π¬ |
William Clarke π |
William Triplett π |
Wouter V. Potters π» π |
Xiangrui Li π π» |
+ Yaroslav O. Halchenko π π’ π§ π¬ π π» π£ π π€ π π π π |
- Yaroslav O. Halchenko π π’ π§ π¬ π π» π£ π π€ π π π π |
Yoni Ashar π |
Yuan Wang π» |
Zachary Michael π |
- Zhi-De Deng π |
ezemikulan π» |
josator2 π» |
-
-
- mathieu_guay-paquet π |
monkeyman192 π» |
Γtienne Bergeron π£ π» |
diff --git a/docs/getting_started/folders_and_files/metadata/json.md b/docs/getting_started/folders_and_files/metadata/json.md
index 87f351b5..23c51edb 100644
--- a/docs/getting_started/folders_and_files/metadata/json.md
+++ b/docs/getting_started/folders_and_files/metadata/json.md
@@ -18,6 +18,8 @@ JSON files are text files that take the following structure:
Note that they can be nested (curly brackets within curly brackets).
Here are some common ways to read / write these files.
+- [Official documentation about JSON](https://www.json.org/json-en.html)
+
## Editing JSON file
### Online
@@ -57,24 +59,28 @@ to that of Python dictionaries (assuming you are only storing text / numbers in
### MATLAB / Octave
-There are many toolboxes in MATLAB or [Octave](https://octave.org/) (an open-source drop-in compatible with many Matlab scripts)
-for reading / writing JSON files.
+Since MATLAB R2016b
+and [Octave](https://octave.org/) >= 7.1 (an open-source drop-in compatible with many Matlab scripts),
+you can use the built-in functions
+[`jsonencode`](https://www.mathworks.com/help/matlab/ref/jsonencode.html)
+and [`jsondecode`](https://www.mathworks.com/help/matlab/ref/jsondecode.html)
+to help your read and write JSON files.
-
-Since MATLAB R2016b, you can use the built-in functions `jsonencode` (to write) and `jsondecode` (to read) JSON files.
-They should be available in Octave 6.1.
+!!! note -- "bids-matlab and other libraries"
-The [JSONio library](https://github.com/gllmflndn/JSONio) will allow you to read
-and write JSON files with MATLAB and octave (see examples below to use `jsonwrite` and `jsonread`).
+ There are also several toolboxes in MATLAB or Octave
+ for reading / writing JSON files.
-SPM12 uses the JSONio library by calling `spm_jsonwrite` and `spm_jsonread` and
-it has [other interesting functions to help you with BIDS](https://en.wikibooks.org/wiki/SPM/BIDS).
+ [bids-matlab](https://github.com/bids-standard/bids-matlab) has functions
+ ([`bids.util.jsonencode`](https://bids-matlab.readthedocs.io/en/main/utility_functions.html#bids.util.jsonencode)
+ and [`bids.util.jsondecode`](https://bids-matlab.readthedocs.io/en/main/utility_functions.html#bids.util.jsonencode))
+ that act as wrappers and will use whatever implementation (MATLAB, Octave...) is available.
-!!! note -- "bids-matlab"
+ The [JSONio library](https://github.com/gllmflndn/JSONio) will allow you to read
+ and write JSON files with MATLAB and Octave with the `jsonread` and `jsonwrite` functions.
- [bids-matlab](https://github.com/bids-standard/bids-matlab) has 2 functions
- (`bids.util.jsonencode` and `bids.util.jsondecode`) that act as wrappers and
- will use whatever implementation (SPM, JSONio, MATLAB) is available.
+ SPM12 uses the JSONio library by calling `spm_jsonwrite` and `spm_jsonread` and
+ it has [other interesting functions to help you with BIDS](https://en.wikibooks.org/wiki/SPM/BIDS).
### R
@@ -84,10 +90,6 @@ Remember to install and call a package before using it.
-```R
-install.packages('jsonlite')
-```
-
## Reading a `.json` file
=== "python"
@@ -103,7 +105,10 @@ install.packages('jsonlite')
For MATLAB >= R2016b
```matlab
- metadata = jsonencode('myfile.json')
+ % Read JSON data from a file
+ jsonStr = fileread('myfile.json');
+ % Convert JSON string to MATLAB variables
+ jsonData = jsondecode(jsonStr);
```
=== "octave"
@@ -116,10 +121,13 @@ install.packages('jsonlite')
=== "R"
+ The example below uses the [jsonlite](https://github.com/jeroen/jsonlite) library.
+
```R
- install.packages('jsonlite')
+ # install jsonlite in case you did not already do it
+ # install.packages('jsonlite')
library(jsonlite)
- metadata = fromJSON('myfile.json', pretty=TRUE)
+ metadata = fromJSON('myfile.json')
```
## Writing a `.json` file
@@ -145,16 +153,21 @@ install.packages('jsonlite')
The example below uses the [JSONio library](https://github.com/gllmflndn/JSONio).
```matlab
+ metadata = struct('field1', 'value1', 'field2', 3, 'field3', 'field3')
jsonwrite('my_output_file.json', metadata)
```
=== "R"
+ The example below uses the [jsonlite](https://github.com/jeroen/jsonlite) library.
+
```R
- install.packages('jsonlite')
+ # install jsonlite in case you did not already do it
+ # install.packages('jsonlite')
library(jsonlite)
- metadata = '{"field1": "value1", "field2": 3, "field3": "field3"}'
- writeLines(metadata, file="my_output_file.json")
+ metadata <- list(field1 = "value1", field2 = 3, field3 = "field3")
+ metadata = toJSON(metadata, pretty=TRUE)
+ write(metadata, "my_output_file.json")
```
## Interoperability issues
@@ -191,7 +204,7 @@ json_content =
key: 'value'
```
-There are however some strict rules for what makes a valid fieldname in MATLAB and octave.
+There are however some strict rules for what makes a valid fieldname in MATLAB and Octave.
Fieldnames must:
diff --git a/docs/getting_started/folders_and_files/metadata/tsv.md b/docs/getting_started/folders_and_files/metadata/tsv.md
index 99ee6d28..b33f3de8 100644
--- a/docs/getting_started/folders_and_files/metadata/tsv.md
+++ b/docs/getting_started/folders_and_files/metadata/tsv.md
@@ -4,29 +4,47 @@ A Tab-Separate Values (TSV) file is a text file where tab characters (`\t`) sepa
It is structured as a table, with each column representing a field of interest,
and each row representing a single datapoint.
+## Python
+
+In Python, the easiest way to work with TSV files is to use the [Pandas library](https://pandas.pydata.org/).
+This provides a high-level structure to organize, manipulate, clean, and visualize tabular data.
+You can install `pandas` with the following command:
+
+```bash
+pip install pandas
+```
+
+## MATLAB / Octave
+
+Since MATLAB R2013b,
+there is a [`readtable`](https://www.mathworks.com/help/matlab/ref/readtable.html) function that can load TSV files,
+and a [`writetable`](https://www.mathworks.com/help/matlab/ref/writetable.html) function to write them.
+
+For Octave, the `writetable` function is not implemented in older version of Octave
+(e.g 4.2.2) and the `table` function differs from its MATLAB counterpart,
+so it may be easier to rely on [bids-matlab](https://github.com/bids-standard/bids-matlab) functions
+([`bids.util.tsvwrite`](https://bids-matlab.readthedocs.io/en/main/utility_functions.html#bids.util.tsvwrite) and
+[`bids.util.tsvread`](https://bids-matlab.readthedocs.io/en/main/utility_functions.html#bids.util.tsvread))
+to help you work with those files.
+
+## R
+
+Reading and writing tab separated files comes natively in R, no need for extra packages.
+
## Reading a `.tsv` file
=== "python"
- In Python, the easiest way to work with TSV files is to use the Pandas library.
- This provides a high-level structure to organize, manipulate, clean, and
- visualize tabular data.
- You can install `pandas` with the following command:
-
- ```bash
- pip install pandas
- ```
+ In this example, we assume the .tsv includes column names (headers),
+ and explicitly set column separator (delimiter) to tab (`'\t'`).
```python
import pandas as pd
- data = pd.pd.read_csv("file.tsv", sep="\t", headers=True)
+ data = pd.read_csv("file.tsv", sep="\t", headers=True)
```
=== "MATLAB"
- Since MATLAB R2013b, there is a [`readtable`](https://www.mathworks.com/help/matlab/ref/readtable.html) function
- that can load TSV files.
-
```matlab
table_content = readtable('file.tsv', ...
'FileType', 'text', ...
@@ -36,75 +54,84 @@ and each row representing a single datapoint.
=== "octave"
+ The example below uses the [bids-matlab](https://github.com/bids-standard/bids-matlab) library.
+
```matlab
+ table_content = bids.util.tsvread('file.tsv');
```
=== "R"
- Reading and writing tab separated files comes natively in R, no need for extra packages.
-
In this example, we assume the .tsv includes column names (headers),
and explicitly set column separator (delimiter) to tab (`'\t'`)
```R
- data = read.table('myFile.tsv', header=TRUE, sep='\t')
+ data = read.table('file.tsv', header=TRUE, sep='\t')
```
-=== "Excel / [LibreOffice Calc](https://www.libreoffice.org/)"
-
-## Writing a `.tsv` file
+=== "Excel / LibreOffice Calc"
-## Matlab
+ Excel, [LibreOffice Calc](https://www.libreoffice.org/) and similar software to work with tables
+ should have no problem opening TSV files.
-```matlab
-root_dir = pwd;
-bidsProject = 'temp';
-mkdir(fullfile(root_dir, bidsProject));
-bids_participants_name = 'participants.tsv';
+## Writing a `.tsv` file
-participant_id = ['sub-01'; 'sub-02'];
-age = [20 30]';
-sex = ['m';'f'];
+=== "python"
-t = table(participant_id,age,sex);
-writetable(t, fullfile(root_dir, bidsProject, bids_participants_name), ...
- 'FileType', 'text', ...
- 'Delimiter', '\t');
-```
+ ```python
+ import pandas as pd
-## Octave
+ participants = pd.DataFrame(
+ {
+ "participant_id": ["sub-01", "sub-02"],
+ "age": [20, 30],
+ "sex": ["m", "f"],
+ }
+ )
+ participants.to_csv("participants.tsv")
+ ```
-The `writetable` function is not implemented in older version of Octave
-(e.g 4.2.2) and the `table` function differs from its matlab counterpart.
-These are still in development for future
-[releases](https://github.com/apjanke/octave-tablicious) so some of the scripts
-provided in the BIDS starter-kit repository in the matlab code folder
-to create .tsv might not work with octave because of that reason.
+=== "MATLAB"
-## Excel
+ ```matlab
+ participant_id = ['sub-01'; 'sub-02'];
+ age = [20; 30]';
+ sex = ['m'; 'f'];
+ participants = table(participant_id, age, sex);
+
+ writetable(participants, ...
+ 'participants.tsv', ...
+ 'FileType', 'text', ...
+ 'Delimiter', '\t');
+ ```
-- Create a file with the following columns
- (at least, for other values see paragraph the
- [BIDS specification](https://bids-specification.readthedocs.io/en/latest/03-modality-agnostic-files.html#participants-file))
- - participant_id
- - age
- - sex
+=== "Octave"
-- Save as tab separated `.txt` and change extension to `.tsv`
+ The example below uses the [bids-matlab](https://github.com/bids-standard/bids-matlab) library.
-## R
+ ```matlab
+ participants = struct(...
+ 'participant_id', ['sub-01', 'sub-02'];
+ 'age', [20, 30]';
+ 'sex', ['m', 'f']
+ );
-### Writing a `.tsv` file
+ bids.util.tsvwrite('participants.tsv', participants);
+ ```
-When writing files, column and row names are always saved, we remove row names,
-and quotes from the outpur explicitly by setting them to FALSE.
+=== "R"
-```R
-data = cbind.data.frame(
- participant_id = c('sub-01', 'sub-02'),
- age = c(20,30),
- sex = c('m','f'))
+ When writing files, column and row names are always saved,
+ we remove row names and quotes from the output explicitly by setting them to `FALSE`.
-write.table(data, file='myData.tsv',sep='\t',
- row.names = FALSE, quote = FALSE)
-```
+ ```R
+ participant_id <- c('sub-01', 'sub-02');
+ age <- c(20, 30);
+ sex <- c('m', 'f');
+ participants <- data.frame(participant_id, age, sex)
+ write.table(participants,
+ file='participants.tsv',
+ sep='\t',
+ row.names = FALSE,
+ quote = FALSE)
+ ```
diff --git a/docs/getting_started/resources/dependencies.md b/docs/getting_started/resources/dependencies.md
index 1305c243..6927c365 100644
--- a/docs/getting_started/resources/dependencies.md
+++ b/docs/getting_started/resources/dependencies.md
@@ -20,8 +20,6 @@ It'll work for all the languages below!
[**_Octave Information_**](https://www.gnu.org/software/octave/)
-Required JSON package [**JSONio**](https://github.com/gllmflndn/JSONio)
-
## Python
[**_Information_**](https://www.python.org/) (Both Python 2 and 3 will work for BIDS)
diff --git a/temp/participants.tsv b/temp/participants.tsv
new file mode 100644
index 00000000..acd0205e
--- /dev/null
+++ b/temp/participants.tsv
@@ -0,0 +1,3 @@
+participant_id age sex
+sub-01 20 m
+sub-02 30 f
diff --git a/tmp.py b/tmp.py
new file mode 100644
index 00000000..69661293
--- /dev/null
+++ b/tmp.py
@@ -0,0 +1,10 @@
+import pandas as pd
+
+participants = pd.DataFrame(
+ {
+ "participant_id": ["sub-01", "sub-02"],
+ "age": [20, 30],
+ "sex": ["m", "f"],
+ }
+)
+participants.to_csv("participants.tsv")