8000 7th tutorial - Nilearn multilevel (two-level) glm by yibeichan · Pull Request #34 · nipype/pydra-tutorial · GitHub
[go: up one dir, main page]

Skip to content

7th tutorial - Nilearn multilevel (two-level) glm #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 65 commits into from
Oct 7, 2022
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
57b27ed
rename the sixth tutorial
yibeichan Jul 27, 2022
02a852d
update 6th tutorial title
yibeichan Jul 27, 2022
0f6652c
create 7th tutorial
yibeichan Jul 27, 2022
4b4ed06
add datalad
yibeichan Jul 27, 2022
4ca4477
add 7th tutorial
yibeichan Aug 9, 2022
435d771
add 7th tutorial
yibeichan Aug 9, 2022
45b849f
fix typo
yibeichan Aug 11, 2022
bf37cd3
add test notebook
yibeichan Aug 11, 2022
b6f9fb0
testing
yibeichan Aug 12, 2022
e6c8db7
testing
yibeichan Aug 16, 2022
2c7e5fc
test workflow
yibeichan Aug 20, 2022
58417ba
update tests
yibeichan Aug 20, 2022
3e5b0de
add correct notebook
yibeichan Sep 1, 2022
9a2e9af
add correct notebook
yibeichan Sep 1, 2022
7363d70
add correct notebook
yibeichan Sep 1, 2022
8d0ef32
improve the workflow
yibeichan Sep 1, 2022
3c142c1
fix minor errors
yibeichan Sep 1, 2022
43f31f0
fix subj_id index issue
yibeichan Sep 1, 2022
8000
2ed17a7
improve imports
yibeichan Sep 8, 2022
26e6116
fix minors in 7th nb
yibeichan Sep 8, 2022
5fca509
update with nipype:master
yibeichan Sep 8, 2022
8fcb0b7
update with nipype master
yibeichan Sep 8, 2022
e43f20e
add git annex init
yibeichan Sep 9, 2022
e2472f7
fix minor errors
yibeichan Sep 9, 2022
a5d08bc
Merge branch 'master' into nilearn-glm
yibeichan Sep 9, 2022
01d29f7
fix typos
yibeichan Sep 9, 2022
5345b12
Merge branch 'nilearn-glm' of github.com:yibeichan/pydra-tutorial int…
yibeichan Sep 9, 2022
fdb1911
change git actions back
yibeichan Sep 9, 2022
ccd6f94
add datalad wtf
yibeichan Sep 9, 2022
271f136
install datalad from conda
yibeichan Sep 9, 2022
04c2a76
add gh creds
yibeichan Sep 9, 2022
ccc218f
add datald debug env
yibeichan Sep 9, 2022
7316e16
change it back
yibeichan Sep 9, 2022
a28b4fc
change nproc=2
yibeichan Sep 9, 2022
3a5ad84
change input from list of object to list of path
yibeichan Sep 9, 2022
d93291f
add assert for testing
yibeichan Sep 9, 2022
c8943df
add assert for testing
yibeichan Sep 9, 2022
03e4469
remove assert
yibeichan Sep 10, 2022
f8022b0
change nproc=2
yibeichan Sep 12, 2022
8ae8d51
change nproc=1
yibeichan Sep 12, 2022
4f557e0
add one test cell
yibeichan Sep 13, 2022
b00b610
add one test cell
yibeichan Sep 13, 2022
d23c837
remove the testing cell
yibeichan Sep 13, 2022
f73244c
remove python 3.7
yibeichan Sep 14, 2022
1f23980
reove git-annext
yibeichan Sep 14, 2022
82c843a
minor changes
yibeichan Sep 14, 2022
5f704a8
remove gunzip
yibeichan Sep 14, 2022
5b831d7
add gunzip
yibeichan Sep 14, 2022
e047b62
remove gunzip
yibeichan Sep 14, 2022
c337f9a
change n_subj=2
yibeichan Sep 14, 2022
80e4579
last try before I change the 1st level GLM
yibeichan Sep 15, 2022
4149c80
rewrite the firstlevel GLM
yibeichan Sep 16, 2022
abb2ba6
minor updates
yibeichan Sep 16, 2022
6dc283e
change n_subj=2
yibeichan Sep 21, 2022
0b95914
downsample before firstmodel
yibeichan Sep 28, 2022
e4a9a54
nproc=1
yibeichan Sep 28, 2022
3802670
redo subsample
yibeichan Sep 28, 2022
0bd5641
nsubj=5
yibeichan Sep 29, 2022
4d856ad
add exercises
yibeichan Sep 29, 2022
a743e2e
hide outputs
yibeichan Sep 29, 2022
e6085b0
rename jbook
yibeichan Sep 29, 2022
2a08fba
make the tutorial prettier
yibeichan Sep 30, 2022
f2177b0
fix typos
yibeichan Sep 30, 2022
fc2fba5
fix typos
yibeichan Sep 30, 2022
d7f3d75
add missing import package
yibeichan Sep 30, 2022
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
Prev Previous commit
Next Next commit
remove gunzip
  • Loading branch information
yibeichan committed Sep 14, 2022
8000
commit e047b620bcc13066435ce58fa3832fabb586206b
12 changes: 7 additions & 5 deletions notebooks/7_twolevel_glm_nilearn.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,9 @@ def firstlevel_estimation(subj_id, subj_imgs, subj_masks, smoothing_fwhm, design
mask = math_img('img > 0', img=mean_mask)
print('Fit the firstlevel model...')
# fit the (fixed-effects) firstlevel model with three runs simultaneously
first_level_model = FirstLevelModel(mask_img=mask, smoothing_fwhm=smoothing_fwhm)
first_level_model = FirstLevelModel(mask_img=mask, smoothing_fwhm=smoothing_fwhm, n_job=-1)
dms = [pd.read_csv(pth) for pth in design_matrices]
for img in subj_imgs:
gunzip(img)
subj_imgs_unzip = [img.split('.gz')[0] for img in subj_imgs]
first_level_model = first_level_model.fit(subj_imgs_unzip, design_matrices=dms)
first_level_model = first_level_model.fit(subj_imgs, design_matrices=dms)
print('Computing contrasts...')
z_map_path_dict = dict.fromkeys(contrasts.keys())
for index, (contrast_id, contrast_val) in enumerate(contrasts.items()):
Expand All @@ -269,6 +266,11 @@ def firstlevel_estimation(subj_id, subj_imgs, subj_masks, smoothing_fwhm, design
### Create the first-level GLM workflow

```{code-cell} ipython3
---
jupyter:
outputs_hidden: true
tags: []
---
# initiate the first-level GLM workflow
wf_firstlevel = Workflow(
name='wf_firstlevel',
Expand Down
0