Learn R Programming

TCGAbiolinks (version 1.2.5)

TCGAvisualize_starburst: Create starburst plot

Description

Create Starburst plot for comparison of DNA methylation and gene expression. The log10 (FDR-corrected P value) is plotted for beta value for DNA methylation (x axis) and gene expression (y axis) for each gene.

The black dashed line shows the FDR-adjusted P value of 0.01.

You can set names to TRUE to get the names of the significant genes.

Candidate biologically significant genes will be circled in the plot.

Candidate biologically significant are the genes that respect the expression (logFC.cut), DNA methylation (diffmean.cut) and significance thresholds (exp.p.cut, met.p.cut)

Usage

TCGAvisualize_starburst(met, exp, group1 = NULL, group2 = NULL, exp.p.cut = 0.01, met.p.cut = 0.01, diffmean.cut = 0, logFC.cut = 0, names = FALSE, names.fill = TRUE, circle = TRUE, filename = "starburst.pdf", return.plot = FALSE, ylab = expression(atop("Gene Expression", paste(Log[10], " (FDR corrected P values)"))), xlab = expression(atop("DNA Methylation", paste(Log[10], " (FDR corrected P values)"))), title = "Starburst Plot", legend = "DNA Methylation/Expression Relation", color = NULL, label = c("Not Significant", "Up regulated & Hypo methylated", "Down regulated & Hypo methylated", "hypo methylated", "hyper methylated", "Up regulated", "Down regulated", "Up regulated & Hyper methylated", "Down regulated & Hyper methylated"), xlim = NULL, ylim = NULL, height = 10, width = 20, dpi = 600)

Arguments

met
A SummarizedExperiment with methylation data obtained from the TCGAPrepare or Data frame from DMR_results file. Expected colData columns: diffmean, p.value.adj and p.value Execute volcanoPlot function in order to obtain these values for the object.
exp
Object obtained by DEArnaSEQ function
group1
The name of the group 1 Obs: Column p.value.adj.group1.group2 should exist
group2
The name of the group 2. Obs: Column p.value.adj.group1.group2 should exist
exp.p.cut
expression p value cut-off
met.p.cut
methylation p value cut-off
diffmean.cut
If set, the probes with diffmean higher than methylation cut-off will be highlighted in the plot. And the data frame return will be subseted.
logFC.cut
If set, the probes with expression fold change higher than methylation cut-off will be highlighted in the plot. And the data frame return will be subseted.
names
Add the names of the significant genes? Default: FALSE
names.fill
Names should be filled in a color box? Default: TRUE
circle
Circle pair gene/probe that respects diffmean.cut and logFC.cut Default: TRUE
filename
The filename of the file (it can be pdf, svg, png, etc)
return.plot
If true only plot object will be returned (pdf will not be created)
ylab
y axis text
xlab
x axis text
title
main title
legend
legend title
color
vector of colors to be used in graph
label
vector of labels to be used in graph
xlim
x limits to cut image
ylim
y limits to cut image
height
Figure height
width
Figure width
dpi
Figure dpi

Value

Save a starburst plot

Details

Input: data with gene expression/methylation expression Output: starburst plot

Examples

Run this code
nrows <- 20000; ncols <- 20
counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
ranges <- GenomicRanges::GRanges(rep(c("chr1", "chr2"), c(5000, 15000)),
                   IRanges::IRanges(floor(runif(20000, 1e5, 1e6)), width=100),
                    strand=sample(c("+", "-"), 20000, TRUE),
                    probeID=sprintf("ID%03d", 1:20000),
                    Gene_Symbol=sprintf("ID%03d", 1:20000))
colData <- S4Vectors::DataFrame(Treatment=rep(c("ChIP", "Input"), 5),
                    row.names=LETTERS[1:20],
                    group=rep(c("group1","group2"),c(10,10)))
data <- SummarizedExperiment::SummarizedExperiment(
         assays=S4Vectors::SimpleList(counts=counts),
         rowRanges=ranges,
         colData=colData)
met <- data
exp <- data.frame(row.names=sprintf("ID%03d", 1:20000),
                  logFC=runif(20000, -5, 5),
                  FDR=runif(20000, 0.01, 1))
SummarizedExperiment::rowRanges(met)$diffmean.g1.g2 <- c(runif(20000, -0.1, 0.1))
SummarizedExperiment::rowRanges(met)$diffmean.g2.g1 <- -1*(SummarizedExperiment::rowRanges(met)$diffmean.g1.g2)
SummarizedExperiment::rowRanges(met)$p.value.g1.g2 <- c(runif(20000, 0, 1))
SummarizedExperiment::rowRanges(met)$p.value.adj.g1.g2 <- c(runif(20000, 0, 1))
result <- TCGAvisualize_starburst(met,exp,
                                  exp.p.cut = 0.05, met.p.cut = 0.05,
                                  group1="g1",group2="g2",
                                  diffmean.cut=0.0,
                                  names=TRUE, circle = FALSE)
result <- TCGAvisualize_starburst(SummarizedExperiment::values(met),
                                  exp,
                                  exp.p.cut = 0.05, met.p.cut = 0.05,
                                  group1="g1",group2="g2",
                                  diffmean.cut=0.0,
                                  names=TRUE, circle = FALSE)

Run the code above in your browser using DataLab