Hi, I have list of ranges (that I can convert to a genomic ranges object), some of which pass over the centromere of a chromosome. I also have a file that denotes the start and end of each chromosome arm (leaving out the centromere).
I'm trying to split these ranges such that any range that overlaps the centromere is split:
- If a range completely overlaps centromere, split into two ranges and remove just region in centromere
- If range is within centromere, remove it
- If range partially overlaps centromere, remove the region in centromere
I'm working on writing an R script, but figured there might be something within GenomicRanges that already does this. My main concern is that I have many metadata columns that I'd like to keep if possible. If not, I can work with it.