Skip to content

Commit 0c21e1f

Browse files
committed
fix conflicts
2 parents 842beb9 + 4a2a383 commit 0c21e1f

File tree

452 files changed

+3754
-2499
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

452 files changed

+3754
-2499
lines changed

.github/workflows/miss_hit.yml renamed to .github/workflows/miss_hit_quality.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: miss_hit
1+
name: miss_hit_quality
22

33
on:
44
push:
@@ -28,10 +28,8 @@ jobs:
2828
run: |
2929
python -m pip install --upgrade pip setuptools
3030
pip3 install -r requirements.txt
31-
32-
- name: MISS_HIT Code style
33-
run: |
34-
mh_style --process-slx
31+
cd tests
32+
make data
3533
3634
- name: MISS_HIT Metrics
3735
run: |
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: miss_hit_style
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches: '*'
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
17+
- uses: actions/checkout@v2
18+
with:
19+
submodules: true
20+
fetch-depth: 1
21+
22+
- name: Set up Python 3.6
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: 3.6
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip setuptools
30+
pip3 install -r requirements.txt
31+
cd tests
32+
make data
33+
34+
- name: MISS_HIT Code style
35+
run: |
36+
mh_style

.github/workflows/run_tests.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: tests and coverage
22

33
# Uses the cron schedule for github actions
4-
#
4+
#
55
# https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#scheduled-events
6-
#
6+
#
77
# ┌───────────── minute (0 - 59)
88
# │ ┌───────────── hour (0 - 23)
99
# │ │ ┌───────────── day of the month (1 - 31)
1010
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
1111
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
12-
# │ │ │ │ │
12+
# │ │ │ │ │
1313
# │ │ │ │ │
1414
# │ │ │ │ │
1515
# * * * * *
@@ -41,7 +41,7 @@ jobs:
4141
sudo apt-get -y install octave liboctave-dev
4242
sudo apt-get -y install nodejs npm
4343
44-
- name: Clone cpp_spm
44+
- name: Clone cpp_spm
4545
uses: actions/checkout@v2
4646
with:
4747
submodules: true
@@ -60,16 +60,19 @@ jobs:
6060
git clone https://github.com/MOxUnit/MOxUnit.git --depth 1
6161
make -C MOxUnit install
6262
git clone https://github.com/MOcov/MOcov.git --depth 1
63-
make -C MOcov install
64-
63+
make -C MOcov install
64+
65+
- name: Add bids-matlab
66+
run: |
67+
git clone https://github.com/bids-standard/bids-matlab.git --depth 1
68+
6569
- name: Update octave path
6670
run: |
6771
octave $OCTFLAGS --eval "initCppRoi; savepath();"
68-
octave $OCTFLAGS --eval "addpath(fullfile(pwd, 'tests', 'utils')); savepath();"
72+
octave $OCTFLAGS --eval "addpath(fullfile(pwd, 'bids-matlab')); savepath();"
6973
7074
- name: Run tests
7175
run: |
72-
octave $OCTFLAGS --eval "runTests"
76+
octave $OCTFLAGS --eval "run_tests"
7377
cat test_report.log | grep 0
74-
bash <(curl -s https://codecov.io/bash)
75-
78+
bash <(curl -s https://codecov.io/bash)

.gitignore

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11

22
.DS_Store
3+
4+
*.nii
5+
36
*.asv
47
*.m~
58
*.mat
6-
*.xml
7-
*.log
8-
*.html
9-
*.zip
10-
*.ps
11-
12-
139

10+
<<<<<<< HEAD
1411
# files in the demo folder related to running the demo analysis
1512
# demos/roi
13+
=======
14+
atlas/visual_topography_probability_atlas/
15+
>>>>>>> 4a2a3830905dfad9b61804bf99e2941a49e4e2fa
1616

1717
# test folder and dummy data
1818

1919
# ignore content of the build folder of the doc
2020
docs/build/*
2121

2222
# ignore virtual env
23-
cpp_spm/*
2423
envs/*
2524

2625
# visual studio code stuff
2726
.vscode
2827

29-
30-
31-
32-
28+
demos/*/*.json
29+
demos/*/*/*.json
30+
demos/*/derivatives

.pre-commit-config.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
repos:
2+
3+
- repo: local
4+
5+
hooks:
6+
7+
- id: mh_style
8+
name: mh_style
9+
entry: mh_style
10+
args: [--process-slx, --fix]
11+
files: ^(.*\.(m|slx))$
12+
language: python
13+
additional_dependencies: [miss_hit_core]
14+
15+
- id: mh_metric
16+
name: mh_metric
17+
entry: mh_metric
18+
args: [--ci]
19+
files: ^(.*\.(m|slx))$
20+
language: python
21+
additional_dependencies: [miss_hit_core]
22+
23+
- id: mh_lint
24+
name: mh_lint
25+
entry: mh_lint
26+
files: ^(.*\.(m|slx))$
27+
language: python
28+
additional_dependencies: [miss_hit]
29+
30+
- repo: https://github.com/pre-commit/pre-commit-hooks
31+
rev: v4.0.1
32+
hooks:
33+
- id: trailing-whitespace
34+
- id: end-of-file-fixer
35+
- id: check-yaml
36+
- id: check-added-large-files

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ formats:
2323
python:
2424
version: 3.7
2525
install:
26-
- requirements: requirements.txt
26+
- requirements: requirements.txt

README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,96 @@
1212

1313
# CPP ROI
1414

15+
## :warning: :warning: :warning:
16+
17+
**This code is fairly unstable (:boom:) and might still change a lot.**
18+
19+
Also this code currently has 0% test coverage...
20+
21+
---
22+
23+
Set of Octave and Matlab functions, demos and scripts to help manage ROIs and to
24+
play nice with BIDS datasets.
25+
26+
Mostly volume-based and SPM centric.
27+
28+
For surface based and freesurfer ROIs see for example:
29+
30+
- https://github.com/noahbenson/neuropythy
31+
1532
## Installation
1633

34+
Download this repository and unzip the content where you want to install it.
35+
36+
Or clone the repo.
37+
38+
```bash
39+
git clone https://github.com/cpp-lln-lab/CPP_ROI.git
40+
```
41+
42+
Fire up Octave or Matlab and type
43+
44+
```matlab
45+
46+
cd CPP_ROI
47+
48+
% Th following adds the relevant folders to your path.
49+
% This needs to be done once per session (your path will not be saved)
50+
51+
initCppRoi
52+
53+
```
54+
55+
If you are using CPP_SPM, you got nothing to do as CPP_ROI is already installed
56+
as a submodule, and intitialized when running `initCppSpm`.
57+
1758
### Dependencies
1859

60+
<<<<<<< HEAD
61+
=======
62+
TODO
63+
64+
| Dependencies | Used version |
65+
| ---------------------------------------------------------- | ------------ |
66+
| [Matlab](https://www.mathworks.com/products/matlab.html) | 20??? |
67+
| or [octave](https://www.gnu.org/software/octave/) | 4.? |
68+
| [SPM12](https://www.fil.ion.ucl.ac.uk/spm/software/spm12/) | v7487 |
69+
70+
- bids-matlab (INSERT URL)
71+
72+
- currently still needs some CPP_SPM function but ultimately should be
73+
standalone: this will most likely happen when some functions are passed to
74+
bids-matlab
75+
76+
- Other dependencies (MarsBar) are shipped with CPP_ROI in the `lib` folder.
77+
78+
## Features
79+
80+
- create ROI from probability maps
81+
- create ROI filenames that "BIDS-ish"
82+
- extract ROI with a given numerical label
83+
- extract ROI from one hemisphere
84+
- breaks a cluster image into several ROIs with each their own label
85+
86+
### Atlas
87+
88+
- Can help generate ROI based on:
89+
- the SPM Anatomy toolbox (INSERT URL)
90+
- the SPM neuromorphometric atlas
91+
- neurosynth probabilty maps
92+
- the probabilistic maps of visual topography in human cortex:
93+
- https://scholar.princeton.edu/napl/resources
94+
- Wang, L., Mruczek, R. E., Arcaro, M. J., & Kastner, S. (2015).
95+
Probabilistic Maps of Visual Topography in Human Cortex. Cerebral
96+
cortex (New York, N.Y. : 1991), 25(10), 3911–3931.
97+
https://doi.org/10.1093/cercor/bhu277
98+
99+
Also includes:
100+
101+
- Yeo's 7 networks "atlas"
102+
- add REF and URL
103+
104+
>>>>>>> 4a2a3830905dfad9b61804bf99e2941a49e4e2fa
19105
20106

21107
## Contributing

0 commit comments

Comments
 (0)