|
|
[[_TOC_]]
|
|
|
|
|
|
# Overview
|
|
|
This script is essentially an attemp to create a standardized import function for the BUCANL lossless pipeline. It takes in raw data files and preforms all of the necessary steps to prepare the raw files for the [eeg_pipe_asr_amica pipeline](https://git.sharcnet.ca/bucanl_pipelines/eeg_pipe_asr_amica/wikis/home) (this pipeline). This script was designed to be very versatile for any level of automation and knowledge base of configuration scripts.
|
|
|
This script is an attempt to create a standardised import function for the BUCANL lossless pipeline. It accepts raw data files and will preform all of the necessary steps to prepare the raw files for the [eeg_pipe_asr_amica pipeline](https://git.sharcnet.ca/bucanl_pipelines/eeg_pipe_asr_amica/wikis/home) (this pipeline). This script was designed to be very versatile for any level of automation and knowledge base of [batch context](https://git.sharcnet.ca/bucanl_eeglab_extensions/batch_context/wikis/home) configuration scripts.
|
|
|
|
|
|
Raw files can vary greatly depending on the modality used to collect the data, while init files going into the pipeline need to to prepared just right for smooth processing during the initial stages and for ICA. This script currently can prepare data from two different styles:
|
|
|
Raw files can vary greatly depending on the modality used to collect the data, while init files going into the pipeline need to be prepared in a particular way for smooth processing during the initial stages and for ICA. This script currently can prepare data from two different styles:
|
|
|
|
|
|
**1. ESS Capsule**
|
|
|
To load a capsule make sure it it is at the level 1 stage, and load the study_description.xml file into the [batch config](https://git.sharcnet.ca/bucanl_eeglab_extensions/batch_context/wikis/home) under the file upload section. The metadata stored in the capsule will be automatically accessed in the script and be used to find all the files the study contains. Using the [file structure](https://git.sharcnet.ca/bucanl_pipelines/eeg_pipe_asr_amica/wikis/directories) designed for this pipeline is best as the saved files will be directed into the *analysis/data/1_init* folder when they are complete.
|
|
|
To load a capsule make sure it it is at the level 1 stage, and load the study_description.xml file into the [run history batch file GUI](https://git.sharcnet.ca/bucanl_eeglab_extensions/batch_context/wikis/home) under the file upload section. The metadata stored in the capsule will be automatically accessed in the script and be used to find all the files the study contains. Using the [file structure](https://git.sharcnet.ca/bucanl_pipelines/eeg_pipe_asr_amica/wikis/directories) designed for this pipeline is best as the saved files will be directed into the *analysis/data/1_init* folder when they are complete.
|
|
|
|
|
|
:so: We recommend storing the *Main_Study_Folder* inside of *analysis/data/0_raw* making the study_description.xml available in *analysis/data/0_raw/Main_Study_Folder/level_1/study_description.xml*
|
|
|
|
|
|
:so: To find out more about ESS capsules go to the [Big EEG Consortium](http://www.bigeeg.org/).
|
|
|
|
|
|
**2. Raw Files**
|
|
|
You can also load raw files into the [batch config](https://git.sharcnet.ca/bucanl_eeglab_extensions/batch_context/wikis/home) file upload as normal. Using the [file structure](https://git.sharcnet.ca/bucanl_pipelines/eeg_pipe_asr_amica/wikis/directories) for this pipeline is best as the saved files will be directed into the *analysis/data/1_init* folder when they are complete. This means uploading your raw files from the *analysis/data/0_raw* folder.
|
|
|
You can also load raw files into the [run history batch file GUI]](https://git.sharcnet.ca/bucanl_eeglab_extensions/batch_context/wikis/home) file upload as normal. Using the [file structure](https://git.sharcnet.ca/bucanl_pipelines/eeg_pipe_asr_amica/wikis/directories) for this pipeline is best as the saved files will be directed into the *analysis/data/1_init* folder when they are complete. This means uploading your raw files from the *analysis/data/0_raw* folder.
|
|
|
|
|
|
:so: On a side note make sure your EEGLAB work space is set to the *eeglab_asr_amica* folder so that *analysis* is the first folder on your path.
|
|
|
|
|
|
This script takes the raw data file through 3 process:
|
|
|
This script takes the raw data file through 4 main process:
|
|
|
1. Loading the File (LOAD)
|
|
|
2. Warping Channel locations to MNI head (WARP)
|
|
|
3. Creating events and marks to indicate In/Out Task Time (EVENTS)
|
|
|
2. Merging other files and renaming events (MERGE)
|
|
|
3. Warping Channel locations to MNI head (WARP)
|
|
|
4. Creating events and marks to indicate In/Out Task Time (EVENTS)
|
|
|
|
|
|
The picture below shows how each section develops the file.
|
|
|
|
... | ... | @@ -29,8 +32,8 @@ The picture below shows how each section develops the file. |
|
|
This script will only produce GUI's if it is missing a necessary piece of information. This means that if you carefully fill out the configuration file then you can run the complete pipeline automatically! On the other hand if you are:
|
|
|
* Not comfortable with the configuration files
|
|
|
* Unsure of some of the this file information
|
|
|
* Missing clear events to mark the start and stop of recording
|
|
|
Then the script can be run with less or no configuration setup and will use GUI's to prompt you for the information as needed. This process is more time consuming but will help you understand what is needed in the configuration.
|
|
|
* Missing clear events to indicate "out of task time"
|
|
|
Then the script can be run with just the basic configuration setup and will use GUI's to prompt you for the information as needed. This process is more time consuming but will help you understand what is needed in the configuration.
|
|
|
|
|
|
:so: You can always run a smaller batch first to sort out these details then run the whole set once the config is complete. Refer to the table below to help plan your script use.
|
|
|
|
... | ... | @@ -38,12 +41,10 @@ Then the script can be run with less or no configuration setup and will use GUI' |
|
|
|:------:|:-------------------------:|:-----------:|
|
|
|
| ESS | | |
|
|
|
| 1 | ESS and Config | Auto |
|
|
|
| 2 | ESS and Manual | Interactive |
|
|
|
| 3 | ESS and Config and Manual | Interactive |
|
|
|
| 2 | ESS and Config and Manual | Interactive |
|
|
|
| OTHER | | |
|
|
|
| 1 | Config | Auto |
|
|
|
| 2 | Manual | Interactive |
|
|
|
| 3 | Config and Manual | Interactive |
|
|
|
| 2 | Config and Manual | Interactive |
|
|
|
|
|
|
# Mandatory Variables
|
|
|
If you want to run this script fully automatic or on a remote cluster you need to ensure that each of the mandatory variables described below are denoted in either the batch config or the ESS capsule metadata.
|
... | ... | @@ -63,11 +64,13 @@ The table below indicates with an **x** the methods in which you can describe ea |
|
|
| modality | x | | | x | x | System used for recording |
|
|
|
| oneloc | x | | | x | x | 1 if you are using a single montage location file, 0 for subject specific files |
|
|
|
| locs_file_name | x | | | x | x | Path to montage or naming convention for subject specific files |
|
|
|
| srate | x | | | x | x | Number of data points collected per second |
|
|
|
| NotEEG_chans | x | | | x | | Channel numbers that do not contain EEG data |
|
|
|
| Fid_chans | x | | | x | x | Channel numbers of the Fiducials for warping reference |
|
|
|
| ref_loc_file | | x | | x | | Warp reference surface, default is the MNI head if no config is given |
|
|
|
| tMatrix | | x | x | x | x | Matrix used to warp your location files to MNI head |
|
|
|
| mergefiles | | x | x | x | x | A list of the names of the files you wish to merge using swap strings. Leave blank for browsing |
|
|
|
| merges | | x | x | x | x | The total number of files you wish to merge, 1 means just the loaded file with no merge |
|
|
|
| change_srate | | x | x | x | x | The sampling rate you wish to resample to. 0 or the current rate wont change the data. |
|
|
|
| Onevents | | x | x | x | x | Events that represent HED tag 'Custom/Marks/RecStart' |
|
|
|
| Offevents | | x | x | x | x | Events that represent HED tag 'Custom/Marks/RecStop' |
|
|
|
| Inevents | | x | x | x | x | Events that represent HED tag 'Custom/Marks/InEvent' |
|
... | ... | |