Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in xy.coords(x, y, xlabel, ylabel, log) #1

Open
zqsha opened this issue Nov 13, 2021 · 9 comments
Open

Error in xy.coords(x, y, xlabel, ylabel, log) #1

zqsha opened this issue Nov 13, 2021 · 9 comments

Comments

@zqsha
Copy link

zqsha commented Nov 13, 2021

Hi, experts of ggesgAal. Thanks for developing such an amazing toolbox. After successfully installing the toolbox, I run the example command line: plot(aal), and then it reported the following error:

Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' is a list, but does not have components 'x' and 'y'

Any thoughts on fixing it?

Thanks,
Cain

@zqsha
Copy link
Author

zqsha commented Nov 13, 2021

Hi again. I also found other issues on the ggsegAal_3d.

  1. I try to run the example using
    ggseg3d(atlas = aal_3d) %>%
    remove_axes() %>%
    pan_camera("left medial")
    No matter what terms that I use (i.e. "left medial", "right medial", "left lateral", "right lateral"), it only shows the right hemisphere, it never shows the left hemisphere. I do not know why.

  2. When I check the number of cortical regions in this AAL atlas, I found 41 available cortical regions per hemisphere. But, as we know, AAL90 has 45 regions per hemisphere, including 39 cortical regions and 6 subcortical regions. I also did not find the names of regions by running
    aal_3d %>%
    filter(surf == "inflated" & hemi == "right") %>%
    unnest(cols = ggseg_3d)

Thanks.

@zqsha
Copy link
Author

zqsha commented Nov 13, 2021

I aligned the atlas in the current toolbox with the classical AAL90 atlas, and then get the corresponding names to each of the regions on the atlas.
lh_LH_region_1 Precentral
lh_LH_region_2 Frontal_Sup
lh_LH_region_3 Frontal_Mid
lh_LH_region_4 Frontal_Inf_Oper
lh_LH_region_5 Frontal_Inf_Tri
lh_LH_region_6 Frontal_Inf_Orb
lh_LH_region_7 Rolandic_Oper
lh_LH_region_8 Supp_Motor_Area
lh_LH_region_9 Olfactory
lh_LH_region_10 Frontal_Sup_Medial
lh_LH_region_11 Frontal_Med_Orb
lh_LH_region_12 Rectus
lh_LH_region_13 Frontal_Sup_Orb
lh_LH_region_14 ???
lh_LH_region_15 Frontal_Mid_Orb
lh_LH_region_16 Insula
lh_LH_region_17 Cingulum_Ant
lh_LH_region_18 Cingulum_Mid
lh_LH_region_19 Cingulum_Post
lh_LH_region_20 ParaHippocampal
lh_LH_region_21 ???
lh_LH_region_22 Calcarine
lh_LH_region_23 Cuneus
lh_LH_region_24 Lingual
lh_LH_region_25 Occipital_Sup
lh_LH_region_26 Occipital_Mid
lh_LH_region_27 Occipital_Inf
lh_LH_region_28 Fusiform
lh_LH_region_29 Postcentral
lh_LH_region_30 Parietal_Sup
lh_LH_region_31 Parietal_Inf
lh_LH_region_32 SupraMarginal
lh_LH_region_33 Angular
lh_LH_region_34 Precuneus
lh_LH_region_35 Paracentralobule
lh_LH_region_36 Heschl
lh_LH_region_37 Temporal_Sup
lh_LH_region_38 Temporal_Pole_Sup
lh_LH_region_39 Temporal_Mid
lh_LH_region_40 Temporal_Pole_Mid
lh_LH_region_41 Temporal_Inf

But, I am not sure what do the "lh_LH_region_14" and "lh_LH_region_21" refer to?

Thanks

@drmowinckels
Copy link
Contributor

Thank you for this labelling! I'll get to adding that information to the atlas when I get the time.

@faskowit Could you help us out with the region names for your labels 14 and 21? This atlas was based on your annot file in https://github.com/faskowit/multiAtlasTT

Thanks for any help!

@drmowinckels
Copy link
Contributor

I've made a plot here to highlight each individual parcel in the left hemisphere. I have no experience with this parcellation personally.

library(ggsegAal)
library(ggplot2)
library(ggseg)
#> Warning: package 'ggseg' was built under R version 4.1.1
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union

plot(aal)

tmp_data <- tibble(
  region = brain_regions(aal)
)

tmp_data %>% 
  mutate(regionf = region,
         regeionc = region) %>% 
  group_by(regeionc) %>% 
  ggplot() + 
  geom_brain(atlas = aal, hemi = "left",
             aes(fill = regionf), show.legend = FALSE) +
  facet_wrap(~regeionc) +
  theme_brain2()
#> merging atlas and data by 'region'

Created on 2021-11-15 by the reprex package (v2.0.0)

@drmowinckels
Copy link
Contributor

Here are images of just 14 and 21

image

@zqsha
Copy link
Author

zqsha commented Nov 15, 2021

Great, thanks, Athanasiamo. Any thoughts on fixing the error that I report about plot(aal)?
Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' is a list, but does not have components 'x' and 'y'

I am still stuck here.

Thanks.

@zqsha
Copy link
Author

zqsha commented Nov 15, 2021

Also, this is the 3D view of related regions. The numbers on the brain are the labels in the atlas. (Sorry I just can show the right hemisphere, as this 3D atlas (ggestAal_3d) still can not show the left hemisphere.). Thanks again.
Picture1

@lucasfr
Copy link

lucasfr commented Feb 9, 2022

Thank you for this labelling! I'll get to adding that information to the atlas when I get the time.

@faskowit Could you help us out with the region names for your labels 14 and 21? This atlas was based on your annot file in https://github.com/faskowit/multiAtlasTT

Thanks for any help!

Hi @Athanasiamo and @zqsha

I believe that is AAL2. The one most often used is AAL. Here's the original source: https://www.sciencedirect.com/science/article/pii/S1053811901909784

The original files can be found here:https://www.gin.cnrs.fr/en/tools/aal/

I tried to convert the atlas myself but wasn't very lucky, I'm afraid.

@drmowinckels
Copy link
Contributor

@zqsha hI cannot reproduce the error you are showing, so I dont know whats going on for you. Are you still seeing that error?

library(ggsegAal)
#> Loading required package: ggseg
#> Loading required package: ggplot2
#> Loading required package: ggseg3d

plot(aal)

Created on 2022-03-18 by the reprex package (v2.0.1)

@lucasfr ok, so you think this is actually the AAL2 atlas, not AAL? That should explain the atlas parcellation differences.
I also struggle getting these nifti atlases into a format I can work with for this tool but its on my list!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants