Hi all,
Im have a few interesting (genotyping) CNVs and now I want to plot them using the B allele frequency and LogR ratio. There are already several topics about this for example here, but ideally I am more looking for something like pennCNV plots but then with gene annotation on the x-axis (example below). Because when doing it genome-wide for random genes is it a bit time consuming to look up the actual genes and manually add these in R. Any ideas?

1 answer
In some cases converting your data to a genome browser and then screenshotting the genome browser can be beneficial for getting such genomic contexts.
The embedded link also recommends something called genomegraphs also which helps for R graphics
A final alternative you could look into is adding annotations onto an existing plot. Annotating ggplots is pretty pleasant (you can annotate using the same coordinate space as the data that you are plotting) so you can have http://ggplot2.tidyverse.org/reference/annotate.html. Using base graphics it could be a little bit different.
Reading gene annotation data such as GFF is a tabular format, which R can load pretty easily. Just draw a box covering the gene regions (rows in a gff that have a gene line), or you can also try and draw the intron-exon boundaries if you feel this is important too
Log in to answer this question.