Last data update: 2014.03.03

R: Venn diagram for annotated regions given the genomic state
vennRegionsR Documentation

Venn diagram for annotated regions given the genomic state

Description

Makes a venn diagram for the regions given the genomic state showing how many regions overlap introns, exons, intergenic regions, none or multiple groups.

Usage

vennRegions(annotatedRegions, subsetIndex = NULL, ...)

Arguments

annotatedRegions

The output from annotateRegions used on regions.

subsetIndex

A vector of to use to subset the regions to use for the venn diagram. It can be a logical vector of length equal to the number of regions or an integer vector. If NULl, then it's ignored.

...

Arguments passed to vennDiagram.

Value

Makes a venn diagram plot for the annotation given the genomic state and the actual venn counts used to make the plot.

Author(s)

Leonardo Collado-Torres

See Also

annotateRegions, vennCounts, vennDiagram

Examples

## Load data
library('derfinder')

## Annotate regions
annotatedRegions <- annotateRegions(regions = genomeRegions$regions,
    genomicState = genomicState$fullGenome, minoverlap = 1)

## Make venn diagram
venn <- vennRegions(annotatedRegions)

## Add title and choose text color
venn2 <- vennRegions(annotatedRegions, main = 'Venn diagram', counts.col =
    'blue')

## Subset to only significant regions, so you don't have to annotate them
## again
venn3 <- vennRegions(annotatedRegions, subsetIndex =
    genomeRegions$regions$significant == 'TRUE', main = 'Significant only')

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(derfinderPlot)
Warning message:
replacing previous import 'ggplot2::Position' by 'BiocGenerics::Position' when loading 'ggbio' 
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/derfinderPlot/vennRegions.Rd_%03d_medium.png", width=480, height=480)
> ### Name: vennRegions
> ### Title: Venn diagram for annotated regions given the genomic state
> ### Aliases: vennRegions
> 
> ### ** Examples
> 
> ## Load data
> library('derfinder')
> 
> ## Annotate regions
> annotatedRegions <- annotateRegions(regions = genomeRegions$regions,
+     genomicState = genomicState$fullGenome, minoverlap = 1)
2016-07-06 14:47:31 annotateRegions: counting
2016-07-06 14:47:31 annotateRegions: annotating
> 
> ## Make venn diagram
> venn <- vennRegions(annotatedRegions)
> 
> ## Add title and choose text color
> venn2 <- vennRegions(annotatedRegions, main = 'Venn diagram', counts.col =
+     'blue')
> 
> ## Subset to only significant regions, so you don't have to annotate them
> ## again
> venn3 <- vennRegions(annotatedRegions, subsetIndex =
+     genomeRegions$regions$significant == 'TRUE', main = 'Significant only')
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>