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

Problems with the RunSlingshot() function #242

Open
leo971001 opened this issue Jun 13, 2024 · 4 comments
Open

Problems with the RunSlingshot() function #242

leo971001 opened this issue Jun 13, 2024 · 4 comments

Comments

@leo971001
Copy link

It appears when I run the RunSlingshot() function using my own data:
1: No shared levels found between names(values) of the manual scale and the data's fill values.
2: No shared levels found between names(values) of the manual scale and the data's fill values.
and I can't get the figure.

when I use the data("pancreas_sub"), the same question arises here:
1: No shared levels found between names(values) of the manual scale and the data's fill values.
2: No shared levels found between names(values) of the manual scale and the data's fill values.

How do I fix this?

@AcetylCoALab
Copy link

I had the same problem, did you solve it?

2 similar comments
@luoyiiii
Copy link

I had the same problem, did you solve it?

@suye0620
Copy link

I had the same problem, did you solve it?

@suye0620
Copy link

lineages_layers <- SCP::LineagePlot(srt.IC, lineages = c("Lineage1","dpt_pseudotime" ),return_layer = T)
lineages_layers <- lineages_layers[!names(lineages_layers) %in% c("lab_layer")]
gg <- SCP::CellDimPlot(srt.IC, group.by = "group.cellchat",pt.size = 3,
                       reduction = "UMAP",show_stat = T,palcolor = scPalette(3),
                       label = F, label_insitu = F)

pp <- gg+
  # scale_color_manual(values = scPalette(3))+
  guides(color = guide_legend(
    title = "Groups",
    override.aes = list(color=scPalette(3),size=4)))+
  ggnewscale::new_scale_colour()+lineages_layers

I can't get the figure, but solve the problem a lit bit.

My cellgroup number is 3,so I define my length=3 scPalette(3). To solve the plot problem, firstly, run LineagePlot to get lineages_layers, then run CellDimPlot to get cells plot. Then add them, use guides(color = guide_legend( title = "Groups", override.aes = list(color=scPalette(3),size=4)))+ to solve legend conflicts.

The problem may be caused by ggnewscale package.

Best wishes.

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

4 participants