Description Usage Arguments Value Examples
View source: R/full_range_comparison.R
This function takes two dataframes of genomic ranges and perform all intersections, union and differences between them. The intersection is defined as those regions in the first dataframe that overlap at least 1 bp with regions in the second dataframe. Internally, this function uses the GenomicRanges
package.
1 | full_range_comparison(df_a, df_b)
|
df_a |
A dataframe of a bed file. |
df_b |
A dataframe of a bed file. |
A list of dataframes corresponding to: The difference df_a
- df_b
, the intersection df_a
& df_b
, the intersection df_b
& df_a
, the difference df_b
- df_a
, and the union df_a
U df_b
.
1 2 3 4 | df_1 <- data.frame( chr=rep("chr1",4), start=c(1,16,23,45), end=c(9,18,36,49), name=paste("region_",1:4,sep=""), score=rep(1,4), strand=rep("+",4) )
df_2 <- data.frame( chr=rep("chr1",4), start=c(4,19,28,49), end=c(9,21,39,55), name=paste("region_",1:4,sep=""), score=rep(1,4), strand=rep("+",4) )
full_range_comparison(df_1, df_2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.