Last data update: 2014.03.03

R: Supervised normalization of data in edge
apply_snmR Documentation

Supervised normalization of data in edge

Description

Runs snm on a deSet object based on the null and full models in deSet. See snm for additional details on the algorithm.

Usage

apply_snm(object, int.var = NULL, ...)

## S4 method for signature 'deSet'
apply_snm(object, int.var = NULL, ...)

Arguments

object

S4 object: deSet

int.var

data frame: intensity-dependent effects (see snm for details)

...

Additional arguments for snm

Value

apply_snm returns a deSet object where assayData (the expression data) that has been passed to apply_snm is replaced with the normalized data that snm returns. Specifically, exprs(object) is replaced by $norm.dat from snm, where object is the deSet object.

Author(s)

John Storey, Andrew Bass

References

Mechan BH, Nelson PS, Storey JD. Supervised normalization of microarrays. Bioinformatics 2010;26:1308-1315.

See Also

deSet, odp and lrt

Examples

# simulate data
library(snm)
singleChannel <- sim.singleChannel(12345)
data <- singleChannel$raw.data

# create deSet object using build_models (can use ExpressionSet see manual)
cov <- data.frame(grp = singleChannel$bio.var[,2])
full_model <- ~grp
null_model <- ~1

# create deSet object using build_models
de_obj <- build_models(data = data, cov = cov, full.model = full_model,
null.model = null_model)

# run snm using intensity-dependent adjustment variable
de_snm <- apply_snm(de_obj, int.var = singleChannel$int.var,
verbose = FALSE, num.iter = 1)

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(edge)
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")'.

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/edge/apply_snm.Rd_%03d_medium.png", width=480, height=480)
> ### Name: apply_snm
> ### Title: Supervised normalization of data in edge
> ### Aliases: apply_snm apply_snm,deSet-method
> 
> ### ** Examples
> 
> # simulate data
> library(snm)
> singleChannel <- sim.singleChannel(12345)
> data <- singleChannel$raw.data
> 
> # create deSet object using build_models (can use ExpressionSet see manual)
> cov <- data.frame(grp = singleChannel$bio.var[,2])
> full_model <- ~grp
> null_model <- ~1
> 
> # create deSet object using build_models
> de_obj <- build_models(data = data, cov = cov, full.model = full_model,
+ null.model = null_model)
> 
> # run snm using intensity-dependent adjustment variable
> de_snm <- apply_snm(de_obj, int.var = singleChannel$int.var,
+ verbose = FALSE, num.iter = 1)
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>