Skip to content

Commit f559bfc

Browse files
committed
Merge branch 'main' into dev
2 parents bc3b01a + 2113f33 commit f559bfc

File tree

440 files changed

+3047
-2422
lines changed

Some content is hidden

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

440 files changed

+3047
-2422
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: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
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
# * * * * *
1616

1717
on:
1818
push:
1919
branches:
20-
- dev
20+
- '*'
2121
pull_request:
2222
branches: '*'
2323
schedule:
@@ -39,7 +39,7 @@ jobs:
3939
sudo apt-get -y install octave liboctave-dev
4040
sudo apt-get -y install nodejs npm
4141
42-
- name: Clone cpp_spm
42+
- name: Clone cpp_spm
4343
uses: actions/checkout@v2
4444
with:
4545
submodules: true
@@ -58,20 +58,19 @@ jobs:
5858
git clone https://github.com/MOxUnit/MOxUnit.git --depth 1
5959
make -C MOxUnit install
6060
git clone https://github.com/MOcov/MOcov.git --depth 1
61-
make -C MOcov install
61+
make -C MOcov install
6262
6363
- name: Add bids-matlab
64-
run: |
65-
git clone https://github.com/bids-standard/bids-matlab.git --depth 1
66-
64+
run: |
65+
git clone https://github.com/bids-standard/bids-matlab.git --depth 1
66+
6767
- name: Update octave path
6868
run: |
6969
octave $OCTFLAGS --eval "initCppRoi; savepath();"
70-
octave $OCTFLAGS --eval "addpath(fullfile(pwd, 'bids-matlab')); savepath();"
70+
octave $OCTFLAGS --eval "addpath(fullfile(pwd, 'bids-matlab')); savepath();"
7171
7272
- name: Run tests
7373
run: |
7474
octave $OCTFLAGS --eval "run_tests"
7575
cat test_report.log | grep 0
76-
bash <(curl -s https://codecov.io/bash)
77-
76+
bash <(curl -s https://codecov.io/bash)

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,3 @@ envs/*
2323
demos/*/*.json
2424
demos/*/*/*.json
2525
demos/*/derivatives
26-
27-
28-

.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: v2.0.0
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ TODO
8585

8686
- Can help generate ROI based on:
8787
- the SPM Anatomy toolbox (INSERT URL)
88+
- the SPM neuromorphometric atlas
8889
- neurosynth probabilty maps
8990
- the probabilistic maps of visual topography in human cortex:
9091
- https://scholar.princeton.edu/napl/resources
@@ -98,6 +99,8 @@ Also includes:
9899
- Yeo's 7 networks "atlas"
99100
- add REF and URL
100101

102+
103+
101104
## Contributing
102105

103106
## Contributors
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
label,ROI
2+
4,3rd Ventricle
3+
11,4th Ventricle
4+
23,Right Accumbens Area
5+
30,Left Accumbens Area
6+
31,Right Amygdala
7+
32,Left Amygdala
8+
35,Brain Stem
9+
36,Right Caudate
10+
37,Left Caudate
11+
38,Right Cerebellum Exterior
12+
39,Left Cerebellum Exterior
13+
40,Right Cerebellum White Matter
14+
41,Left Cerebellum White Matter
15+
44,Right Cerebral White Matter
16+
45,Left Cerebral White Matter
17+
46,CSF
18+
47,Right Hippocampus
19+
48,Left Hippocampus
20+
49,Right Inf Lat Vent
21+
50,Left Inf Lat Vent
22+
51,Right Lateral Ventricle
23+
52,Left Lateral Ventricle
24+
55,Right Pallidum
25+
56,Left Pallidum
26+
57,Right Putamen
27+
58,Left Putamen
28+
59,Right Thalamus Proper
29+
60,Left Thalamus Proper
30+
61,Right Ventral DC
31+
62,Left Ventral DC
32+
63,Right vessel
33+
64,Left vessel
34+
69,Optic Chiasm
35+
71,Cerebellar Vermal Lobules I-V
36+
72,Cerebellar Vermal Lobules VI-VII
37+
73,Cerebellar Vermal Lobules VIII-X
38+
75,Left Basal Forebrain
39+
76,Right Basal Forebrain
40+
100,Right ACgG anterior cingulate gyrus
41+
101,Left ACgG anterior cingulate gyrus
42+
102,Right AIns anterior insula
43+
103,Left AIns anterior insula
44+
104,Right AOrG anterior orbital gyrus
45+
105,Left AOrG anterior orbital gyrus
46+
106,Right AnG angular gyrus
47+
107,Left AnG angular gyrus
48+
108,Right Calc calcarine cortex
49+
109,Left Calc calcarine cortex
50+
112,Right CO central operculum
51+
113,Left CO central operculum
52+
114,Right Cun cuneus
53+
115,Left Cun cuneus
54+
116,Right Ent entorhinal area
55+
117,Left Ent entorhinal area
56+
118,Right FO frontal operculum
57+
119,Left FO frontal operculum
58+
120,Right FRP frontal pole
59+
121,Left FRP frontal pole
60+
122,Right FuG fusiform gyrus
61+
123,Left FuG fusiform gyrus
62+
124,Right GRe gyrus rectus
63+
125,Left GRe gyrus rectus
64+
128,Right IOG inferior occipital gyrus
65+
129,Left IOG inferior occipital gyrus
66+
132,Right ITG inferior temporal gyrus
67+
133,Left ITG inferior temporal gyrus
68+
134,Right LiG lingual gyrus
69+
135,Left LiG lingual gyrus
70+
136,Right LOrG lateral orbital gyrus
71+
137,Left LOrG lateral orbital gyrus
72+
138,Right MCgG middle cingulate gyrus
73+
139,Left MCgG middle cingulate gyrus
74+
140,Right MFC medial frontal cortex
75+
141,Left MFC medial frontal cortex
76+
142,Right MFG middle frontal gyrus
77+
143,Left MFG middle frontal gyrus
78+
144,Right MOG middle occipital gyrus
79+
145,Left MOG middle occipital gyrus
80+
146,Right MOrG medial orbital gyrus
81+
147,Left MOrG medial orbital gyrus
82+
148,Right MPoG postcentral gyrus medial segment
83+
149,Left MPoG postcentral gyrus medial segment
84+
150,Right MPrG precentral gyrus medial segment
85+
151,Left MPrG precentral gyrus medial segment
86+
152,Right MSFG superior frontal gyrus medial segment
87+
153,Left MSFG superior frontal gyrus medial segment
88+
154,Right MTG middle temporal gyrus
89+
155,Left MTG middle temporal gyrus
90+
156,Right OCP occipital pole
91+
157,Left OCP occipital pole
92+
160,Right OFuG occipital fusiform gyrus
93+
161,Left OFuG occipital fusiform gyrus
94+
162,Right OpIFG opercular part of the inferior frontal gyrus
95+
163,Left OpIFG opercular part of the inferior frontal gyrus
96+
164,Right OrIFG orbital part of the inferior frontal gyrus
97+
165,Left OrIFG orbital part of the inferior frontal gyrus
98+
166,Right PCgG posterior cingulate gyrus
99+
167,Left PCgG posterior cingulate gyrus
100+
168,Right PCu precuneus
101+
169,Left PCu precuneus
102+
170,Right PHG parahippocampal gyrus
103+
171,Left PHG parahippocampal gyrus
104+
172,Right PIns posterior insula
105+
173,Left PIns posterior insula
106+
174,Right PO parietal operculum
107+
175,Left PO parietal operculum
108+
176,Right PoG postcentral gyrus
109+
177,Left PoG postcentral gyrus
110+
178,Right POrG posterior orbital gyrus
111+
179,Left POrG posterior orbital gyrus
112+
180,Right PP planum polare
113+
181,Left PP planum polare
114+
182,Right PrG precentral gyrus
115+
183,Left PrG precentral gyrus
116+
184,Right PT planum temporale
117+
185,Left PT planum temporale
118+
186,Right SCA subcallosal area
119+
187,Left SCA subcallosal area
120+
190,Right SFG superior frontal gyrus
121+
191,Left SFG superior frontal gyrus
122+
192,Right SMC supplementary motor cortex
123+
193,Left SMC supplementary motor cortex
124+
194,Right SMG supramarginal gyrus
125+
195,Left SMG supramarginal gyrus
126+
196,Right SOG superior occipital gyrus
127+
197,Left SOG superior occipital gyrus
128+
198,Right SPL superior parietal lobule
129+
199,Left SPL superior parietal lobule
130+
200,Right STG superior temporal gyrus
131+
201,Left STG superior temporal gyrus
132+
202,Right TMP temporal pole
133+
203,Left TMP temporal pole
134+
204,Right TrIFG triangular part of the inferior frontal gyrus
135+
205,Left TrIFG triangular part of the inferior frontal gyrus
136+
206,Right TTG transverse temporal gyrus
137+
207,Left TTG transverse temporal gyrus

demos/atlas/create_roi_from_atlas.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
spm_mkdir(opt.roi.dir);
88

9-
hemi = {'lh', 'rh'};
9+
hemi = {'L', 'H'};
1010

1111
for iHemi = 1:numel(hemi)
1212

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
% (C) Copyright 2021 CPP ROI developers
22

3+
% small demo to show how to create and rename ROIs that come from neurosynth
4+
% and how to only keep the data from one hemisphere of an image.
5+
36
run ../../initCppRoi;
47

58
gunzip(fullfile('inputs', '*.gz'));
@@ -9,15 +12,15 @@
912
roiImage = thresholdToMask(zMap, 5);
1013

1114
% keep only one hemisphere and appends a 'hs--[hemisphere label]'
12-
leftRoiImage = keepHemisphere(roiImage, 'lh');
13-
rightRoiImage = keepHemisphere(roiImage, 'rh');
15+
leftRoiImage = keepHemisphere(roiImage, 'L');
16+
rightRoiImage = keepHemisphere(roiImage, 'R');
1417

1518
% change the label entity and remove the hs one
1619
leftRoiImage = renameFile(leftRoiImage, ...
1720
struct('entities', struct( ...
1821
'label', 'ns left motion', ...
19-
'hs', '')));
22+
'hemi', '')));
2023
rightRoiImage = renameFile(rightRoiImage, ...
2124
struct('entities', struct( ...
2225
'label', 'ns right motion', ...
23-
'hs', '')));
26+
'hemi', '')));

0 commit comments

Comments
 (0)