cole-trapnell-lab / monocle-release

276 stars 116 forks source link

Plot cell_metadata along pseudotime #445

Open fbrundu opened 3 years ago

fbrundu commented 3 years ago

Hi,

Is there a way to plot a specific cell_metadata column (e.g. a cell score for a specific process) along the pseudotime, in a similar fashion to the plot_genes_in_pseudotime function?

Such function doesn't allow for metadata column to be plotted, e.g. with:

> cds # dataset
> key <- "cell_type_key"
> scores <- c("score1", "score2", ...)
> plot_genes_in_pseudotime(cds[scores,], color_cells_by=key)

Error in SummarizedExperiment:::.SummarizedExperiment.charbound(subset,  : 
  index out of bounds: score1 score2 ...

I know this function is only supposed to work with gene expression values. Is there an alternative for metadata scores?

Thanks, Francesco

ruchikabhat commented 1 year ago

Hi,

I am using pseudotime analysis fr the first time for mouse scRNA data and have encountered the following error:

FibroMono <- orderCells(FibroMono) Warning messages: 1: In graph.dfs(dp_mst, root = root_cell, neimode = "all", unreachable = FALSE, : Argument neimode' is deprecated; usemode' instead 2: In graph.dfs(dp_mst, root = root_cell, neimode = "all", unreachable = FALSE, : Argument neimode' is deprecated; usemode' instead

plot_cell_trajectory(FibroMono,

  • color_by = "Clusters",
  • theta = -15,
  • show_branch_points = TRUE,show_backbone = TRUE,
  • backbone_color = "black",
  • show_tree = TRUE,use_color_gradient = FALSE,
  • cell_size = 1.5, values=a) + scale_color_manual(values = a, name = "Only FRCs Pseudotime")+ theme(legend.position = "top") Error in .standalone_types_check_dot_call(ffi_standalone_check_number_1.0.7, : object 'ffi_standalone_check_number_1.0.7' not found

Please help!

Thank you in advance.