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

Column abs(coord_y - ymax) is not found when plotSpatialScatterpie #120

Open
xiang-cy opened this issue Dec 16, 2024 · 0 comments
Open

Column abs(coord_y - ymax) is not found when plotSpatialScatterpie #120

xiang-cy opened this issue Dec 16, 2024 · 0 comments

Comments

@xiang-cy
Copy link

xiang-cy commented Dec 16, 2024

hi, thanks for your great work! I had a error when I run plotSpatialScatterpie, please help me!! Thank a lot.

plotSpatialScatterpie(
  x = Day0_Young@images$Day.0.Young@coordinates[,c('imagerow','imagecol')],
  y = mat,
  cell_types = colnames(mat),
  img = FALSE,
  scatterpie_alpha = 1,
  pie_scale = 0.4) +
  scale_fill_manual(
    values = pal,
    breaks = names(pal))

Error in dplyr::group_by():
! Must group by variables found in .data.
✖ Column abs(coord_y - ymax) is not found.
Run rlang::last_trace() to see where the error occurred.

rlang::last_trace()
<error/rlang_error>
Error in dplyr::group_by():
! Must group by variables found in .data.
✖ Column abs(coord_y - ymax) is not found.


Backtrace:

  1. └─SPOTlight::plotSpatialScatterpie(...)
  2. └─ggplot2:::+.gg(...)
  3. └─ggplot2:::add_ggplot(e1, e2, e2name)
    
  4.   ├─ggplot2::ggplot_add(object, p, objectname)
    
  5.   └─scatterpie:::ggplot_add.layer_scatterpie(object, p, objectname)
    
  6.     ├─base::do.call(geom_scatterpie2, object)
    
  7.     └─scatterpie (local) `<fn>`(...)
    
  8.       ├─base::as.list(...)
    
  9.       ├─dplyr::group_split(dplyr::group_by(df, !!as.symbol(xvar), !!as.symbol(yvar)))
    
  10.       ├─dplyr::group_by(df, !!as.symbol(xvar), !!as.symbol(yvar))
    
  11.       └─dplyr:::group_by.data.frame(df, !!as.symbol(xvar), !!as.symbol(yvar))
    

Run rlang::last_trace(drop = FALSE) to see 2 hidden frames.

rlang::last_trace(drop = FALSE)
<error/rlang_error>
Error in dplyr::group_by():
! Must group by variables found in .data.
✖ Column abs(coord_y - ymax) is not found.


Backtrace:

  1. └─SPOTlight::plotSpatialScatterpie(...)
  2. └─ggplot2:::+.gg(...)
  3. └─ggplot2:::add_ggplot(e1, e2, e2name)
    
  4.   ├─ggplot2::ggplot_add(object, p, objectname)
    
  5.   └─scatterpie:::ggplot_add.layer_scatterpie(object, p, objectname)
    
  6.     ├─base::do.call(geom_scatterpie2, object)
    
  7.     └─scatterpie (local) `<fn>`(...)
    
  8.       ├─base::as.list(...)
    
  9.       ├─dplyr::group_split(dplyr::group_by(df, !!as.symbol(xvar), !!as.symbol(yvar)))
    
  10.       ├─dplyr::group_by(df, !!as.symbol(xvar), !!as.symbol(yvar))
    
  11.       └─dplyr:::group_by.data.frame(df, !!as.symbol(xvar), !!as.symbol(yvar))
    
  12.         └─dplyr::group_by_prepare(.data, ..., .add = .add, error_call = current_env())
    
  13.           └─rlang::abort(bullets, call = error_call)
    
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

1 participant