Last modified by robing on 2022/03/25 09:55

From version 9.1
edited by robing
on 2020/01/16 12:15
Change comment: There is no comment for this version
To version 10.1
edited by robing
on 2020/01/20 09:33
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -14,21 +14,72 @@
14 14  (((
15 15  = What can I find here? =
16 16  
17 -* Notice how the table of contents on the right
18 -* is automatically updated
19 -* to hold this page's headers
17 +...
20 20  
21 21  = Who has access? =
22 22  
23 23  Describe the audience of this collab.
24 24  
25 -== Content ==
23 +== Executing the pipeline ==
26 26  
27 -[[Pipeline Notebook>>https://jupyterhub-preview.apps-dev.hbp.eu/user/robing/lab/tree/drive/Shared%20with%20groups/Slow%20Wave%20Analysis%20Pipeline/pipeline/showcase_notebooks/collab_snakemake_test.ipynb]]
25 +[[image:pipeline_flowchart.png]]
28 28  
29 -[[stage02-config>>https://jupyterhub-preview.apps-dev.hbp.eu/user/robing/lab/tree/drive/Shared%20with%20groups/Slow%20Wave%20Analysis%20Pipeline/pipeline/pipeline/stage02_preprocessing/config.yaml]]
27 +=== in the collab (beta) ===
30 30  
31 -[[image:pipeline_flowchart.png]]
29 +* **Edit the config files**
30 +Each stage has a config file to specify which analysis/processing blocks to execute and which parameters to use. General and specific information about the blocks and parameters can found in the README and config files. The default values are set for an example dataset (ECoG, anesthetized mouse, IDIBAPS [ref]).
31 +** stage01_data_entry: [README.md](), [config.yaml]()
32 +** stage02_preprocessing: [README.md](), [config.yaml]()
33 +** stage03_trigger_detection: [README.md](), [config.yaml]()
34 +** stage04_wavefront_detection: [README.md](), [config.yaml]()
35 +** stage05_wave_characterization: [README.md](), [config.yaml]()
36 +
37 +* **Start a Jupyter Hub instance**
38 +
39 +* **Follow the notebook**
40 +In the jupyter hub, navigate to `drive/Shared with groups/Slow Wave Analysis Pipeline/pipeline/showcase_notebooks/snakemake_collab_test.ipynb`.
41 +Follow the notebook to install the required packages into your Python kernel, set the output path, and execute the pipeline with snakemake.
42 +
43 +* **Coming soon**
44 +** Use of KnowledgeGraph API
45 +** Provenance Tracking
46 +** HPC support
47 +
48 +=== locally ===
49 +
50 +* **Get the code**
51 +The source code of the pipeline is available via Github: [INM-6/wavescalephant]('https:~/~/github.com/INM-6/wavescalephant') and can be cloned to your machine ([how to use Github]()).
52 +
53 +* **Build the Python environment**
54 +In the wavescalephant repository, there is an environment file (`pipeline/envs/wavescalephant_env.yaml`) specifying the required packages and versions. To build the environment, we recommend using *conda* ([how to get started with conda]()).
55 +`conda env create ~-~-file /envs/wavescalephant_env.yaml`.
56 +
57 +* **Edit the settings**
58 +The settings file specifies the path to the output folder, where results are saved to. Open the template file `pipeline/settings_template.py`, set the `output_path` to the desired path, and save it as `pipeline/settings.py`.
59 +
60 +* **Edit the config files**
61 +Each stage has a config file to specify which analysis/processing blocks to execute and which parameters to use. Edit the config template files `pipeline/stageXX_<stage_name>/config_template.yaml` according to your dataset and analysis goal, and save them as `pipeline/stageXX_<stage_name>/config.yaml`. A detailed description of the available parameter settings and their meaning is commented in the template files, and a more general description of the working mechanism of each stage can be found in the respective README file `pipeline/stageXX_<stage_name>/README.md`.
62 +
63 +* **Enter a dataset**
64 +see `pipeline/stage01_data_entry/README.md`
65 +
66 +* **Run the pipeline (-stages)**
67 +To run the pipeline with snakemake ([intro to snakemake]()) activate the Python environment `conda activate wavescalephant_env`, make sure you are in the working directory `pipeline/`, and call `snakemake` to run the entire pipeline.
68 +To (re-)execute an individual stage, you can navigate to the corresponding stage folder and call the `snakemake` command there. For running an individual stage, you may need to manually set the path for input file for the stage (i.e. the output file of the previous stage) in the config file `INPUT: /path/to/file`.
69 +
70 +== Accessing and using the results ==
71 +
72 +All results are stored in the path specified in the `settings.py` file. The folder structure reflects the structuring of the pipeline into stages and blocks. All intermediate results are stored as `.nix` files using the Neo data format ([Neo]()) and can be loaded with `neo.NixIO('/path/to/file.nix').read_block()` ([documentation]()).
73 +Additionally, most blocks produce a figure, and each stage a report file, to give an overview of the execution log, parameters, intermediate results, and to help with debugging.
74 +The final stage (*stage05_wave_characterization*) stores the results as pandas.DataFrames ([pandas]()) in `.csv` files, separately for each measure as well as in a combined dataframe for all measures.
75 +
76 +== References ==
77 +
78 +
79 +== Acknowledgments ==
80 +
81 +This open source software code was developed in part or in whole in the Human Brain Project, funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation
82 +under the Specific Grant Agreement No. 785907 (Human Brain Project SGA2).
32 32  )))
33 33  
34 34