Option to highlight specific region in PlotBrowserTrack #1342
Replies: 2 comments 10 replies
-
This is a nice suggestion. You would need to edit each of the individual plotting functions so that the highlighting appears in each portion of the browser track (each bulk track, the gene track, coaccessibility track, peak2gene track, etc). I can try to look into this but it will take time. |
Beta Was this translation helpful? Give feedback.
-
I have already created a working code for this. You have to add a valid genomic ranges object as the region you wish to highlight. In the function, you can do p <- plotBrowserTrack(proj, highlight=GRobjToHighlight) https://github.com/AnjaliC4/ArchR_plots/blob/main/Highlight_ArchRTracks.R Let me know if you have any questions or find any issues with this. Anjali |
Beta Was this translation helpful? Give feedback.
-
Hi @rcorces,
I think it would be a very helpful addition to highlight a region of interest in the PlotBrowserTrack function (to highlight a region overlapping with a SNP for example)- similar to Gviz functionality. For ArchR, this can be done by adding a geom_rect() function to ggplot when plotting genomic regions. I don't have the expertise to add this to PlotBrowserTrack source code, but if you can point me to a line of code where this can be added - I can do it.
Basically, hoping for something like this: https://stackoverflow.com/questions/32543176/highlight-areas-within-certain-x-range-in-ggplot2
Thanks
Beta Was this translation helpful? Give feedback.
All reactions