[ENH]: 268 ROIs Shen Parcellation from Finn et al. (2015) #184

Merged
synchon merged 5 commits from feat/shen2015-parcellation into main 2023-07-06 17:14:10 +00:00
synchon commented 2023-07-06 12:08:15 +00:00 (Migrated from github.com)

Are you requiring a new dataset or marker?

  • I understand this is not a marker or dataset request

Which feature do you want to include?

Its the atlas used in Finn et al.'s (2015) identification and prediction of gF study. It is different from the Shen parcellation from the 2013 paper which is in the list of planned parcellations. It is available under https://www.nitrc.org/frs/?group_id=51 with the name "Functional Brain Atlas from Finn/Shen et al Nature Neuro 2015".

How do you imagine this integrated in junifer?

Like any other parcellation.

Do you have a sample code that implements this outside of junifer?

I get the parcellation as:

wget https://www.nitrc.org/frs/download.php/7976/shen_1mm_268_parcellation.nii.gz

and then register it as:

    """Register some parcellations not included in junifer."""

    from junifer.data import register_parcellation, load_parcellation
    from pathlib import Path

    path_here = (
        Path("/data")
        / "project"
        / "identification_prediction"
        / "data"
        / "hcp-connectomes-junifer"
        / "code"
        / "junifer_extensions"
        / "parcellations"
        / "data"
    )

    parcellations = {
        "Finn2015Shen268": "shen_1mm_268_parcellation.nii.gz"    
    }

    # TODO: change this as more parcellations are added:
    label_list = [x for x in range(1, 269)]

    for name, parc in parcellations.items():
        path = path_here / parc
        print("="*80)
        print(f"Registering: {name}")
        register_parcellation(
            name=name,
            parcellation_path=path.resolve(),
            parcels_labels=label_list,
            overwrite=False,
        )
        print("="*80)

Anything else to say?

They do have a network label list, but the node labels are just literally the numbers from 1 to 268 so i just do the range function here. You can wget the network labels csv as:

wget https://www.nitrc.org/frs/download.php/8072/shen_268_parcellation_networklabels.csv
### Are you requiring a new dataset or marker? - [X] I understand this is not a marker or dataset request ### Which feature do you want to include? Its the atlas used in Finn et al.'s (2015) identification and prediction of gF study. It is different from the Shen parcellation from the 2013 paper which is in the list of planned parcellations. It is available under https://www.nitrc.org/frs/?group_id=51 with the name "Functional Brain Atlas from Finn/Shen et al Nature Neuro 2015". ### How do you imagine this integrated in junifer? Like any other parcellation. ### Do you have a sample code that implements this outside of junifer? I get the parcellation as: ```sh wget https://www.nitrc.org/frs/download.php/7976/shen_1mm_268_parcellation.nii.gz ``` and then register it as: ``` """Register some parcellations not included in junifer.""" from junifer.data import register_parcellation, load_parcellation from pathlib import Path path_here = ( Path("/data") / "project" / "identification_prediction" / "data" / "hcp-connectomes-junifer" / "code" / "junifer_extensions" / "parcellations" / "data" ) parcellations = { "Finn2015Shen268": "shen_1mm_268_parcellation.nii.gz" } # TODO: change this as more parcellations are added: label_list = [x for x in range(1, 269)] for name, parc in parcellations.items(): path = path_here / parc print("="*80) print(f"Registering: {name}") register_parcellation( name=name, parcellation_path=path.resolve(), parcels_labels=label_list, overwrite=False, ) print("="*80) ``` ### Anything else to say? They do have a network label list, but the node labels are just literally the numbers from 1 to 268 so i just do the range function here. You can wget the network labels csv as: ```sh wget https://www.nitrc.org/frs/download.php/8072/shen_268_parcellation_networklabels.csv ```
LeSasse (Migrated from github.com) reviewed 2023-07-06 12:08:15 +00:00
codecov[bot] commented 2023-07-06 12:09:28 +00:00 (Migrated from github.com)

Codecov Report

Merging #184 (ac854b3) into main (c6e3563) will decrease coverage by 0.23%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #184      +/-   ##
==========================================
- Coverage   93.49%   93.27%   -0.23%     
==========================================
  Files          82       82              
  Lines        3518     3596      +78     
  Branches      659      691      +32     
==========================================
+ Hits         3289     3354      +65     
- Misses        148      153       +5     
- Partials       81       89       +8     
Flag Coverage Δ
docs 100.00% <ø> (ø)
junifer 93.26% <83.33%> (-0.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
junifer/data/parcellations.py 93.11% <83.33%> (-2.98%) ⬇️
## [Codecov](https://app.codecov.io/gh/juaml/junifer/pull/184?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) Report > Merging [#184](https://app.codecov.io/gh/juaml/junifer/pull/184?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) (ac854b3) into [main](https://app.codecov.io/gh/juaml/junifer/commit/c6e3563d73b310f80feb4b5be1d958ae4b2d1cc0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) (c6e3563) will **decrease** coverage by `0.23%`. > The diff coverage is `83.33%`. [![Impacted file tree graph](https://app.codecov.io/gh/juaml/junifer/pull/184/graphs/tree.svg?width=650&height=150&src=pr&token=5H21JuZXMw&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)](https://app.codecov.io/gh/juaml/junifer/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) ```diff @@ Coverage Diff @@ ## main #184 +/- ## ========================================== - Coverage 93.49% 93.27% -0.23% ========================================== Files 82 82 Lines 3518 3596 +78 Branches 659 691 +32 ========================================== + Hits 3289 3354 +65 - Misses 148 153 +5 - Partials 81 89 +8 ``` | Flag | Coverage Δ | | |---|---|---| | docs | `100.00% <ø> (ø)` | | | junifer | `93.26% <83.33%> (-0.23%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/juaml/junifer/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | Coverage Δ | | |---|---|---| | [junifer/data/parcellations.py](https://app.codecov.io/gh/juaml/junifer/pull/184?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9kYXRhL3BhcmNlbGxhdGlvbnMucHk=) | `93.11% <83.33%> (-2.98%)` | :arrow_down: |
fraimondo (Migrated from github.com) approved these changes 2023-07-06 15:14:25 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
juaml/junifer!184
No description provided.