jokergoo / circlize

Circular visualization in R
http://jokergoo.github.io/circlize_book/book/
Other
963 stars 145 forks source link

Hiding chromosome sector on single genomic track #355

Open kitscorp opened 1 year ago

kitscorp commented 1 year ago

Dear Jokergoo,

thank you for this awesome package. I'm trying to make a modified version of the 'relation between pathways and genes' plot you describe here: https://jokergoo.github.io/2020/11/27/visualize-relations-between-genes-and-pathways/

I would like to add an additional genomic track either as the outermost track, or (preferrably) between the cytoband and the links. I would like to have this track include the chromosomes as normal, but not the fake 'pathway' chromosome. I generally know how to add the track, but I can't seem to find how to hide the 'pathway' chromosome for that one track. Is it possible?

I've made some example images, with the gray area being the additional genomic track:

Example 1 (preferable version - not sure if it's possible to not interrupt the links to the pathway track, but it would be perfect): grafik

Example 2: grafik

jokergoo commented 1 year ago

When you add a new track with circos.track() or circos.genomicTrack(), you can set those chromosomes that do you want to draw with white borders:

circos.initializeWithIdeogram()
circos.track(ylim = c(0, 1), bg.border = c(rep(1, 22), 0, 0))
image