From 311ee4e39f4c8789eedd647b768c8b7e562599c6 Mon Sep 17 00:00:00 2001 From: Christian Rubbert Date: Wed, 25 Oct 2023 07:40:12 +0000 Subject: [PATCH 1/4] Ignore masks and trained_models --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 83b7837..ba1d833 100644 --- a/.gitignore +++ b/.gitignore @@ -204,4 +204,7 @@ Thumbs.db .history .ionide -# End of https://www.toptal.com/developers/gitignore/api/macos,linux,python,visualstudiocode \ No newline at end of file +# End of https://www.toptal.com/developers/gitignore/api/macos,linux,python,visualstudiocode + +masks/*.nii +trained_models/*.models From a93130a0b6b69f5deaf814cdc70d38e800b3258f Mon Sep 17 00:00:00 2001 From: Christian Rubbert Date: Wed, 25 Oct 2023 07:40:21 +0000 Subject: [PATCH 2/4] Add conda/mamba requirements YAML --- README.md | 8 ++++++ requirements.yml | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 requirements.yml diff --git a/README.md b/README.md index d99676e..2b676e7 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,14 @@ pip install https://github.com/JamesRitchie/scikit-rvm/archive/master.zip pip install glmnet ``` +Alternatively, you may use Mamba to create an environment including all of the above: +``` +$ git clone https://github.com/juaml/brainage_estimation.git +$ cd brainage_estimation +$ mamba env create --file requirements.yml +$ mamba activate brainage_estimation +``` + After the set up following codes can be run as provided in the `codes` directory. 2. **Get predictions** diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..5a568dd --- /dev/null +++ b/requirements.yml @@ -0,0 +1,63 @@ +name: brainage_estimation +channels: + - conda-forge + - defaults +dependencies: + - Python==3.9.1 + - pip==23.3.1 + - asttokens==2.0.5 + - backcall==0.2.0 + - certifi==2021.10.8 + - charset-normalizer==2.0.12 + - commonmark==0.9.1 + - convertdate==2.4.0 + - cycler==0.11.0 + - decorator==5.1.1 + - executing==0.8.3 + - fonttools==4.31.2 + - numpy==1.22.3 + - idna==3.3 + - ipython==8.2.0 + - jedi==0.18.1 + - joblib==1.1.0 + - kiwisolver==1.4.2 + - lunardate==0.2.0 + - lxml==4.8.0 + - matplotlib==3.5.1 + - matplotlib-inline==0.1.3 + - natsort==8.1.0 + - nibabel==3.2.2 + - nilearn==0.9.1 + - packaging==21.3 + - pandas==1.4.2 + - parso==0.8.3 + - pexpect==4.8.0 + - pickleshare==0.7.5 + - Pillow==9.1.0 + - prompt-toolkit==3.0.29 + - ptyprocess==0.7.0 + - pure_eval==0.2.2 + - Pygments==2.11.2 + - pyluach==1.4.1 + - pyparsing==3.0.7 + - python-dateutil==2.8.2 + - pytz==2022.1 + - requests==2.27.1 + - rich==12.2.0 + - scikit-learn==1.0.2 + - scipy==1.8.0 + - seaborn==0.11.2 + - six==1.16.0 + - stack_data==0.2.0 + - threadpoolctl==3.1.0 + - traitlets==5.1.1 + - urllib3==1.26.9 + - wcwidth==0.2.5 + - workalendar==16.3.0 + - glmnet==2.2.1 + - pip: + - julearn==0.2.5 + - PyMeeus==0.5.11 + - xgboost==1.6.0 + - https://github.com/JamesRitchie/scikit-rvm/archive/b5b5f0a062b877f9cbaae219113a7e7b5a19b881.zip + - . From ea7572c1ef60b536989e350204919c9954e3317e Mon Sep 17 00:00:00 2001 From: Christian Rubbert Date: Sun, 14 Jan 2024 20:43:33 +0000 Subject: [PATCH 3/4] Add shebang --- codes/predict_age.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codes/predict_age.py b/codes/predict_age.py index 8fc1dda..7ec74f0 100755 --- a/codes/predict_age.py +++ b/codes/predict_age.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + #from read_data_mask_resampled import * from brainage import calculate_voxelwise_features from pathlib import Path From ccf247c569b65282cbb6d3ba990bb94696cb801d Mon Sep 17 00:00:00 2001 From: Christian Rubbert Date: Sun, 14 Jan 2024 20:57:57 +0000 Subject: [PATCH 4/4] Add mask and trained model --- .gitattributes | 2 ++ .gitignore | 3 --- .lfsconfig | 2 ++ masks/brainmask_12.8.nii | 3 +++ trained_models/1_4sites.S4_R4_pca.gauss.models | 3 +++ 5 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .gitattributes create mode 100644 .lfsconfig create mode 100644 masks/brainmask_12.8.nii create mode 100644 trained_models/1_4sites.S4_R4_pca.gauss.models diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7734f22 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +masks/*.nii filter=lfs diff=lfs merge=lfs -text +trained_models/*.models filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore index ba1d833..a74cb36 100644 --- a/.gitignore +++ b/.gitignore @@ -205,6 +205,3 @@ Thumbs.db .ionide # End of https://www.toptal.com/developers/gitignore/api/macos,linux,python,visualstudiocode - -masks/*.nii -trained_models/*.models diff --git a/.lfsconfig b/.lfsconfig new file mode 100644 index 0000000..1f23597 --- /dev/null +++ b/.lfsconfig @@ -0,0 +1,2 @@ +[lfs] + url = https://AInII@dev.azure.com/AInII/brainage_estimation/_git/brainage_estimation.git/info/lfs diff --git a/masks/brainmask_12.8.nii b/masks/brainmask_12.8.nii new file mode 100644 index 0000000..9a07e55 --- /dev/null +++ b/masks/brainmask_12.8.nii @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a502a410ef43fd7505bb55c3fc70068aef0cd28ad2587ac6b1025aaeb4feb163 +size 902981 diff --git a/trained_models/1_4sites.S4_R4_pca.gauss.models b/trained_models/1_4sites.S4_R4_pca.gauss.models new file mode 100644 index 0000000..92638bb --- /dev/null +++ b/trained_models/1_4sites.S4_R4_pca.gauss.models @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:833412260699c17dad4385388e5386534b2715997879280e9f81e92997a66ef4 +size 841713501