Last data update: 2014.03.03

R: PLOT METHYLATION AND ANNOTATE REGION
plot_annotate_regionR Documentation

PLOT METHYLATION AND ANNOTATE REGION

Description

Wrapper for plot_annotate_probes. Generates a plot of the methylation status of a region identified by DMRforPairs and associated transcripts (if annotate=TRUE).

Usage

plot_annotate_region(tested,regions,margin=10000,regionID,clr=NA,annotate=TRUE,scores=TRUE, path)

Arguments

tested

Output of testregion

regions

Output of regionfinder

margin

See export_data

regionID

ID of a region identified by DMRforPairs as presented in the output of testregion and the output generated by export_data.

clr

See export_data

annotate

If FALSE, only basic visualizations without annotation information are generated. (default=TRUE)

scores

Specifies if statistics need to be calculated for the region or just figures. In a custom request from a user, statistics are relevant to calculate. In the export_data wrapper, they are redundant (already calculated in the testregion loop). (default=TRUE)

path

Path relative to the working directory to save the files (=experiment.name in export_data)

Details

Expects a subfolder with the name of your experiment to exist as created by export_data(). Writing permissions are required in the working directory to use the export and visualization functions of DMRforPairs. Internet access is required to use the annotation features.

Value

A number of figures (including pairwise plots if n>2) is generated visualizing methylation status in the samples at / near the region investigated. Statistics and optional annotation information are reported back by the function.

Author(s)

Martin Rijlaarsdam, m.a.rijlaarsdam@gmail.com

See Also

export_data, plot_annotate_probes, regionfinder, testregion.

Examples

#For the this step, please ensure that you have writing 
#permissions in your working directory. If any of the
#annotate parameters is set to TRUE, an internet connection
#is required.

#this function expects a folder "example_DMRforPairs" to exist and
#be writable in the current working directory.
data(DMRforPairs_data)
experiment="example_DMRforPairs"

plot_annotate_region(example_output_DMRforPairs$tested,
                     example_output_DMRforPairs$regions,
                     margin=10000,
                     regionID=7,
                     annotate=FALSE,scores=TRUE,path=experiment)   

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(DMRforPairs)
Loading required package: Gviz
Loading required package: S4Vectors
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit


Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: grid
Loading required package: R2HTML
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/DMRforPairs/plot_annotate_region.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot_annotate_region
> ### Title: PLOT METHYLATION AND ANNOTATE REGION
> ### Aliases: plot_annotate_region
> ### Keywords: export_visualization
> 
> ### ** Examples
> 
> #For the this step, please ensure that you have writing 
> #permissions in your working directory. If any of the
> #annotate parameters is set to TRUE, an internet connection
> #is required.
> 
> #this function expects a folder "example_DMRforPairs" to exist and
> #be writable in the current working directory.
> data(DMRforPairs_data)
> experiment="example_DMRforPairs"
> 
> plot_annotate_region(example_output_DMRforPairs$tested,
+                      example_output_DMRforPairs$regions,
+                      margin=10000,
+                      regionID=7,
+                      annotate=FALSE,scores=TRUE,path=experiment)   
$symbols_exact
[1] ""

$symbols_margin
[1] ""

$scores
                                              [,1]
beta.median.A431.beta                  0.003187070
beta.median.MCF7.beta                  0.673095852
m.median.A431.M                       -8.375419753
m.median.MCF7.M                        1.043400162
median.delta.beta.A431.M.minus.MCF7.M -0.667121060
median.delta.m.A431.M.minus.MCF7.M    -8.642412220
pairwise.p.A431.M.vs.MCF7.M                     NA
max.abs.median.delta.m                 8.642412220
p.value                                0.007936508
n.probes                               5.000000000

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>