stuart-lab / signac

R toolkit for the analysis of single-cell chromatin data
https://stuartlab.org/signac/
Other
302 stars 84 forks source link

How can I remove the ident names from the coverage plot? #1734

Closed GuiSeSanz closed 2 days ago

GuiSeSanz commented 3 days ago
GuiSeSanz commented 3 days ago

From my coverage plots, I want to remove the ident name, to be able to stack several ones side by side. In this case, I want to remove the Self−Renewing_Embryonic_Stem_Cells Pre_Differentiation_Embryonic_Stem_Cells ....

Thanks in advance! image

timoast commented 2 days ago

These plots are ggplot objects (or patchwork objects, which are essentially lists of ggplot plots), so you can use standard ggplot2 functions to modify the plot as desired. It sounds like you would need to change the theme so that the axis elements are blank, see here for more: https://stackoverflow.com/a/35090981

GuiSeSanz commented 2 days ago

Yes, I understand that and already tried that, but the axis.title or axis.text, only allows you to access the outer elements, in this case the title correspond to 'Normalized signal (range 0-50)' or the ticks. I do not know how to access the inner part. The annotation of the idents....

covplot_1 <- CoveragePlot(
  object = subset(integrated_ATAC, subset = KO =='WT'),
  region = c('chr3-44712218-44713256'),
  ymax=50,
  peaks = FALSE, 
  extend.upstream = 1000,
  extend.downstream = 1000
) & scale_fill_manual(values=Cluster_colors)

pdf('Test.pdf')
covplot_1 & theme(axis.title.y=element_blank())
dev.off()

image