ggseg / ggsegSchaefer

https://ggseg.github.io/ggsegSchaefer/
Other
9 stars 4 forks source link

Mismatch between schaefer17_3d label names and YeoLab corrected parcel label names #4

Closed valeriejill closed 3 years ago

valeriejill commented 3 years ago

Hi! I am a huge fan of ggseg. Currently, I am trying to visualize Schaefer400 17 network parcel-based data using ggsegSchaefer, for example: ggseg(.data = df, atlas = "schaefer17", hemisphere = c("left"), mapping=aes(fill=metricdata) with a column called "label" in df and thus "merging atlas and data by 'label'".

However, I am receiving the warning "Some data not merged properly. Check for naming errors in data:", and many parcels (~40-50) are plotted with no data.

I believe this ggseg error is arising because of a mismatch in the Schaefer400 17 network parcel labels I am using and those released with ggsegScahefer under label column here ggsegSchaefer::schaefer17_3d$ggseg_3d[[1]] and that this can be traced to this https://github.com/ThomasYeoLab/CBIG/blob/master/stable_projects/brain_parcellation/Schaefer2018_LocalGlobal/Parcellations/Updates/Update_20190916_README.md . To quote from the YeoLab update "we found out that some of the Schaefer parcels have the wrong label names, although the parcel boundaries are correct...This error arose because of a bug in the algorithm that matches the Schaefer parcellations with the Yeo2011 split components....We have resolved the issues and the updated label names have been released (Release version 0.14.3). See below for more details about label names in Schaefer parcellations."

This .csv https://github.com/ThomasYeoLab/CBIG/blob/master/stable_projects/brain_parcellation/Schaefer2018_LocalGlobal/Parcellations/Updates/Update_20190916_component_name_changes.csv lists old parcel names and new/corrected parcel names. It appears that the atlases released with ggsegSchaefer are still using the old parcel names. Is there a way to generate or release an updated schaefer17_3d atlas with correct parcel labels? If not, is it possible to change the label names in the ggsegSchaefer::schaefer17_3d$ggseg_3d tibbels on the user end so I can correctly merge my data by label?

Thank you!

drmowinckels commented 3 years ago

Hi!

Sorry for taking so long. We have a fix in the pipeline, I believe. But its not been merged into the repo yet. You can try installing this specific version that should have the names fixed (also includes lots of extra parcels from that paper).

remotes::install_github("monicathieu/ggsegSchaefer")

I hope to get this merged in not too long, but I need to run some thorough checks first.

valeriejill commented 3 years ago

Hello!! remotes::install_github("monicathieu/ggsegSchaefer") is working wonderfully for me with the schaefer17_400 atlas. Thanks so much for pointing me to it. And thank you in general for the amazingness of ggseg!

drmowinckels commented 3 years ago

Happy this worked! I'm working on getting that change into the main repo as we speak, so thank you for the reminder that this needed to be done and for testing it out!