Coder Social home page Coder Social logo

c-pac_templates's People

Contributors

a3sha2 avatar amygutierrez avatar anibalsolon avatar cindeem avatar ganesharvapalli avatar jarrodmillman avatar jovo avatar lawreros avatar pmyers16 avatar sgiavasis avatar shnizzedy avatar tergeorge avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

shnizzedy

c-pac_templates's Issues

✨ Use BIDS standard template identifiers for templates

Related problem

Currently template-space files derived from C-PAC are labeled space-template which does not differentiate different-template-spaced files from one another.

Proposed feature

Use standard template identifiers like space-MNI152NLin2009

Acceptance criteria

Alternatives

No response

Additional context

Related:

🚚 Template organization

Describe the bug

The templates used in c-pac are currently pulled from a variety of sources, several of which are non-canonical. This should be resolved.

To reproduce

No response

Expected behavior

All templates pulled from canonical sources into a common location, which is then pulled directly into C-PAC.

Acceptance criteria

Clear provenance on where all templates/data sources reside and came from.

Screenshots

No response

C-PAC version

No response

Container platform

No response

Docker and/or Singularity version(s)

No response

Additional context

No response

🚚 Move C-PAC templates from C-PAC into this repository

Related problem

C-PAC installs a bunch of templates in a bunch of places:

https://github.com/FCP-INDI/C-PAC/blob/ecf297738117b09a3534543c16629066767ca098/Dockerfile#L143-L144
https://github.com/FCP-INDI/C-PAC/blob/ecf297738117b09a3534543c16629066767ca098/Dockerfile#L191
https://github.com/FCP-INDI/C-PAC/blob/ecf297738117b09a3534543c16629066767ca098/Dockerfile#L238-L239
https://github.com/FCP-INDI/C-PAC/blob/ecf297738117b09a3534543c16629066767ca098/Dockerfile#L246

Proposed feature

Instead of importing each of these sets of templates separately,

path in container source
/ants_template/oasis ANTs/ANTsR Brain Templates: OASIS.zip
/ndmg_atlases Neuroparc v1.0: Baseline
/opt/dcan-tools/pipeline/global/templates DCAN-HCP Pipelines: global/templates
/usr/share/data/fsl-mni152-templates fsl-mni152-templates – MNI152 stereotaxic brain templates for FSL
/usr/share/fsl/5.0/data/atlases fsl-atlases – FSL’s MNI152 standard space stereotaxic brain atlases http://fcon_1000.projects.nitrc.org/indi/cpac_resources.tar.gz
/usr/share/fsl/5.0/data/standard http://fcon_1000.projects.nitrc.org/indi/cpac_resources.tar.gz

use this repository's Dockerfile to collect them all, then just copy them from ghcr.io/fcp-indi/c-pac_templates into C-PAC

Acceptance criteria

  • All of the templates included in C-PAC are included in this repository
  • templates are removed from the main repo
  • templates are copied from ghcr.io/fcp-indi/c-pac_templates into C-PAC in each C-PAC Dockerfile

Alternatives

No response

Additional context

Related: #3

✨ Adding surface based Schaefer Atlas to CPAC templates folder

Related problem

Add surface based Schaefer2018_{}_Parcels_17Networks_order labels to the CPAC human templates folder.

Proposed feature

The CPAC templates folder should contain the surface based Schaefer templates from the CBIG repo to the CPAC human templates folder.

cp the required files from the CBIG repo to the templates over here.

Acceptance criteria

The docker image should be created without errors and the required surface based labels should be available in the CPAC templates folder.

Alternatives

No response

Additional context

No response

πŸ§‘β€πŸ’» Add git lfs documentation

Related problem

This repo uses git-lfs but doesn't tell developers that or how to use it.

Proposed feature

Add documentation for how git-lfs is / should be used for this repository

