R: Calculate log R ratios and B allele frequencies.
calculateRBaf
R Documentation
Calculate log R ratios and B allele frequencies.
Description
Calculate log R ratios and B allele frequencies from
a CNSet object
Usage
calculateRBaf(object, batch.name, chrom)
Arguments
object
A CNSet object.
batch.name
A character string indicating the batch. If
missing, log R ratios and B allele frequencies are calculated for all
batches in the object.
chrom
Integer indicating which chromosome to process. If
missing, B allele frequencies and log R ratios are calculated for all
autosomal chromosomes and chromosome X that are included in
object.
Details
batch.name must be a value in batch(object). Currently,
one must specify a single batch.name. If a character vector for
batch.name is supplied, only the first is evaluated.
TODO: A description of how these values are calculated.
Value
A named list.
baf: Each element in the baf list is a matrix of B allele
frequencies (one matrix for each chromosome).
lrr: Each element in the lrr list is a matrix of log R ratios
(one matrix for each chromosome).
The log R ratios were scaled by a factor of 100 and stored as an
integer. B allele frequencies were scaled by a factor of 1000 and
stored as an integer.
Author(s)
Lynn Mireless
References
Peiffer et al., High-resolution genomic profiling of chromosomal aberrations using
Infinium whole-genome genotyping (2006), Genome Research
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(crlmm)
Loading required package: oligoClasses
Welcome to oligoClasses version 1.34.0
Loading required package: preprocessCore
Welcome to crlmm version 1.30.0
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/crlmm/calculateRBaf.Rd_%03d_medium.png", width=480, height=480)
> ### Name: calculateRBaf
> ### Title: Calculate log R ratios and B allele frequencies.
> ### Aliases: calculateRBaf calculateRBaf,CNSet-method
> ### Keywords: list methods
>
> ### ** Examples
>
> data(cnSetExample)
> baf.lrr <- suppressWarnings(calculateRBaf(cnSetExample, "SHELF"))
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")'.
> hist(baf.lrr[["baf"]][[1]]/1000, breaks=100)
> hist(baf.lrr[["lrr"]][[1]]/100, breaks=100)
> ## Not run:
> ##D library(ff)
> ##D baf.lrr <- suppressWarnings(calculateRBaf(cnSetExample, "SHELF"))
> ##D class(baf.lrr[["baf"]][[1]]) ## ff_matrix
> ##D class(baf.lrr[["lrr"]][[1]]) ## ff_matrix
> ##D
> ## End(Not run)
>
>
>
>
>
> dev.off()
null device
1
>