how to plot iranges in r version 4.0.0?
1
0
Entering edit mode
@aissabenyoucef-23746
Last seen 4.5 years ago

plotRanges didn't work In that version 4.0.0, and need the help for that, thank you alotv

IRanges • 1.4k views
ADD COMMENT
0
Entering edit mode

Your post won't make it possible for anybody to help you. Please read our Posting Guide and ask again. Thanks!

ADD REPLY
1
Entering edit mode
alekeuro ▴ 10
@0cde35a2
Last seen 23 months ago
Argentina

I think this function definition is what you are looking for:

plotRanges <- function(x, xlim=x, main=deparse(substitute(x)),
                         col="black", sep=0.5, ...)
   {
     height <- 1
     if (is(xlim, "IntegerRanges"))
       xlim <- c(min(start(xlim)), max(end(xlim)))
       bins <- disjointBins(IRanges(start(x), end(x) + 1))
       plot.new()
       plot.window(xlim, c(0, max(bins)*(height + sep)))
       ybottom <- bins * (sep + height) - height
       rect(start(x)-0.5, ybottom, end(x)+0.5, ybottom + height, col=col, ...)
       title(main)
       axis(1)
}

I just copy-pasted it from this document: https://bioconductor.org/packages/devel/bioc/vignettes/IRanges/inst/doc/IRangesOverview.pdf. I saw this function used in an online book by R. Irizarry and M. Love http://genomicsclass.github.io/book/pages/bioc1_igranges.html. However, this function does not belong to any specific Bioconductor package (but I may well be wrong). The function behavior closely mimicks the function used in the online book.

Hope this helps.

ADD COMMENT

Login before adding your answer.

Traffic: 840 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6