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

Seurat Wrapper + Circos visualization #127

Open
chrismahony opened this issue Feb 17, 2022 · 1 comment
Open

Seurat Wrapper + Circos visualization #127

chrismahony opened this issue Feb 17, 2022 · 1 comment

Comments

@chrismahony
Copy link

I am trying to plot the Circo plot in this vingette, when I run:

circos.par(gap.degree = gaps)
chordDiagram(links_circle, directional = 1,order=order,link.sort = TRUE, link.decreasing = FALSE, grid.col = grid_col,transparency = 0, diffHeight = 0.005, direction.type = c("diffHeight", "arrows"),link.arr.type = "big.arrow", link.visible = links_circle$weight >= cutoff_include_all_ligands,annotationTrack = "grid",
preAllocateTracks = list(track.height = 0.075))

we go back to the first track and customize sector labels

circos.track(track.index = 1, panel.fun = function(x, y) {
circos.text(CELL_META$xcenter, CELL_META$ylim[1], CELL_META$sector.index,
facing = "clockwise", niceFacing = TRUE, adj = c(0, 0.55), cex = 1)
}, bg.border = NA) #

I get :

Error: order should contain names of all sectors.

If you could help me I would really appreciate it, thanks,
Chris

@browaeysrobin
Copy link
Member

Hi @chrismahony

This is an error that sometimes can occur when one of the label names is duplicated (probably there might be other reasons also...). In the context of the NicheNet plots, this means that one of the ligands might be belonging to multiple sender cell types, or might also be a target gene or receptor itself in the receiver. You will need to apply a hack and add some whitespace to the symbol name.

We will be working on this to solve this issue automatically, but not in the immediate short term

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

2 participants