I had some trouble with the title for this one, but a plot should explain:
alTrack <- Gviz::AlignmentsTrack( system.file(package = "Gviz", "extdata", "gapped.bam"), isPaired = TRUE) alTrackHighlight <- Gviz::HighlightTrack( trackList = alTrack, start = 3048600, end = 3048700, chromosome = "chr12") Gviz::displayPars(alTrackHighlight) <- list( fill = "green", col = "transparent" ) res <- Gviz::plotTracks( alTrackHighlight, from = 3048500, to = 3049000, type = c("coverage", "sashimi", "pileup"), chromosome = "chr12" )
Is there a way I can tell the highlighted region to be added "on top of" the coverage histogram, just like it is "on top of" the reads below?
Thank you for the quick answer, and again for the Gviz package. Could I draw your attention to these two questions?
Gviz: Set height to avoid empty whitespace below reads in an AlignmentsTrack?
Gviz: Is it possible to retrieve coordinates of a plotted HightlightTrack?