Entering edit mode
8.3 years ago
bsmith030465
▴
240
Hi,
I was trying to color code the data points in the DataTrack, and add a horizontal line. I couldn't find the information in the vignette. Here is what I want to do:
======
library(Gviz)
values <- runif(15,0,1)
gr <- GRanges(seqnames=rep('chr1',15),ranges=IRanges(start=1:15,end=1:15))
mcols(gr) <- values
colnames(mcols(gr)) <- 'values'
mycols <- ifelse(values < 0.5,"red","blue")
dtrack <- DataTrack(gr,col=mycols)
plotTracks(dtrack)
==========
I only get one color for all the dots. Also, how can I add a horizontal line in this track?
many thanks!
Hopefully it will help:
http://watson.nci.nih.gov/bioc_mirror/packages/release/bioc/manuals/Gviz/man/Gviz.pdf
"
col="#0080FF": Integer or character scalar. Default line color setting for all plotting ele-
ments, unless there is a more specific control defined elsewhere.
col.axis="white": Integer or character scalar. The font and line color for the y axis, if any.
col.frame="lightgray": Integer or character scalar. The line color used for the panel frame, if frame==TRUE
col.grid="#808080": Integer or character scalar. Default line color for grid lines, both
when type=="g" in DataTracks and when display parameter grid==TRUE.
col.line=NULL: Integer or character scalar. Default colors for plot lines. Usually the same as the global col parameter
"