Last data update: 2014.03.03

R: Plot heatmap of DNA shape features
heatShapeR Documentation

Plot heatmap of DNA shape features

Description

Plot heatmap of DNA shape features

Usage

heatShape(shapeMatrix, nBins, ordRow = NULL, useRaster = TRUE, ... )

Arguments

shapeMatrix

A matrix containing DNAshape prediction results.

nBins

An integer specifying the number of equally-sized bins in which shape predictions should be aggregated. Summarized predictions can be visualized by setting nBins=1.

ordRow

A numeric vector (of the same length as the number of rows of shapeMatrix) defining the permutation of the rows of shapeMatrix to be used for plotting. Default to NULL, i.e. rows are ordered by coefficients of variation.

useRaster

Logical, if TRUE a bitmap raster is used to plot the image instead of polygons (see ?graphics::image for details).

...

Additional parameters to be passed to the image.plot function (see ?fields::image.plot for details).

Value

Called for its effects

Author(s)

Federico Comoglio

Examples

fn <- system.file("extdata", "CGRsample.fa", package = "DNAshapeR")
pred <- getShape(fn)
library(fields)
heatShape(pred$MGW, 20)

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(DNAshapeR)
Loading required package: GenomicRanges
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

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

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

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomeInfoDb
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/DNAshapeR/heatShape.Rd_%03d_medium.png", width=480, height=480)
> ### Name: heatShape
> ### Title: Plot heatmap of DNA shape features
> ### Aliases: heatShape
> ### Keywords: core
> 
> ### ** Examples
> 
> fn <- system.file("extdata", "CGRsample.fa", package = "DNAshapeR")
> pred <- getShape(fn)
Reading the input sequence......
Reading the input sequence......
Reading the input sequence......
Reading the input sequence......
Parsing files......
Read 34000 items
Record length: 2000
Read 34000 items
Record length: 1999
Read 34000 items
Record length: 2000
Read 34000 items
Record length: 1999
Done
> library(fields)
Loading required package: spam
Loading required package: grid
Spam version 1.3-0 (2015-10-24) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction 
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.

Attaching package: 'spam'

The following object is masked from 'package:stats4':

    mle

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

    backsolve, forwardsolve

Loading required package: maps

 # maps v3.1: updated 'world': all lakes moved to separate new #
 # 'lakes' database. Type '?world' or 'news(package="maps")'.  #


> heatShape(pred$MGW, 20)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>