findOverlappingElements | R Documentation |
Finds guides that overlap the elements of a BED-like data.frame (e.g. open chromatin regions) and returns a new data.frame containing those overlaps
findOverlappingElements( guides, elements, guides.pos = "pos", guides.chr = "chr", elements.start = "st", elements.end = "en", elements.chr = "chr" )
guides |
a data.frame containing guide information including the guides genomic position in a column named guides.pos |
elements |
a data.frame containing element information, as in a BED file, including the element's genomic start, end, and chromosome in columns named elements.start, elements.end, and elements.chr |
guides.pos |
the name of the column in guides that contains the genomic position targeted by the guide (defaults to "pos") |
guides.chr |
the name of the column in guides that contains the genomic chromosome targeted by the guide (defaults to "chr") |
elements.start |
the name of the column in elements that contains the start coordinate of the element (defaults to "st") |
elements.end |
the name of the column in elements that contains the start coordinate of the element (defaults to "en") |
elements.chr |
the name of the column in elements that contains the start coordinate of the element (defaults to "chr") |
Returns a new data.frame containing the intersection of elements and guides
set1 = data.frame(gid=1:10, chr=c(rep("chr1",5), rep("chr5",5)), pos= c(1:5,1:5)*10, stringsAsFactors = FALSE) set2 = data.frame(eid=1:4, chr=c("chr1","chr1","chr4","chr5"), st=c(5,25,1,45), en=c(15,50,50,55), stringsAsFactors = FALSE) findOverlappingElements(set1, set2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.