draw_2_venn: Draw Venn diagrams of two data frames of genomic ranges

Description Usage Arguments Value Examples

Description

This function takes two data frames of genomic ranges and generates a Venn diagram showing the number of overlapping and unique regions. The internal algorithm starts by merging all genomic regions in a single file, and then mapping the original regions in each dataset to the merged regions. After this, we perform intersections using the GenomicRanges package, we count the number of elements in each region of the Venn diagram, and we use this information to plot it with the VennDiagram package.

Usage

1
draw_2_venn(bed1, bed2, name1, name2, color1, color2, print_mode, transparency)

Arguments

bed1

A dataframe of a bed file.

bed2

A dataframe of a bed file.

name1

A string with the name of the first dataset. Default value: "File1".

name2

A string with the name of the second dataset. Default value: "File2".

color1

A string with the color of the first set. Default value: "blue".

color2

A string with the color of the second set. Default value: "red".

print_mode

A string with the following options: 'raw' for count data, 'percent' for percentages, and c('raw','percent') for both. Default value: c('raw','percent').

transparency

A string to set the color of the border lines, with the following options: 1 for black, 2 for red, 3 for green, 4 for blue, 5 for light blue, "transparent" for no border. Default value: "transparent".

Value

A plot with the Venn Diagram of the two sets.

Examples

1
2
3
4
5
6
7
8
a <- generate_random_genomic_ranges()
b <- generate_random_genomic_ranges()
head(a)
head(b)

draw_2_venn(a, b)
draw_2_venn(a, b, "A", "B", "gray", "purple")
draw_2_venn(a, b, "A", "B", "gray", "purple", 'raw', 1)

antonio-mora/vennRanges documentation built on May 10, 2019, 12:26 p.m.