You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorial.md
+49-13Lines changed: 49 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Tutorial
2
2
## Getting Started with LSLAutoBIDS
3
3
4
+

5
+
4
6
This tutorial will guide you through the steps to set up and use the LSLAutoBIDS package for converting EEG recordings to BIDS format, version controlling the data with Datalad, and uploading it to a Dataverse repository with a practical example.
3. Download the dummy dataset for testing in the LSLAutoBIDS root directory - ([tutorial_sample_dataset](https://files.de-1.osf.io/v1/resources/wz7g9/providers/osfstorage/68c3c636e33eca3b0feffa2c/?zip=))
17
19
18
20
The dataset has a sample project called the test project "test-project" which contains an EEG recording file in the projects directory, a sample eyetracking recording in the `project_stimulus/data` directory and a dummy experimental code file `project_stimulus/experiment` directory.
@@ -27,16 +47,16 @@ This will create a configuration file template in folder `~/.config/lslautobids/
27
47
2. Create a Dataverse account and get the API token
28
48
- Create a dataverse account in your institution's dataverse server (e.g. https://darus.uni-stuttgart.de/dataverse/darus)
29
49
- Create a new dataverse for your project
30
-
- Create a new API token from your dataverse account settings page.
50
+
- Create a new API token from your dataverse account settings page (http://guides.dataverse.org/en/latest/user/index.html).
31
51
32
52
3. Open the configuration file `~/.config/lslautobids/autobids_config.yaml` and fill in the details
33
53
- Edit the file e.g. via `nano ~/.config/lslautobids/autobids_config.yaml` to add the dataverse and project root details.
34
54
35
55
Configuration file template:
36
56
```yaml
37
-
"BIDS_ROOT": "# relative to home/users directory: LSLAutoBIDS/data/bids/",
38
-
"PROJECT_ROOT": "# relative to home/users: LSLAutoBIDS/data/projects/",
39
-
"PROJECT_STIM_ROOT": "# path relative to home/users: LSLAutoBIDS/data/project_stimulus/",
57
+
"BIDS_ROOT": "# relative to home/users directory: LSLAutoBIDS/sample_data/bids/",
58
+
"PROJECT_ROOT": "# relative to home/users: LSLAutoBIDS/sample_data/projects/",
59
+
"PROJECT_STIM_ROOT": "# path relative to home/users: LSLAutoBIDS/sample_data/project_stimulus/",
40
60
"BASE_URL": "https://darus.uni-stuttgart.de", # The base URL for the service.
41
61
"API_KEY": "# Paste your dataverse API token here", # Your API token for authentication.
42
62
"PARENT_DATAVERSE_NAME": "simtech_pn7_computational_cognitive_science"# The name of the dataverse to which datasets will be uploaded. When you in the dataverses page , you can see this name in the URL after 'dataverse/'.
@@ -49,13 +69,13 @@ This will create a project-specific configuration file template in the specified
Fill in the details in the configuration file `LSLAutoBIDS/data/projects/TestProject2025/TestProject2025_config.toml` file.
72
+
Fill in the details in the configuration file `LSLAutoBIDS/sample_data/projects/test-project/test-project_config.toml` file.
53
73
54
74
You can find the details about the parameters in the comments of the template configuration file generated. For this tutorial you might want to just change the author and email fields. Rest of the fields are already filled in for the test project.
55
75
56
76
## Example Case 1
57
77
58
-
A lab wants to conduct an EEG-EyeTracking experiment and wants to make this dataset publicly available for the other neuroscience researchers. To assure data provenence and reproducibility within and across labs, they want to have a standardized structure for storing the data and code files.
78
+
A lab wants to conduct an EEG-EyeTracking experiment and wants to make this dataset publicly available for the other neuroscience researchers. To assure data provenence and reproducibility within and across labs, they want to have a standardized structure for storing the data and code files.
59
79
60
80
In this example we will see how to use the LSLAutoBIDS package to:
61
81
1. Convert the recorded EEG data in xdf format to BIDS format.
@@ -64,8 +84,7 @@ In this example we will see how to use the LSLAutoBIDS package to:
64
84
4. Upload the dataset to a dataverse repository for public access.
65
85
66
86
### How to run the example?
67
-
68
-
1. Check if the toml configuration file `LSLAutoBIDS/data/projects/TestProject2025/TestProject2025_config.toml` is filled in with the correct details, specially the stimulusComputerUsed and expectedFiles fields. For this example we are using eye tracking data as a behavioral file, thus the stimulusComputerUsed field should be set to true and the expectedFiles field should contain the expected stimulus file extensions.
87
+
1. Check if the toml configuration file `LSLAutoBIDS/sample_data/projects/test-project/test-project_config.toml` is filled in with the correct details, specially the stimulusComputerUsed and expectedFiles fields. For this example we are using eye tracking data as a behavioral file, thus the stimulusComputerUsed field should be set to true and the expectedFiles field should contain the expected stimulus file extensions.
69
88
```toml
70
89
[Computers]
71
90
stimulusComputerUsed = true
@@ -75,17 +94,34 @@ In this example we will see how to use the LSLAutoBIDS package to:
75
94
```
76
95
2. Run the conversion and upload command to convert the xdf files to BIDS format and upload the data to the dataverse.
77
96
```
78
-
lslautobids run -p TestData2025
97
+
lslautobids run -p test-project
79
98
```
80
99
81
-
1. This will convert the xdf file in the `LSLAutoBIDS/data/projects/TestProject2025/sub-001/ses-001/eeg/` directory to BIDS format and store it in the `LSLAutoBIDS/data/bids/TestProject2025/sub-001/ses-001/` directory.
82
-
2. You can check the logs in the log file `LSLAutoBIDS/data/bids/TestProject2025/code/TestProject2025.log` file.
83
-
3. The source data i.e. the raw xdf file, behavioral data (e.g. eye-tracking recording) and the experimental code files in `PROJECT_STIM_ROOT/TestProject2025/experiment` (all files e.g. .py, .oxexp will be compressed to a `tar.gz` archive) will be copied to the `LSLAutoBIDS/data/bids/TestProject2025/source_data/`, `LSLAutoBIDS/data/bids/TestProject2025/beh/` and `LSLAutoBIDS/data/bids/TestProject2025/misc/` directories respectively.
100
+
1. This will convert the xdf file in the `LSLAutoBIDS/sample_data/projects/test-project/sub-999/ses-001/eeg/` directory to BIDS format and store it in the `LSLAutoBIDS/sample_data/bids/test-project/sub-999/ses-001/` directory.
101
+
2. You can check the logs in the log file `LSLAutoBIDS/sample_data/bids/test-project/code/test-project.log` file.
102
+
3. The source data i.e. the raw xdf file, behavioral data (e.g. eye-tracking recording) and the experimental code files in `PROJECT_STIM_ROOT/test-project/experiment` (all files e.g. .py, .oxexp will be compressed to a `tar.gz` archive) will be copied to the `LSLAutoBIDS/sample_data/bids/test-project/source_data/`, `LSLAutoBIDS/sample_data/bids/test-project/beh/` and `LSLAutoBIDS/sample_data/bids/test-project/misc/` directories respectively.
84
103
85
104
## Example Case 2
105
+
In this case the experimenter wants to publish **only the raw EEG recordings and the converted EEG files**, but **exclude the stimulus files and experiment code**.
106
+
107
+
### How to run the example?
108
+
1. The workflow is almost identical to Example Case 1, except **stimulus and experiment files are excluded**.
109
+
2. Check if the toml configuration file `LSLAutoBIDS/sample_data/projects/test-project/test-project_config.toml` is filled in with the correct details.
110
+
111
+
```toml
112
+
[Computers]
113
+
stimulusComputerUsed = False
114
+
```
115
+
3. Run the conversion and upload command to convert the xdf files to BIDS format and upload the data to the dataverse.
116
+
```
117
+
lslautobids run -p test-project
118
+
```
119
+
1. This will convert the xdf file, and you can check the logs in the log file as shwon in example case 1.
120
+
2.`LSLAutoBIDS/sample_data/bids/test-project/beh` and `LSLAutoBIDS/sample_data/bids/test-project/misc` directories are not exist in the **converted bids**.
86
121
87
122
88
123
124
+
## Example Case 3
89
125
90
126
## After publishing the dataset (Out of Scope of this package)
0 commit comments