jokergoo / circlize

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

Adding a unique sector with axis labels #359

Open sarahfrail opened 1 year ago

sarahfrail commented 1 year ago

Thanks so much for this package. The interactivity of the R interface is game changing for my ability to learn/make these plots.

I am comparing two genome assemblies, one that is smaller and more contiguous than the other. I want to maintain contigs/chromosomes as their own sectors because of how useful and compatible this is with genomic data that I am plotting. I also want to display genomic axes to give a sense of size. However, the larger genome is so discontiguous that the typical, sector divided axis labels are impossible to read.

I am trying to figure out how I might display an axis that encompasses the coordinates of the whole genome, rather than each sector. I have crudely drawn an example of what I'm hoping this might look like in a red line around my draft plot below. The ways I've thought to do this already (genome rectangle, highlight.chromosome) are, as far as i know, not compatible with axis drawing.

example

Any help is much appreciated!!! Again, thanks for this excellent package.

jokergoo commented 1 year ago

Then for the large genome, I would suggest to merge into one single "pseudo chromosome". E.g.

chr1 1 1000
chr2 1 2000
...

becomes

chr_pseudo 1 1000
chr_pseudo 1001 3000
...
sarahfrail commented 1 year ago

Ah I see. I thought of that as a solution but was hoping to avoid it as it means re-mapping reads and calculating new values in the bed file. Do-able, but fiddly!

Thanks for your insight.