Just be aware that unique() will ignore the data in the GRanges mcols
a_gr <- GRanges(seqnames = 1,
ranges = IRanges(start=c(1,1),
end =c(2,2)),
strand=c("+"),
other=c("a","b"))
a_gr
#GRanges object with 2 ranges and 1 metadata column:
# seqnames ranges strand | other
# <Rle> <IRanges> <Rle> | <character>
#[1] 1 1-2 + | a
#[2] 1 1-2 + | b
unique(a_gr)
#GRanges object with 1 range and 1 metadata column:
#seqnames ranges strand | other
# <Rle> <IRanges> <Rle> | <character>
#[1] 1 1-2 + | a
• 0 views
•
link