Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
8684e22
Update detect_alpha_peak.py
guiomar Jul 19, 2021
b8a4d1d
Update README.md
guiomar Jul 19, 2021
6284bc9
Update README.md
guiomar Jul 19, 2021
361a712
Update detect_alpha_peak.py
guiomar Jul 30, 2021
aa11906
Update detect_alpha_peak.py
guiomar Aug 2, 2021
6461fd9
Update detect_alpha_peak.py
guiomar Aug 2, 2021
4778ccf
Update detect_alpha_peak.py
guiomar Aug 2, 2021
d18bfcb
Update detect_alpha_peak.py
guiomar Aug 2, 2021
2dcf765
Update detect_alpha_peak.py
guiomar Aug 4, 2021
b8344e6
Update main
guiomar Aug 4, 2021
419faff
Update main
guiomar Aug 4, 2021
27e6a20
Update detect_alpha_peak.py
guiomar Sep 13, 2021
91322f4
Update README.md
guiomar Sep 14, 2021
a4e7738
Create main.py
guiomar Sep 14, 2021
aea60bd
Update main
guiomar Sep 14, 2021
5df21d1
Update main
guiomar Sep 14, 2021
9e8592b
Update main.py
guiomar Sep 14, 2021
3596f8f
Delete detect_alpha_peak.py
guiomar Sep 14, 2021
44915e0
Create .DS_Store
guiomar Sep 14, 2021
a35e1ca
Update main.py
guiomar Sep 14, 2021
20bd816
Update README.md
guiomar Sep 14, 2021
fdfae66
Update main.py
guiomar Sep 14, 2021
36a1928
Update main.py
guiomar Sep 14, 2021
ec07eca
Update main
guiomar Sep 14, 2021
47db073
Update main.py
guiomar Sep 14, 2021
312bf6b
Update main.py
guiomar Sep 14, 2021
bd12274
Update main.py
guiomar Sep 14, 2021
dd2d2e5
Update main.py
guiomar Sep 14, 2021
9fb838c
Update main.py
guiomar Sep 14, 2021
5510c09
Update main.py
guiomar Sep 14, 2021
7d418cb
Update main.py
guiomar Sep 14, 2021
8e12076
Update main.py
guiomar Sep 14, 2021
0078e57
Update main
guiomar Sep 14, 2021
0d5d9af
Update main.py
guiomar Sep 14, 2021
f4a31e5
Update main
guiomar Sep 14, 2021
dc1e1a7
Update main.py
guiomar Sep 14, 2021
49c0609
Update main.py
guiomar Sep 14, 2021
d59b66e
Update main.py
guiomar Sep 14, 2021
598e4d0
Update main.py
guiomar Sep 14, 2021
8f11bce
Update main
guiomar Sep 14, 2021
61dfc52
Update main.py
guiomar Sep 14, 2021
4fbc5fe
Update main.py
guiomar Sep 14, 2021
fe68c37
Update main.py
guiomar Sep 14, 2021
470b2d9
Update main.py
guiomar Sep 14, 2021
5b4e28f
Update main.py
guiomar Sep 14, 2021
fc7b8c0
Update main.py
guiomar Sep 14, 2021
b26d48f
Update main
guiomar Sep 15, 2021
fd2c7c3
Update main.py
guiomar Sep 15, 2021
9ab0c40
Update main
guiomar Sep 15, 2021
ed78188
Update main.py
guiomar Sep 15, 2021
a2da356
Update main.py
guiomar Sep 15, 2021
7c76b5f
Update main.py
guiomar Sep 15, 2021
230d562
Update main.py
guiomar Sep 15, 2021
735cd55
Update main.py
guiomar Sep 15, 2021
eac7127
Update main.py
guiomar Sep 15, 2021
c6aa8b3
Update main.py
guiomar Sep 15, 2021
c0ddd7e
Update main.py
guiomar Sep 15, 2021
20ce20b
Update main.py
guiomar Sep 15, 2021
08e84cc
Update main.py
guiomar Sep 15, 2021
6111e83
Update main.py
guiomar Sep 15, 2021
e68fb83
Update main.py
guiomar Sep 16, 2021
39d68fa
Update main.py
guiomar Sep 16, 2021
a0bbf6e
Update main.py
guiomar Sep 16, 2021
89fc3b5
Update main.py
guiomar Sep 16, 2021
3de5897
Update main.py
guiomar Sep 16, 2021
68100ba
Update main.py
guiomar Sep 16, 2021
16b1ce0
Update main.py
guiomar Sep 16, 2021
54bb088
Update main.py
guiomar Sep 16, 2021
cf717e7
Update main.py
guiomar Sep 16, 2021
9a2974e
Update main.py
guiomar Sep 17, 2021
b9763c2
Update main.py
guiomar Sep 17, 2021
84d8af0
Update main.py
guiomar Sep 17, 2021
33f5730
Update main.py
guiomar Sep 17, 2021
56a6639
Update main.py
guiomar Sep 17, 2021
6ffffa8
Update main.py
guiomar Sep 17, 2021
14e0e26
Update main.py
guiomar Sep 17, 2021
2b22746
Update main.py
guiomar Sep 20, 2021
fae56f6
Update main.py
guiomar Sep 20, 2021
a953924
Update main.py
guiomar Sep 20, 2021
d25d598
Update main.py
guiomar Sep 20, 2021
53e59cf
Update main.py
guiomar Sep 20, 2021
d07dae3
Update main.py
guiomar Sep 20, 2021
b2d552d
Update main.py
guiomar Sep 21, 2021
cf76492
Update main.py
guiomar Sep 21, 2021
0383f3b
Update main.py
guiomar Oct 4, 2021
8d18b06
Update main
guiomar Oct 4, 2021
6ee4d2d
Update main.py
guiomar Oct 4, 2021
39ebe21
Create workspace.code-workspace
guiomar Oct 18, 2021
c7e63b3
Update main.py
guiomar Oct 18, 2021
246b24b
Update main.py
guiomar Oct 18, 2021
8fac9f7
Update README.md
guiomar Oct 18, 2021
6d6fc17
Update main
guiomar Oct 18, 2021
04f4fc5
Merge branch 'master' of https://github.com/guiomar/app-detect-peak-f…
guiomar Oct 18, 2021
8bd1c71
Update main
guiomar Oct 19, 2021
c5e4a8e
Update main.py
guiomar Oct 20, 2021
03be80d
Update main.py
guiomar Oct 20, 2021
3db226f
Update main.py
guiomar Oct 22, 2021
40de100
Update main
guiomar Oct 22, 2021
c4936e7
Update README.md
guiomar Oct 25, 2021
acb4997
Update main.py
guiomar Nov 15, 2021
541c7f9
Update main.py
guiomar Nov 15, 2021
30593b2
Update main.py
guiomar Nov 15, 2021
27e5cf0
Update main.py
guiomar Nov 15, 2021
ca319d8
Update main.py
guiomar Nov 18, 2021
af91291
Update README.md
guiomar Nov 30, 2021
23a7f60
Update README.md
guiomar Nov 30, 2021
e8d8032
Update main.py
guiomar Nov 30, 2021
db2352f
Update main.py
guiomar Nov 30, 2021
33ad5ed
Update main
guiomar Nov 30, 2021
1186fc3
Update main.py
guiomar Nov 30, 2021
8f0f6af
Update main.py
guiomar Nov 30, 2021
9bba2f9
Update main.py
guiomar Nov 30, 2021
f52dd17
Delete config.json.example
guiomar Dec 10, 2021
987a53b
Update main.py
guiomar Dec 10, 2021
2a2a2ff
Update main.py
guiomar Dec 10, 2021
425624d
Update main.py
guiomar Dec 10, 2021
5834238
Update main.py
guiomar Dec 10, 2021
7af692a
Update main.py
guiomar Dec 13, 2021
392fa25
Update main.py
guiomar Dec 13, 2021
0aaccde
Update main.py
guiomar Dec 13, 2021
bb19c86
Update main.py
guiomar Dec 13, 2021
8404eed
Update main.py
guiomar Dec 13, 2021
426d562
Update main.py
guiomar Dec 13, 2021
6303763
Update main.py
guiomar Dec 13, 2021
80c704d
Update main.py
guiomar Dec 13, 2021
cfefd6e
Update main.py
guiomar Dec 13, 2021
a2c3a44
Update main.py
guiomar Dec 13, 2021
75a6ac4
Update README.md
guiomar Feb 8, 2024
f8bee3a
Update README.md
guiomar Feb 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
69 changes: 22 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,36 @@
# app-detect-alpha-peak
Detect individual alpha peak in MEG signals.
# Find frequency peak of PSD data

