bernatgel / karyoploteR

karyoploteR - An R/Bioconductor package to plot arbitrary data along the genome
https://bernatgel.github.io/karyoploter_tutorial/
295 stars 42 forks source link

highlighting telomeres (adding custom symbols to chromosome ends) #140

Open JWDebler opened 1 year ago

JWDebler commented 1 year ago

Hi, I recently saw a graph in a paper that looked like a KaryploteR image where the authors added something to all the chromosome ends that had telomeres to show how complete their sequence was. I was wondering if there already is such an option and I just can't find it or if that could be implemented. The problem is that telomeres are so short in relation to the rest of the genome that just adding them as tracks like genes would be too small to be visible. Also, while I'm here, is there a way to add an x-axis label as shown below on top of the graph instead of numbering the bases for each chromosome individually? Thanks a lot! Cheers

image

JWDebler commented 1 year ago

I think I got it, using a combination of kpRect and kpPoints :-)

bernatgel commented 1 year ago

Hi @JWDebler

This plot was probably not created with karyoploteR. There are no options to create these telomere marks, but I would have suggested building your own with kpPoint and kpSegments, but it seems you have already figured that out.

Regarding the scale bar for the whole plot, it is currently not possible. It would be possible to hack it together with kpSegments and kpText (and reuse maybe part of the code of kpAddBaseNumbers). I have thought about adding something similar before (and maybe adding a few additional formatting options) so I will add it to my future enhancements list, but it might take a while.

If you really need it, I would suggest you to try plotting it using the existing functions and ask me if you have any problem.

Hope this helps

Bernat

JWDebler commented 1 year ago

Thanks for that. I've used kpRect, I'll check out kpSegments.

The scale bar would be nice, but in the short term I'll just add it in Inkscape :-) Would be great for a future release though.