I am wondering what would be the best way to define all ranges which are not covered by given set of ranges. For example, if I have a set of genes with known coordinates:
dtGenes <- fread(
"id,start,end
1,1000,1300
2,1200,1500
3,1600,2600
4,3000,4000
")
Let's say I know that total length of the chromosome (for simplicity, assume they are all on the same chromosome) is 10000. So, finally I expect to have the following list of intergenic regions:
"startR,endR
0,1000
1500,1600
2600,3000
4000,10000
"
can Bioconductor's IRange
be useful here? or there is some other good way to solve this?