I want create a IRanges with a exists data.table
ranges <- IRanges::IRanges(
start = x$position,
wdith = 1
)
length(ranges)
[1] 31253
However, My data.table is a table with 31548 line
> dim(x)
[1] 31548 8
also x$position length is
> length(x$position)
[1] 31548
I found that this is because of many duplicated value in
x$positionBut I am trying to create a GRanges by:
In fact each duplicated
x$positionhave differentx$chromvalue, butIRanges::IRangesremove them, so its not work.My bypass solution is use
makeGRangesFromDataFrameinstead