Entering edit mode
stephen.williams
▴
10
@stephenwilliams-15198
Last seen 6.4 years ago
I am plotting a set of data that I'd like to layer on top of each other. This is sequencing read depth from two samples. Here a snippet of my data
GRanges object with 3828 ranges and 2 metadata columns:
seqnames ranges strand | depth1 depth2
<Rle> <IRanges> <Rle> | <integer> <integer>
[1] chr5 [171387115, 171387116] * | 6 10
[2] chr5 [171387116, 171387117] * | 5 10
[3] chr5 [171387117, 171387118] * | 6 10
[4] chr5 [171387118, 171387119] * | 6 11
[5] chr5 [171387119, 171387120] * | 5 9
When I plot this data with the histogram function using
data_track <- DataTrack(data_grange, name = " ", col = c("black","grey"))
plotTracks(data_track, type = "histogram", showId = TRUE, c("depth1","depth2"))
The histograms are stacked one on top of the other. As such
I'd like to have them layered instead to show the difference between the two samples. Stacking is in this instance is very hard to interpret.
Thanks for any an all advice.
Once again, I have figured out my own question. The OverlayTrack function is the solution. Thanks to bioconductor support for being a great sounding board!