# app-detect-alpha-peak documentation
[![Abcdspec-compliant](https://img.shields.io/badge/ABCD_Spec-v1.1-green.svg)](https://github.com/brain-life/abcd-spec)
[![Run on Brainlife.io](https://img.shields.io/badge/Brainlife-bl.app.531-blue.svg)](https://doi.org/10.25663/brainlife.app.531)

1) Detect alpha peak frequency for each channel and for the mean over all channels
## Documentation

Detects peak frequency of PSD for each channel on a given bandwith

1) Detect peak frequency for each channel for a given bandwith
2) Input file is:
* a `.csv` file containing the Power Spectral Densities
* a `.tsv` file containing the signal PSD, Power Spectral Densities
5) Ouput files are:
* a `.csv` file containing the alpha peak frequency for each channel and the mean over all channels,
* plot of the mean Power Spectral density over all channels,
* plot of the mean Power Spectral density for each channel.
* a `.tsv` file containing the peak frequency for each channel
* a plot with the distribution of all peak frequencies across channels
* a plot the PSD frequency peak for each channel (peak found in the psd)

### Authors
- [Aurore Bussalb](aurore.bussalb@icm-institute.org)
## Authors
- [Guiomar Niso](guiomar.niso@ctb.upm.es), Instituto Cajal, CSIC, Spain