Acceptance criteria

  • Repo includes documentation for how to use git-lfs here (#21)
  • Git-lfs is required to use repo

Additional context

I'm pretty sure #11 was a git-lfs configuration issue and could be reverted after this issue is resolved

🚚 Give templates BIDS names

Related problem

The filenames are currently not following any consistent pattern (the macaque files are nearly in BIDS):

atlases/label
β”œβ”€β”€ Human
β”‚Β Β  β”œβ”€β”€ aal_mask_pad.nii.gz
β”‚Β Β  β”œβ”€β”€ CC200.nii.gz
β”‚Β Β  β”œβ”€β”€ CC400.nii.gz
β”‚Β Β  β”œβ”€β”€ csf_mask_xtedit.nii.gz
β”‚Β Β  β”œβ”€β”€ ez_mask_pad.nii.gz
β”‚Β Β  β”œβ”€β”€ ho_mask_pad.nii.gz
β”‚Β Β  β”œβ”€β”€ Mask_ABIDE_85Percent_GM.nii.gz
β”‚Β Β  β”œβ”€β”€ PNAS_Smith09_rsn10.nii.gz
β”‚Β Β  β”œβ”€β”€ rois_3mm.nii.gz
β”‚Β Β  └── tt_mask_pad.nii.gz
└── Macaque
    β”œβ”€β”€ MacaqueYerkes19_T1w_0.5mm_brain_mask.nii.gz
    β”œβ”€β”€ MacaqueYerkes19_T1w_0.5mm_brain.nii.gz
    β”œβ”€β”€ MacaqueYerkes19_T1w_0.5mm.nii.gz
    β”œβ”€β”€ MacaqueYerkes19_T1w_1.0mm_brain_mask.nii.gz
    β”œβ”€β”€ MacaqueYerkes19_T1w_1.0mm_brain.nii.gz
    β”œβ”€β”€ MacaqueYerkes19_T1w_1.0mm.nii.gz
    β”œβ”€β”€ MacaqueYerkes19_T1w_2mm_brain_mask.nii.gz
    β”œβ”€β”€ MacaqueYerkes19_T1w_2mm_brain.nii.gz
    └── MacaqueYerkes19_T1w_2mm.nii.gz

Proposed feature

Rename all these images following the BIDS specification

Acceptance criteria

Alternatives

No response

Additional context

  1. I think it would be great to also include sidecars like in Neuroparc's specification, but I think that's a follow-up to this, not necessary to resolve this issue.
  2. For the renaming acceptance criterion, I think it would be useful to make a CSV (or some other format) file that handles the mappings, so it's both machine- and human-readable without a lot of digging.

🚚 Merge `cpac_resources.tar.gz` into this repository

Related problem

In addition to the templates already moved here and the externally-sourced templates described in https://github.com/FCP-INDI/fcp-indi.github.io/blob/bb9aac4/docs/_sources/user/templates.rst, (

C-PAC images include the following templates:

path in container source
/ants_template/oasis ANTs/ANTsR Brain Templates: OASIS.zip
/cpac_templates C-PAC Templates
/ndmg_atlases Neuroparc v1.0: Baseline
/opt/dcan-tools/pipeline/global/templates DCAN-HCP Pipelines: global/templates
/usr/share/data/fsl-mni152-templates fsl-mni152-templates – MNI152 stereotaxic brain templates for FSL
/usr/share/fsl/5.0/data/atlases fsl-atlases – FSL’s MNI152 standard space stereotaxic brain atlases http://fcon_1000.projects.nitrc.org/indi/cpac_resources.tar.gz
/usr/share/fsl/5.0/data/standard http://fcon_1000.projects.nitrc.org/indi/cpac_resources.tar.gz

) C-PAC also includes templates from http://fcon_1000.projects.nitrc.org/indi/cpac_resources.tar.gz:

https://github.com/FCP-INDI/C-PAC/blob/07d59f63ad716485ab0cf96e84f5d9a531312e9e/Dockerfile#L157-L164

Proposed feature

Move or copy the templates from http://fcon_1000.projects.nitrc.org/indi/cpac_resources.tar.gz into this repository

Acceptance criteria

Alternatives

No response

Additional context

No response

🚸 Add preview image table to top of README

Related problem

Neuroparc has this image near the top of it's README:

brainAtlases_color_wRegions.png.

Proposed feature

It would be nice if this repository had a comparable visual

Acceptance criteria

  • A similar visual for these templates is added to the README

Alternatives

No response

Additional context

The Neuroparc image looks manually curated to me. I don't know that it's worth it for this repository to do this manually.

πŸ“ Fill in table in README

Related problem

The primary motivation of splitting this repo out of https://github.com/FCP-INDI/C-PAC is to clarify and document what the prepackaged templates are and where they are from.

At the time of opening this issue, the tables look like this:

Atlas Name # Regions Symmetrical? Hierarchical? Labelled? Generation Method Average Vol/Region Native coordinate space Description Reference Publication Year of Origin File Source/Download URL
AAL
ABIDE
CC
CSF
EZ
HarvardOxford
ROIs
Smith 10
10 well-matched maps from […] 200-dimensional ICA, Resting-FMRI components […] as shown in PNAS paper
doi:10.1073/pnas.0905267106 2009 https://www.fmrib.ox.ac.uk/datasets/brainmap+rsns/ https://www.fmrib.ox.ac.uk/datasets/brainmap+rsns/PNAS_Smith09_rsn10.nii.gz
Talairach–Tournoux

