Entering edit mode
The Gviz package is great - thank you Florian and Robert :-)
seqinfo <- GenomeInfoDb::seqinfo(BSgenome.Mmusculus.UCSC.mm10::Mmusculus)
grA <- GenomicRanges::GRanges(
'chr1', c('4712628-4712643', '4712428-4712627'), '+', seqinfo = seqinfo)
grB <- GenomicRanges::GRanges(
'chr1', c('5250212-5250227', '5250012-5250211'), '-', seqinfo = seqinfo)
ideogram <- Gviz::IdeogramTrack(genome = 'mm10', chromosome = 'chr1')
genomeaxis <- Gviz::GenomeAxisTrack()
siteA <- Gviz::AnnotationTrack(grA, name = 'siteA')
siteB <- Gviz::AnnotationTrack(grB, name = 'siteB')
pA <- Gviz::plotTracks(list(ideogram, genomeaxis, siteA)) # Works great
pB <- Gviz::plotTracks(list(ideogram, genomeaxis, siteB)) # Works great too
But how do I capture the generated plots, so that I can re-arrange them together into a multipanelfigure?
gridExtra::grid.arrange(pA, pB)
Error in gList(list(chr1 = new("IdeogramTrack", bandTable = list(chrom = c(1L, :
only 'grobs' allowed in "gList"
Great! Thank you :-)