miykael / workshop_pybrain

BSD 3-Clause "New" or "Revised" License
55 stars 42 forks source link

update nistats, pybids & nilearn notebooks #7

Closed PeerHerholz closed 3 years ago

PeerHerholz commented 3 years ago

Ahoi hoi,

after a good while I managed to get all things running. The dataset really gave me a hard time, that is...I was stupid. I updated the nistats notebook to the current master branch of nilearn to showcase folks the new functionality of the soon-to-be-out release. I included model assessments, 2nd level models and automated analyses from BIDS datasets as new content. To make this work I had to change the dataset structure of ds000114 a bit, as it wasn't quite BIDS conform. Should work now. I didn't add explanations, as I wanted to ask you to test it first. I also removed all subjects except '01', '02' and '03' to make the analyses work and save space. I think the other notebooks should be affected that. However, we should of course check that. The current commands are included in the Dockerfile. I did it line by line, as it was late and I'm not good at these things...

LMKWYT.

miykael commented 3 years ago

As a note, line by line in Docker is fine. But each new RUN or COPY or USER command in docker will create a new layer. I.e. new layer to upload/download etc. So to create an Dockerfile I would propose as many lines as possible to better understand where it crashes. But after that concatenating them with && helps to create compact layers.

So, instead of...

RUN bash -c 'mv /data/ds000114/derivatives/fmriprep/sub-01/ses-test/func/sub-01_ses-test_task-fingerfootlips_bold_space-mni152nlin2009casym_preproc.nii.gz /data/ds000114/derivatives/fmriprep/sub-01/ses-test/func/sub-01_ses-test_task-fingerfootlips_space-MNI152nlin2009casym_desc-preproc_bold.nii.gz'

RUN bash -c 'mv /data/ds000114/derivatives/fmriprep/sub-02/ses-test/func/sub-02_ses-test_task-fingerfootlips_bold_space-mni152nlin2009casym_preproc.nii.gz /data/ds000114/derivatives/fmriprep/sub-02/ses-test/func/sub-02_ses-test_task-fingerfootlips_space-MNI152nlin2009casym_desc-preproc_bold.nii.gz'

RUN bash -c 'mv /data/ds000114/derivatives/fmriprep/sub-03/ses-test/func/sub-03_ses-test_task-fingerfootlips_bold_space-mni152nlin2009casym_preproc.nii.gz /data/ds000114/derivatives/fmriprep/sub-03/ses-test/func/sub-03_ses-test_task-fingerfootlips_space-MNI152nlin2009casym_desc-preproc_bold.nii.gz'

rather do...

RUN bash -c 'mv /data/ds000114/derivatives/fmriprep/sub-01/ses-test/func/sub-01_ses-test_task-fingerfootlips_bold_space-mni152nlin2009casym_preproc.nii.gz /data/ds000114/derivatives/fmriprep/sub-01/ses-test/func/sub-01_ses-test_task-fingerfootlips_space-MNI152nlin2009casym_desc-preproc_bold.nii.gz \
             && mv /data/ds000114/derivatives/fmriprep/sub-02/ses-test/func/sub-02_ses-test_task-fingerfootlips_bold_space-mni152nlin2009casym_preproc.nii.gz /data/ds000114/derivatives/fmriprep/sub-02/ses-test/func/sub-02_ses-test_task-fingerfootlips_space-MNI152nlin2009casym_desc-preproc_bold.nii.gz \
             && mv /data/ds000114/derivatives/fmriprep/sub-03/ses-test/func/sub-03_ses-test_task-fingerfootlips_bold_space-mni152nlin2009casym_preproc.nii.gz /data/ds000114/derivatives/fmriprep/sub-03/ses-test/func/sub-03_ses-test_task-fingerfootlips_space-MNI152nlin2009casym_desc-preproc_bold.nii.gz \
miykael commented 3 years ago

That's just a FYI, I'm cleaning and testing it on my side and will update later.

miykael commented 3 years ago

The new dockerfile layout was commited with https://github.com/miykael/workshop_pybrain/commit/bf82dedd8a764021ab573ddbfb8d87d625d8300e. I've also fixed another tensorflow and scipy version, plus adding subject 07.