Common genomic intervals in R
I would like to infer shared genomic interval between different samples. My input: sample chr start end NE001 1 100 200 NE001 2 100 200 NE002 1 50 150 NE002 2 50 150 NE003 2 250 300 My expected output: chr start end freq 1 100 150 2 2 100 150 2 Where the "freq" is the how many samples have contribuited to infer the shared region. In the above example freq = 2 (NE001 and NE002). Cheers! If your data is in a data.frame (see below), using the Bioconductor GenomicRanges package I create a GRanges instance, keeping the non-range columns too library(GenomicRanges) gr <- makeGRangesFromDataFrame(df,