|
@@ -7,45 +7,47 @@ The above publication also introduces the software
|
|
|
> Collaborative Brain Wave Analysis Pipeline (Cobrawap). RRID:SCR_022966. [https://cobrawap.readthedocs.io](https://cobrawap.readthedocs.io)
|
|
|
|
|
|
## How to reproduce the results/figures from the publication
|
|
|
-#### Setup
|
|
|
+
|
|
|
+### Setup
|
|
|
- Setup the Python environment (`conda create -f environment.yaml`) and activate it.
|
|
|
- Setup Cobrawap with `cobrawap init` and follow the instructions to
|
|
|
- set the cobrawap output path (\<cobrawap_output\>),
|
|
|
- set the cobrawap config path (\<cobrawap_configs\>)
|
|
|
(see also the [documentation](https://cobrawap.readthedocs.io)).
|
|
|
-- Set the local project paths in *project_utils/project_paths.py*.
|
|
|
+- Set the local project paths in *project\_utils/project\_paths.py*.
|
|
|
+
|
|
|
|
|
|
-#### Get the data
|
|
|
+### Get the data
|
|
|
- Download the ECoG (IDIBAPS) and calcium imaging (LENS) datasets from the EBRAINS KnowledgeGraph:
|
|
|
- - IDIBAPS_WBS: [doi:10.25493%2FDZWT-1T8](https://doi.org/10.25493%2FDZWT-1T8)
|
|
|
- - IDIBAPS_FXS: [doi:10.25493/ANF9-EG3](https://doi.org/10.25493/ANF9-EG3)
|
|
|
- - IDIBAPS_PM: [10.25493/WKA8-Q4T](https://doi.org/10.25493/WKA8-Q4T)
|
|
|
- - LENS_M: [10.25493/QFZK-FXS](https://doi.org/10.25493/QFZK-FXS)
|
|
|
- - LENS_ISO: [10.25493/XJR8-QCA](https://doi.org/10.25493/XJR8-QCA)
|
|
|
-- Set the path parameter (`DATA_SETS`) in the *stage01_data_entry/config/config_<profile>.yaml* files to the corresponding data locations.
|
|
|
-
|
|
|
-#### Run the analysis pipeline
|
|
|
-- To produce all the possible pipeline outputs *\<cobrawap_output\>/\<profile\>\<variant\>/stage05_(channel_)wave_characterization/\<event-type\>_\<measure-type\>_measures.csv*, set the event-type and measure-type accordingly and execute:
|
|
|
+ - IDIBAPS\_WBS: [doi:10.25493%2FDZWT-1T8](https://doi.org/10.25493%2FDZWT-1T8)
|
|
|
+ - IDIBAPS\_FXS: [doi:10.25493/ANF9-EG3](https://doi.org/10.25493/ANF9-EG3)
|
|
|
+ - IDIBAPS\_PM: [10.25493/WKA8-Q4T](https://doi.org/10.25493/WKA8-Q4T)
|
|
|
+ - LENS\_M: [10.25493/QFZK-FXS](https://doi.org/10.25493/QFZK-FXS)
|
|
|
+ - LENS\_ISO: [10.25493/XJR8-QCA](https://doi.org/10.25493/XJR8-QCA)
|
|
|
+- Set the path parameter (`DATA\_SETS`) in the *stage01\_data\_entry/config/config\_<profile>.yaml* files to the corresponding data locations.
|
|
|
+
|
|
|
+### Run the analysis pipeline
|
|
|
+- To produce all the possible pipeline outputs *\<cobrawap\_output\>/\<profile\>\<variant\>/stage05\_(channel\_)wave\_characterization/\<event-type\>\_\<measure-type\>\_measures.csv*, set the event-type and measure-type accordingly and execute:
|
|
|
```
|
|
|
cobrawap run --profile=<profile>
|
|
|
```
|
|
|
|
|
|
-**Profiles:** The names that are used for the individual recordings and their corresponding configurations are listed in *project_utils/profiles.txt*.
|
|
|
+**Profiles:** The names that are used for the individual recordings and their corresponding configurations are listed in *project\_utils/profiles.txt*.
|
|
|
|
|
|
**Variants:** Variants are alternative configurations for a profile and can be specified by appending a corresponding label to the profile with a '|', e.g. `<profile>|minimatrigger`. Here, additional variants for spatial downsampling and alternative trigger detection are applied to all LENS datasets: **|macrodim3**, **|macrodim5**, **|macrodim7**, **|macrodim9**, **|macrodim11**, **|minimatrigger**.
|
|
|
|
|
|
-**Measure types:** There are two alternative final stages of the pipeline *stage05_wave_characterization* and *stage05_channel_wave_characterization*, corresponding to calculating either **wave-wise** or **channel-wise** characteristic measures. You can select between them in the top-level pipeline config *\<cobrawap_configs\>/configs/config.yaml*.
|
|
|
+**Measure types:** There are two alternative final stages of the pipeline *stage05\_wave\_characterization* and *stage05\_channel\_wave\_characterization*, corresponding to calculating either **wave-wise** or **channel-wise** characteristic measures. You can select between them in the top-level pipeline config *\<cobrawap\_configs\>/configs/config.yaml*.
|
|
|
|
|
|
**Event types:** The wave characterization in the pipeline output can be either given for all **wavefronts** or all **wavemodes** (wavemode = average of similar wavefronts). You can select between them by setting the parameter `EVENT_NAME` in the corresponding *stage05* config file. Also change the prefix of the `STAGE_OUTPUT` accordingly as `wavefronts` or `wavemodes`.
|
|
|
|
|
|
-#### Aggregate the output of the analysis pipeline
|
|
|
-In the folder *aggregate_pipeline_output* run snakemake (`snakemake -c1`) to create the combined dataframes from the individual pipeline outputs:
|
|
|
- - *\<event-type\>_\<measure-type\>\<variant\>_measures.csv* containing the pipeline outputs for all profiles,
|
|
|
- - *wavefronts_\<measure-type\>_trend_measures.csv* containing the moments of each measure for the downsampled (|macrodim) calcium imaging data,
|
|
|
- - *wavemodes_\<measure-type\>_avg_measures.csv* containing the measures per wavefront averaged for each wavemode.
|
|
|
+### Aggregate the output of the analysis pipeline
|
|
|
+In the folder *aggregate\_pipeline\_output* run snakemake (`snakemake -c1`) to create the combined dataframes from the individual pipeline outputs:
|
|
|
+- *\<event-type\>\_\<measure-type\>\<variant\>\_measures.csv* containing the pipeline outputs for all profiles,
|
|
|
+- *wavefronts\_\<measure-type\>\_trend\_measures.csv* containing the moments of each measure for the downsampled (|macrodim) calcium imaging data,
|
|
|
+- *wavemodes\_\<measure-type\>\_avg\_measures.csv* containing the measures per wavefront averaged for each wavemode.
|
|
|
|
|
|
-#### Plot the figures
|
|
|
-In folder *plot_figures*:
|
|
|
+### Plot the figures
|
|
|
+In folder *plot\_figures*:
|
|
|
- Run `snakemake -c1` to produce Figure 5 and 6.
|
|
|
- Execute `plot_wavemodes_dashboard.ipynb` to produce Figure 4 and S3 (change profile name in notebook accordingly).
|
|
|
- Execute `plot_trigger_detection_f-anesthesia.ipynb` to produce Figure S4.
|