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

Options for ncol and keeping order of idents in RegionHeatmap #1729

Open
mossconfuse opened this issue Jun 21, 2024 · 0 comments
Open

Options for ncol and keeping order of idents in RegionHeatmap #1729

mossconfuse opened this issue Jun 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mossconfuse
Copy link

mossconfuse commented Jun 21, 2024

Thanks for the useful tools, as always.

I was toying with the RegionHeatmap function, but ultimately had to copy and modify it to produce my own version. Based on that, I recommend adding arguments for ncol, so the user can specify the number of columns the individual facets are arranged in. Also, rearranging the facets by idents, as they keep getting reshuffled (1,2,3,10 ->1,10,2,3):

data.use <- all.assay[all.assay$assay == assay[[i]], 
      ]
data.use$group <- factor(x = data.use$group, levels = idents)

    pp <- ggplot(data = data.use, mapping = aes_string(x = "bin", 
      y = "name", fill = "value")) + facet_wrap(facets = ~group, 
      scales = "free_y", nrow = nrow, ncol = ncol) + geom_raster() + 

I also kept getting "Error in colors_all[[assay[[i]]]] : subscript out of bounds" when I tried to supply a single custom cols and a singular assay ("peaks"), so I had to overwrite with

names(x = colors_all) <- assay
@mossconfuse mossconfuse added the enhancement New feature or request label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant