Zachary McCaw
Updated: 2022-03-02
knitr::opts_chunk$set(cache = FALSE)
Simple application of the GRanges package to compare two sets of loci.
```{R, eval=FALSE} devtools::install_github(repo = "zrmacc/CompareLoci")
## Example ```{R} library(CompareLoci) # Sets of loci to compare. left <- data.frame( chr = c(1, 1, 1), start = c(1, 200, 400), end = c(100, 300, 500) ) right <- data.frame( chr = c(1, 1, 1, 1), start = c(20, 50, 150, 440), end = c(25, 75, 180, 450) ) # Overlap statistics. overlap_stats <- CalcOverlapStats(left, right) show(overlap_stats) # Loci on the left overlapping at least 1 locus on the right: show(overlap_stats@left_overlapping) # Loci on the right overlapping at least 1: show(overlap_stats@right_overlapped)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.