### Contributors
- [Aurore Bussalb](aurore.bussalb@icm-institute.org)
- [Maximilien Chaumon](maximilien.chaumon@icm-institute.org)
## Citations
We kindly ask that you cite the following articles when publishing papers and code using this app.

### Funding Acknowledgement
brainlife.io is publicly funded and for the sustainability of the project it is helpful to Acknowledge the use of the platform. We kindly ask that you acknowledge the funding below in your code and publications. Copy and past the following lines into your repository when using this code.
1. **brainlife. io: A decentralized and open source cloud platform to support neuroscience research**. Hayashi, S., Caron, B. A., et al. & Pestilli, F. (2023). ArXiv. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10274934/

## Funding Acknowledgement
brainlife.io is publicly funded and for the sustainability of the project we kindly ask that you acknowledge the following funding sources:

[![NSF-BCS-1734853](https://img.shields.io/badge/NSF_BCS-1734853-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1734853)
[![NSF-BCS-1636893](https://img.shields.io/badge/NSF_BCS-1636893-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1636893)
[![NSF-ACI-1916518](https://img.shields.io/badge/NSF_ACI-1916518-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1916518)
[![NSF-IIS-1912270](https://img.shields.io/badge/NSF_IIS-1912270-blue.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1912270)
[![NIH-NIBIB-R01EB029272](https://img.shields.io/badge/NIH_NIBIB-R01EB029272-green.svg)](https://grantome.com/grant/NIH/R01-EB029272-01)

### Citations
1. Avesani, P., McPherson, B., Hayashi, S. et al. The open diffusion data derivatives, brain data upcycling via integrated publishing of derivatives and reproducible open cloud services. Sci Data 6, 69 (2019). [https://doi.org/10.1038/s41597-019-0073-y](https://doi.org/10.1038/s41597-019-0073-y)

## Running the App

### On Brainlife.io

This App is still private on Brainlife.io.

### Running Locally (on your machine)

1. git clone this repo
2. Inside the cloned directory, create `config.json` with the same keys as in `config.json.example` but with paths to your input
files and values of the input parameters. For instance:

```json
{
"fif": "rest1-raw.fif"
}
```

3. Launch the App by executing `main`

```bash
./main
```

## Output

The output files are a `.csv` file and two plots in `.png`.
[![NIH-NIBIB-R01EB030896](https://img.shields.io/badge/NIH_NIBIB-R01EB030896-green.svg)](https://grantome.com/grant/NIH/R01-EB030896-01)


#### MIT Copyright (c) 2021 brainlife.io The University of Texas at Austin and Indiana University
3 changes: 0 additions & 3 deletions config.json.example

This file was deleted.

183 changes: 0 additions & 183 deletions detect_alpha_peak.py

This file was deleted.

30 changes: 17 additions & 13 deletions main
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,36 @@
#
# This is the main file run by the brainlife.io orchestration system
#
# Author: Franco Pestilli
# Author: Guiomar Niso, Aurore Bussalb


set -e
set -x

# Make output directories
mkdir -p out_dir
mkdir -p out_figs

# Run the actual python code
singularity exec docker://brainlife/mne:0.23dev python3 detect_alpha_peak.py
singularity exec docker://brainlife/mne:0.23dev python3 main.py

# Store PSD plot with alpha peak on product.json
cat << EOF > product.json
{
"brainlife": [
{
"type": "image/png",
"name": "Alpha peak on mean spectrum",
"base64": "$(base64 -w 0 out_dir/psd_mean.png)"
},
{
"type": "image/png",
"name": "Power spectrum for all channels",
"base64": "$(base64 -w 0 out_dir/psd_channels.png)"
}
]
{
"type": "image/png",
"name": "Peak frequencies",
"base64": "$(base64 -w 0 out_figs/hist_peak_frequency.png)"
},
{
"type": "image/png",
"name": "Power spectrum for all channels",
"base64": "$(base64 -w 0 out_figs/psd_allchannels.png)"
}
]
}

EOF


Loading