Last data update: 2014.03.03

R: Compute and plot smoothing of expression values or scores...
compute.slidingR Documentation

Compute and plot smoothing of expression values or scores along the chromosome

Description

'compute.sliding' computes a smoothing of the expression data or scores along the chromosome using the specified kernel function. This function is also used within the 'evalScoring' function. 'plotSliding' creates a plot of the smoothed expression values / scores.

Usage

compute.sliding(data, chromosome, sample, kernel, kernelparams=NULL, step.width = 1e+06)
plotSliding(data, chromosome, sample, kernel, kernelparams=NULL,
step.width=1000000, ...)

Arguments

data

A MACATData list holding the Expression values and gene locations

chromosome

the chromosome to be smoothed

sample

the sample (patient) whose expression values are smoothed

kernel

a kernel function (one of rbf, kNN, basePairDistance or your own)

kernelparams

a list of named parameters for the kernel (by default estimated from the data)

step.width

the smoothing is computed stepwise every step.width basepairs (default is 100000)

...

further graphical parameters passed on to plot.default

Value

for compute.sliding: a matrix of dimension (steps x 2) with in the first column the locations in basepairs where an interpolation is computed, and in the second column the smoothed values. plotSliding does not return anything and is merely called for its side-effect producing the plot.

Author(s)

MACAT development team

See Also

kernelize, evalScoring

Examples

data(stjd)
# just compute smoothed values:
smooth = compute.sliding(stjd, chromosome=3, sample=6, rbf,
                         kernelparams=list(gamma=1/10^13))
# compute and plot smoothed values:
plotSliding(stjd, chromosome=3, sample=6,rbf,
            kernelparams=list(gamma=1/10^13),pch=20,
            main="Chromosome 3")

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(macat)
Loading required package: Biobase
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

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

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

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: XML
Loading MicroArray Chromosome Analysis Tool...
Loading required packages...

Type 'demo(macatdemo)' for a quick tour...

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/macat/compute_sliding.Rd_%03d_medium.png", width=480, height=480)
> ### Name: compute.sliding
> ### Title: Compute and plot smoothing of expression values or scores along
> ###   the chromosome
> ### Aliases: compute.sliding plotSliding
> ### Keywords: manip
> 
> ### ** Examples
> 
> data(stjd)
> # just compute smoothed values:
> smooth = compute.sliding(stjd, chromosome=3, sample=6, rbf,
+                          kernelparams=list(gamma=1/10^13))
> # compute and plot smoothed values:
> plotSliding(stjd, chromosome=3, sample=6,rbf,
+             kernelparams=list(gamma=1/10^13),pch=20,
+             main="Chromosome 3")
NULL
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>