I am wondering what would be the best way to define all ranges that are not covered by a 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
")
Say, I know that the total length of the chromosome (for simplicity, suppose that they are all on the same chromosome) is 10,000. So, finally, I expect to have the following list of intergenic regions:
"startR,endR
0,1000
1500,1600
2600,3000
4000,10000
"
Can Bioconductor IRange
be useful here? or is there another good way to solve this?
source
share