Skip to content

Commit

Permalink
new branch for cleaner PR (#269)
Browse files Browse the repository at this point in the history
* this branch moves templates and atlases to https://osf.io/v8acf/

* new branch for cleaner PR

* downloads rule

* only one allowable atlas input. This adds simplicity, and multiple are almost never used

* removed multiple atlases tester

---------

Co-authored-by: Jordan DeKraker - B. Bernhardt Lab <[email protected]>
  • Loading branch information
2 people authored and kaitj committed Nov 16, 2023
1 parent ccf04a6 commit 6df9888
Show file tree
Hide file tree
Showing 106 changed files with 244 additions and 1,107 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/python-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ jobs:
- name: Test modality T1w with freesurfer atlas
run: |
poetry run hippunfold test_data/bids_T1w test_out participant -np --modality T1w --atlas freesurfer
- name: Test modality T1w with bigbrain and freesurfer atlas
run: |
poetry run hippunfold test_data/bids_T1w test_out participant -np --modality T1w --atlas bigbrain freesurfer
Expand Down
8 changes: 0 additions & 8 deletions hippunfold/config/nnunet_model_urls.yml

This file was deleted.

119 changes: 65 additions & 54 deletions hippunfold/config/snakebids.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,7 @@ parse_args:
- 'magdeburg'
- 'freesurfer'
- 'multihist7'
default:
- 'multihist7'
nargs: '+'
default: 'multihist7'
help: 'Select the atlas (unfolded space) to use for subfield labels. (default: %(default)s)'

--no_unfolded_reg:
Expand Down Expand Up @@ -352,7 +350,6 @@ cifti_metric_types:




#--- workflow specific configuration --

singularity:
Expand All @@ -363,67 +360,66 @@ template: CITI168

template_files:
CITI168:
T1w: resources/templates-3d/CITI168/T1w_head_700um.nii.gz
T2w: resources/templates-3d/CITI168/T2w_head_700um.nii.gz
xfm_corobl: resources/templates-3d/CITI168/CoronalOblique_rigid.txt
crop_ref: resources/templates-3d/CITI168/T2w_300umCoronalOblique_hemi-{hemi}.nii.gz
crop_refT1w: resources/templates-3d/CITI168/T1w_300umCoronalOblique_hemi-{hemi}.nii.gz
Mask_crop: resources/templates-3d/CITI168/Mask_300umCoronalOblique_hemi-{hemi}.nii.gz
T1w: CITI168/T1w_head_700um.nii.gz
T2w: CITI168/T2w_head_700um.nii.gz
xfm_corobl: CITI168/CoronalOblique_rigid.txt
crop_ref: CITI168/T2w_300umCoronalOblique_hemi-{hemi}.nii.gz
crop_refT1w: CITI168/T1w_300umCoronalOblique_hemi-{hemi}.nii.gz
Mask_crop: CITI168/Mask_300umCoronalOblique_hemi-{hemi}.nii.gz
dHCP:
T1w: resources/tpl-dHCP/cohort-1/tpl-dHCP_cohort-1_res-1_T1w.nii.gz
T2w: resources/tpl-dHCP/cohort-1/tpl-dHCP_cohort-1_res-1_T2w.nii.gz
xfm_corobl: resources/tpl-dHCP/cohort-1/tpl-dHCP_cohort-1_to-corobl_affine.txt
crop_ref: resources/CITI168/T2w_300umCoronalOblique_hemi-{hemi}.nii.gz
crop_refT1w: resources/CITI168/T1w_300umCoronalOblique_hemi-{hemi}.nii.gz
Mask_crop: resources/CITI168/Mask_300umCoronalOblique_hemi-{hemi}.nii.gz
T1w: dHCP/cohort-1/tpl-dHCP_cohort-1_res-1_T1w.nii.gz
xfm_corobl: dHCP/cohort-1/tpl-dHCP_cohort-1_to-corobl_affine.txt
crop_ref: CITI168/T2w_300umCoronalOblique_hemi-{hemi}.nii.gz
crop_refT1w: CITI168/T1w_300umCoronalOblique_hemi-{hemi}.nii.gz
Mask_crop: CITI168/Mask_300umCoronalOblique_hemi-{hemi}.nii.gz
upenn:
dseg: resources/templates-3d/tpl-upenn/tpl-upenn_desc-hipptissue_dseg.nii.gz
coords: resources/templates-3d/tpl-upenn/tpl-upenn_dir-{dir}_label-{autotop}_coords.nii.gz
dseg: upenn/tpl-upenn_desc-hipptissue_dseg.nii.gz
coords: upenn/tpl-upenn_dir-{dir}_label-{autotop}_coords.nii.gz
MBMv2:
T1w: resources/templates-3d/tpl-MBMv2/Template_sym_MTR_80um.nii.gz
T2w: resources/templates-3d/tpl-MBMv2/Template_sym_T2_80um.nii.gz
xfm_corobl: resources/templates-3d/tpl-MBMv2/tpl-MBMv2_from-native_to-corobl_type-itk_affine.txt
crop_ref: resources/templates-3d/tpl-MBMv2/tpl-MBMv2_hemi-{hemi}_space-corobl_T2w.nii.gz
crop_refT1w: resources/templates-3d/tpl-MBMv2/tpl-MBMv2_hemi-{hemi}_space-corobl_MTR.nii.gz
Mask_crop: resources/templates-3d/tpl-MBMv2/tpl-MBMv2_hemi-{hemi}_space-corobl_desc-hipp_mask.nii.gz
dseg: resources/templates-3d/tpl-MBMv2/tpl-MBMv2_hemi-R_space-corobl_desc-tissuemanual_dseg.nii.gz
coords: resources/templates-3d/tpl-MBMv2/tpl-MBMv2_dir-{dir}_hemi-R_space-corobl_label-{autotop}_desc-laplace_coords.nii.gz
T1w: MBMv2/Template_sym_MTR_80um.nii.gz
T2w: MBMv2/Template_sym_T2_80um.nii.gz
xfm_corobl: MBMv2/tpl-MBMv2_from-native_to-corobl_type-itk_affine.txt
crop_ref: MBMv2/tpl-MBMv2_hemi-{hemi}_space-corobl_T2w.nii.gz
crop_refT1w: MBMv2/tpl-MBMv2_hemi-{hemi}_space-corobl_MTR.nii.gz
Mask_crop: MBMv2/tpl-MBMv2_hemi-{hemi}_space-corobl_desc-hipp_mask.nii.gz
dseg: MBMv2/tpl-MBMv2_hemi-R_space-corobl_desc-tissuemanual_dseg.nii.gz
coords: MBMv2/tpl-MBMv2_dir-{dir}_hemi-R_space-corobl_label-{autotop}_desc-laplace_coords.nii.gz
MBMv3:
T1w: resources/templates-3d/tpl-MBMv3/tpl-MBMv3_T1w.nii.gz
T2w: resources/templates-3d/tpl-MBMv3/tpl-MBMv3_T2w.nii.gz
xfm_corobl: resources/templates-3d/tpl-MBMv3/tpl-MBMv3_from-native_to-corobl_type-itk_affine.txt
crop_ref: resources/templates-3d/tpl-MBMv3/tpl-MBMv3_hemi-{hemi}_space-corobl_T2w.nii.gz
crop_refT1w: resources/templates-3d/tpl-MBMv3/tpl-MBMv3_hemi-{hemi}_space-corobl_T1w.nii.gz
Mask_crop: resources/templates-3d/tpl-MBMv3/tpl-MBMv3_hemi-{hemi}_space-corobl_desc-hipp_mask.nii.gz
dseg: resources/templates-3d/tpl-MBMv3/tpl-MBMv3_hemi-R_space-corobl_desc-tissue_dseg.nii.gz
coords: resources/templates-3d/tpl-MBMv3/tpl-MBMv3_dir-{dir}_hemi-R_space-corobl_label-{autotop}_desc-laplace_coords.nii.gz
T1w: MBMv3/tpl-MBMv3_T1w.nii.gz
T2w: MBMv3/tpl-MBMv3_T2w.nii.gz
xfm_corobl: MBMv3/tpl-MBMv3_from-native_to-corobl_type-itk_affine.txt
crop_ref: MBMv3/tpl-MBMv3_hemi-{hemi}_space-corobl_T2w.nii.gz
crop_refT1w: MBMv3/tpl-MBMv3_hemi-{hemi}_space-corobl_T1w.nii.gz
Mask_crop: MBMv3/tpl-MBMv3_hemi-{hemi}_space-corobl_desc-hipp_mask.nii.gz
dseg: MBMv3/tpl-MBMv3_hemi-R_space-corobl_desc-tissue_dseg.nii.gz
coords: MBMv3/tpl-MBMv3_dir-{dir}_hemi-R_space-corobl_label-{autotop}_desc-laplace_coords.nii.gz
upenn:
dseg: resources/templates-3d/tpl-upenn/tpl-upenn_desc-hipptissue_dseg.nii.gz
coords: resources/templates-3d/tpl-upenn/tpl-upenn_dir-{dir}_label-{autotop}_coords.nii.gz

T1w: upenn/tpl-upenn_desc-hipptissue_dseg.nii.gz
dseg: upenn/tpl-upenn_desc-hipptissue_dseg.nii.gz
coords: upenn/tpl-upenn_dir-{dir}_label-{autotop}_coords.nii.gz




atlas:
- multihist7
atlas: multihist7

atlas_files:
multihist7:
label_nii: resources/atlases-unfolded/multihist7/sub-maxprob_label-hipp_desc-manualsubfieldsunfoldaligned_dseg.nii.gz
label_list: resources/atlases-unfolded/multihist7/labellist.txt
thick: resources/atlases-unfolded/multihist7/thickness.nii.gz
curv: resources/atlases-unfolded/multihist7/curvature.nii.gz
gyr: resources/atlases-unfolded/multihist7/gyrification.nii.gz
label_nii: multihist7/sub-maxprob_label-hipp_desc-manualsubfieldsunfoldaligned_dseg.nii.gz
label_list: multihist7/labellist.txt
subfields_list: multihist7/desc-subfields_atlas-multihist7_dseg.tsv
thick: multihist7/thickness.nii.gz
curv: multihist7/curvature.nii.gz
gyr: multihist7/gyrification.nii.gz
bigbrain:
label_nii: resources/atlases-unfolded/bigbrain/sub-bigbrain_hemi-{hemi}_label-hipp_desc-manualsubfields_dseg.nii.gz
label_list: resources/atlases-unfolded/bigbrain/sub-bigbrain_labellist.txt
label_nii: bigbrain/sub-bigbrain_hemi-{hemi}_label-hipp_desc-manualsubfields_dseg.nii.gz
subfields_list: multihist7/desc-subfields_atlas-bigbrain_dseg.tsv
label_list: bigbrain/sub-bigbrain_labellist.txt
magdeburg:
label_nii: resources/atlases-unfolded/magdeburg/sub-all_hemi-{hemi}_label-hipp_desc-manualsubfields_maxprob.nii.gz
label_list: resources/atlases-unfolded/magdeburg/magdeburg_labellist.txt
label_nii: magdeburg/sub-all_hemi-{hemi}_label-hipp_desc-manualsubfields_maxprob.nii.gz
subfields_list: multihist7/desc-subfields_atlas-magdeburg_dseg.tsv
label_list: magdeburg/magdeburg_labellist.txt
freesurfer:
label_nii: resources/atlases-unfolded/freesurfer/sub-all_hemi-{hemi}_space-unfold_label-hipp_desc-freesurfersubfields_dseg.nii.gz
label_list: resources/atlases-unfolded/freesurfer/freesurfer_labellist.txt
label_nii: freesurfer/sub-all_hemi-{hemi}_space-unfold_label-hipp_desc-freesurfersubfields_dseg.nii.gz
subfields_list: multihist7/desc-subfields_atlas-freesurfer_dseg.tsv
label_list: freesurfer/freesurfer_labellist.txt


inject_template: upenn
Expand Down Expand Up @@ -462,7 +458,7 @@ modality: T2w



#these will be downloaded to ~/.cache/hippunfold
#these will be downloaded to ~/.cache/hippunfold or $HIPPUNFOLD_CACHE_DIR
nnunet_model:
T1w: 'zenodo.org/record/4508747/files/trained_model.3d_fullres.Task101_hcp1200_T1w.nnUNetTrainerV2.model_best.tar'
T2w: 'zenodo.org/record/4508747/files/trained_model.3d_fullres.Task102_hcp1200_T2w.nnUNetTrainerV2.model_best.tar'
Expand All @@ -473,6 +469,21 @@ nnunet_model:
synthseg_v0.1: 'zenodo.org/record/8184230/files/trained_model.3d_fullres.Task102_synsegGenDetailed.nnUNetTrainerV2.model_best.tar'
synthseg_v0.2: 'zenodo.org/record/8184230/files/trained_model.3d_fullres.Task203_synthseg.nnUNetTrainerV2.model_best.tar'

atlas_links_osf:
multihist7: 'files.ca-1.osf.io/v1/resources/v8acf/providers/osfstorage/65395b782827451220b86dd8/?zip='
bigbrain: 'files.ca-1.osf.io/v1/resources/v8acf/providers/osfstorage/65395b8b13d27b123094c96f/?zip='
magdeburg: 'files.ca-1.osf.io/v1/resources/v8acf/providers/osfstorage/65395b8013d27b122f94c938/?zip='
freesurfer: 'files.ca-1.osf.io/v1/resources/v8acf/providers/osfstorage/65395b8513d27b123094c96a/?zip='
#to get hash, see https://github.com/CenterForOpenScience/osf.io/issues/8256#issuecomment-379833911

template_links_osf:
CITI168: 'files.ca-1.osf.io/v1/resources/v8acf/providers/osfstorage/65395bf0282745121fb86a93/?zip='
dHCP: 'files.ca-1.osf.io/v1/resources/v8acf/providers/osfstorage/65395bff13d27b123094c9b4/?zip='
MBMv2: 'files.ca-1.osf.io/v1/resources/v8acf/providers/osfstorage/65395c0887852d133ca597dd/?zip='
MBMv3: 'files.ca-1.osf.io/v1/resources/v8acf/providers/osfstorage/65395c0e8a28b11240ffc6e9/?zip='
upenn: 'files.ca-1.osf.io/v1/resources/v8acf/providers/osfstorage/65395c1613d27b122a94ca09/?zip='
#to get hash, see https://github.com/CenterForOpenScience/osf.io/issues/8256#issuecomment-379833911

crop_native_box: '256x256x256vox'
crop_native_res: '0.2x0.2x0.2mm'

Expand Down
84 changes: 0 additions & 84 deletions hippunfold/download_models.py

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

6 changes: 0 additions & 6 deletions hippunfold/resources/atlases-unfolded/freesurfer/README.md

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6df9888

Please sign in to comment.