Atlas Name # Regions Symmetrical? Hierarchical? Labelled? Generation Method Average Vol/Region Native coordinate space Description Reference Publication Year of Origin File Source/Download URL
MacaqueYerkes19

Proposed feature

Fill in the empty cells of the tables

Acceptance criteria

  • all cells in the human table are filled in
  • all cells in the macaque table are filled in

Alternatives

No response

Additional context

When this issue is resolved, please reply to Atlases for timeseries extraction

✨ Threshold PNAS_Smith09_rsn10.nii.gz mask at Z = 3 and package that template

Related problem

Because of the kind of image file this is vs. all the other default templates, we have to do a different kind of timeseries analysis:

 tse_roi_paths:
    /cpac_templates/CC400.nii.gz: Avg
    /cpac_templates/aal_mask_pad.nii.gz: Avg
    /cpac_templates/CC200.nii.gz: Avg
    /cpac_templates/tt_mask_pad.nii.gz: Avg
    /cpac_templates/PNAS_Smith09_rsn10.nii.gz: SpatialReg
    /cpac_templates/ho_mask_pad.nii.gz: Avg
    /cpac_templates/rois_3mm.nii.gz: Avg
    /ndmg_atlases/label/Human/AAL_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/CAPRSC_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/DKT_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/DesikanKlein_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/HarvardOxfordcort-maxprob-thr25_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/HarvardOxfordsub-maxprob-thr25_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Juelich_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/MICCAI_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Schaefer1000_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Schaefer200_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Schaefer300_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Schaefer400_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Talairach_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Brodmann_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Desikan_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Glasser_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Slab907_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Yeo-17-liberal_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Yeo-17_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Yeo-7-liberal_space-MNI152NLin6_res-1x1x1.nii.gz: Avg
    /ndmg_atlases/label/Human/Yeo-7_space-MNI152NLin6_res-1x1x1.nii.gz: Avg

β€” Configuration Without the GUI ― C-PAC 1.8.1 Beta documentation

Proposed feature

Create a binary mask at Z > 3, package that template, and use it with the same analysis as the other templates

Acceptance criteria

  • template created (#5)
  • template packaged (#5)
  • config(s) updated

Alternatives

No response

Additional context

The original file is "10 well-matched maps from these, as shown in PNAS paper" from Correspondence between BrainMap and Resting-FMRI ICA components. Threshold is from Fig. 1 of Correspondence of the brain's functional architecture during activation and rest1

Footnotes

  1. Smith, Stephen M et al. β€œCorrespondence of the brain's functional architecture during activation and rest.” Proceedings of the National Academy of Sciences of the United States of America vol. 106,31 (2009): 13040-5. doi:10.1073/pnas.0905267106 ↩

πŸ› `mni_icbm152_t1_tal_nlin_asym_09c` vs. `tpl-MNI152NLin2009cAsym`

Describe the bug

Both of these templates (mni_icbm152_t1_tal_nlin_asym_09c.nii packaged in C-PAC & tpl-MNI152NLin2009cAsym from TemplateFlow) seem to be templates for space-MNI152NLin2009cAsym but they aren't identical.

Expected behavior

Templates are identical or have different names

Acceptance criteria

  • These two templates are differentiated

C-PAC version

v1.8.5-dev

Additional context

They both have b'mnc2nii mni_icbm152_nlin_asym_09c/mni_icbm152_t1_tal_nlin_asym_09c.mnc mni_icbm' as the description in the header, but mni_icbm152_t1_tal_nlin_asym_09c.nii has

cal_max         : 100.0
qoffset_x       : 0.0
qoffset_y       : 0.0
qoffset_z       : 0.0

where tpl-MNI152NLin2009cAsym_res-01_T1w.nii.gz from TemplateFlow has

cal_max         : 10000.0
qoffset_x       : -96.0
qoffset_y       : -132.0
qoffset_z       : -78.0

They look the same visually,

mni_icbm152_t1_tal_nlin_asym_09c tpl-MNI152NLin2009cAsym_res-01_T1w
mni_icbm152_t1_tal_nlin_asym_09c.png tpl-MNI152NLin2009cAsym_res-01_T1w.png

but get_fdata() shows roughly a 100Γ— scaling between the data points (like the cal_max in the headers, although less precisely):

count	8530021.00
mean	101.04
std	7.21
min	-1844.27
25%	100.85
50%	100.92
75%	101.10
max	1029.66

histogram


Gist with files, headers, and images: https://gist.github.com/shnizzedy/03e8ba5ead9987b5a299e2501ec77ae0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.