Skip to content

plot_dimred() error: Must supply a symbol or a string as argument #54

Description

@pawelqs

Hi!

Thanks for developping of this awesome package! Could you help me to resolve the following error?

This is the code that I used and the error message that I receive:

dataset <- wrap_expression(
    counts = t(ur_counts),
    expression = t(ur_normalized)
  ) %>%
  add_grouping(ur$seurat_clusters)

model <- infer_trajectory(dataset, "slingshot")

head(get_dimred(model), 5)
#                       comp_1    comp_2     comp_3
# AAACCCAAGTAGCTCT-1   6.274450 -2.478266 -0.4647137
# AAACCCACACCGAATT-1  -1.657088  3.400508 -4.0767709
# AAACCCATCACGTCCT-1  -3.980528  1.925050 -1.8245143
# AAACGAACACCTAAAC-1   3.819722 -3.118579  0.4000323
# AAACGAACAGAACCGA-1 -14.138137  5.310757  3.9100437

plot_dimred(model)
# Coloring by milestone
# Using milestone_percentages from trajectory
# Error: Must supply a symbol or a string as argument
# Run `rlang::last_error()` to see where the error occurred.

And further info:

rlang::last_error()
# <error/rlang_error>
# Must supply a symbol or a string as argument
# Backtrace:
#  1. dynplot::plot_dimred(model)
#  7. tidyr:::gather.data.frame(...)
#  10. tidyr:::ensym2(key)
# Run `rlang::last_trace()` to see the full context.

rlang::last_trace()
# <error/rlang_error>
# Must supply a symbol or a string as argument
# Backtrace:
#     x
#  1. +-dynplot::plot_dimred(model)
#  2. | \-dynplot:::project_waypoints_coloured(...)
#  3. |   \-`%>%`(...)
#  4. +-dplyr::summarise(...)
#  5. +-dplyr::group_by(., .data$from, .data$to, .data$comp_name)
#  6. +-tidyr::gather(., .data$comp_name, .data$comp_value, starts_with("comp_"))
#  7. \-tidyr:::gather.data.frame(...)
#  8.   +-rlang::as_string(ensym2(key))
#  9.   | \-rlang::is_string(x)
# 10.   \-tidyr:::ensym2(key)

sessionInfo()
# R version 4.0.3 (2020-10-10)
# Platform: x86_64-w64-mingw32/x64 (64-bit)
# Running under: Windows 10 x64 (build 19042)

...
# other attached packages:
#  [1] shiny_1.6.0                 dyno_0.1.2                  dynwrap_1.2.2              
#  [4] dynplot_1.1.0               dynmethods_1.0.5            dynguidelines_1.0.1        
#  [7] dynfeature_1.0.0            ggplotify_0.0.5             ggbeeswarm_0.6.0
....

What can be wrong?

Best,
Paweł

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions