Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: benilton/oligo
base: 15de55dd09
...
head fork: benilton/oligo
compare: 41e4eee281
  • 10 commits
  • 7 files changed
  • 0 commit comments
  • 3 contributors
Commits on Mar 30, 2012
d.tenenbaum bumped version numbers after creating 2.10 branch
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/oligo@64680 bc3139a8-67e5-0310-9ffc-ced21a209358
1accb0d
Commits on Apr 05, 2012
bcarvalh@jhsph.edu Fixing conflicts on transition to BioC 2.10
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/oligo@64891 bc3139a8-67e5-0310-9ffc-ced21a209358
5a24f7b
bcarvalh@jhsph.edu Smaller conflicts in unitTests: transition to BioC 2.10
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/oligo@64892 bc3139a8-67e5-0310-9ffc-ced21a209358
f65e5de
bcarvalh@jhsph.edu adding primers to devel
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/oligo@64893 bc3139a8-67e5-0310-9ffc-ced21a209358
15d49a9
bcarvalh@jhsph.edu syncing stable-devel
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/oligo@64894 bc3139a8-67e5-0310-9ffc-ced21a209358
8bc397b
Commits on Apr 18, 2012
bcarvalh@jhsph.edu Exporting exprs<- for users convenience
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/oligo@65236 bc3139a8-67e5-0310-9ffc-ced21a209358
c480d07
bcarvalh@jhsph.edu Exporting exprs<- for users convenience 24d3c7c
Commits on Apr 19, 2012
bcarvalh@jhsph.edu Bugfix: target argument wasnt passed to normalize/backgroundCorrect
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/oligo@65262 bc3139a8-67e5-0310-9ffc-ced21a209358
974ca3e
Benilton Carvalho Bugfix: target argument wasnt passed to normalize/backgroundCorrect -…
… fixing conflict in DESCRIPTION
6093756
Benilton Carvalho fixing conflict 41e4eee
2  DESCRIPTION
View
@@ -1,5 +1,5 @@
Package: oligo
-Version: 1.20.2
+Version: 1.20.3
Title: Preprocessing tools for oligonucleotide arrays.
Author: Benilton Carvalho and Rafael Irizarry. Contributors: Ben Bolstad, Vincent Carey, Wolfgang Huber, Harris Jaffee, Jim MacDonald, Matt Settles
Maintainer: Benilton Carvalho <Benilton.Carvalho@cancer.org.uk>
14 R/AllGenerics.R
View
@@ -4,10 +4,10 @@ setGeneric("bg", function(object, subset=NULL) standardGeneric("bg"))
setGeneric("intensity", function(object) standardGeneric("intensity"))
setGeneric("intensity<-", function(object, value) standardGeneric("intensity<-"))
-setGeneric("pm", function(object, subset=NULL, ...) standardGeneric("pm"))
-setGeneric("pm<-", function(object, value) standardGeneric("pm<-"))
-setGeneric("mm", function(object, subset=NULL) standardGeneric("mm"))
-setGeneric("mm<-", function(object, value) standardGeneric("mm<-"))
+setGeneric("pm", function(object, subset=NULL, target='core') standardGeneric("pm"))
+setGeneric("pm<-", function(object, subset=NULL, target='core', value) standardGeneric("pm<-"))
+setGeneric("mm", function(object, subset=NULL, target='core') standardGeneric("mm"))
+setGeneric("mm<-", function(object, subset=NULL, target='core', value) standardGeneric("mm<-"))
setGeneric("bg", function(object, subset=NULL) standardGeneric("bg"))
setGeneric("bg<-", function(object, value) standardGeneric("bg<-"))
setGeneric("logRatioAntisense", function(object) standardGeneric("logRatioAntisense"))
@@ -44,11 +44,11 @@ setGeneric("getY", function(object, type) standardGeneric("getY"))
###
setGeneric("backgroundCorrect",
- function(object, method=backgroundCorrectionMethods(), copy=TRUE, extra, verbose=TRUE, ...)
+ function(object, method=backgroundCorrectionMethods(), copy=TRUE, extra, subset=NULL, target='core', verbose=TRUE)
standardGeneric("backgroundCorrect"))
setGeneric("normalize",
- function(object, method=normalizationMethods(), copy=TRUE, verbose=TRUE, ...)
+ function(object, method=normalizationMethods(), copy=TRUE, subset=NULL, target='core', verbose=TRUE, ...)
standardGeneric("normalize"))
setGeneric("summarize",
@@ -57,7 +57,7 @@ setGeneric("summarize",
standardGeneric("summarize"))
setGeneric("normalizeToTarget",
- function(object, target, method="quantile", copy=TRUE, verbose=TRUE)
+ function(object, targetDist, method="quantile", copy=TRUE, verbose=TRUE)
standardGeneric("normalizeToTarget"))
setGeneric("getNetAffx", function(object, type="probeset") standardGeneric("getNetAffx"))
22 R/methods-FeatureSet.R
View
@@ -62,21 +62,22 @@ setMethod("pm", "FeatureSet",
})
setReplaceMethod("pm", signature(object="FeatureSet", value="matrix"),
- function(object, value){
+ function(object, subset=NULL, target='core', value){
tmp <- exprs(object)
- tmp[pmindex(object),] <- value
+ tmp[pmindex(object, subset=subset, target=target),] <- value
assayDataElementReplace(object, "exprs", tmp)
})
setReplaceMethod("pm", signature(object="FeatureSet", value="ff_matrix"),
- function(object, value){
+ function(object, subset=NULL, target='core', value){
tmp <- exprs(object)
open(tmp)
open(value)
finalizer(value) <- "delete"
nc <- ncol(tmp)
+ pmi <- pmindex(object, subset=subset, target=target)
for (i in 1:nc)
- tmp[pmindex(object), i] <- value[,i]
+ tmp[pmi, i] <- value[,i]
close(value)
close(tmp)
rm(value)
@@ -84,26 +85,27 @@ setReplaceMethod("pm", signature(object="FeatureSet", value="ff_matrix"),
})
setMethod("mm", "FeatureSet",
- function(object, subset=NULL){
- exprs(object)[mmindex(object, subset=subset),, drop=FALSE] ## subset
+ function(object, subset=NULL, target='core'){
+ exprs(object)[mmindex(object, subset=subset, target=target),, drop=FALSE] ## subset
})
setReplaceMethod("mm", signature(object="FeatureSet", value="matrix"),
- function(object, value){
+ function(object, subset=NULL, target='core', value){
tmp <- exprs(object)
- tmp[mmindex(object),] <- value
+ tmp[mmindex(object, subset=subset, target=target),] <- value
assayDataElementReplace(object, "exprs", tmp)
})
setReplaceMethod("mm", signature(object="FeatureSet", value="ff_matrix"),
- function(object, value){
+ function(object, subset=NULL, target='core', value){
tmp <- exprs(object)
open(tmp)
open(value)
finalizer(value) <- "delete"
nc <- ncol(tmp)
+ mmi <- mmindex(object, subset=subset, target=target)
for (i in 1:nc)
- tmp[mmindex(object), i] <- value[,i]
+ tmp[mmi, i] <- value[,i]
close(value)
close(tmp)
rm(value)
8 R/methods-background.R
View
@@ -200,12 +200,12 @@ setMethod("backgroundCorrect", "ff_matrix",
setMethod("backgroundCorrect", "FeatureSet",
- function(object, method=backgroundCorrectionMethods(), copy=TRUE, extra, verbose=TRUE, ...){
+ function(object, method=backgroundCorrectionMethods(), copy=TRUE, extra, subset=NULL, target='core', verbose=TRUE){
method <- match.arg(method, backgroundCorrectionMethods())
if (copy)
object <- cloneFS(object)
if (method == "rma"){
- pm(object) <- backgroundCorrect(pm(object),
+ pm(object, subset=subset, target=target) <- backgroundCorrect(pm(object, subset=subset, target=target),
method="rma",
copy=FALSE, extra=extra,
verbose=verbose)
@@ -214,9 +214,9 @@ setMethod("backgroundCorrect", "FeatureSet",
if (!missing(extra))
if ('griddim' %in% names(extra))
griddim <- extra[["griddim"]]
- out <- bgMASFS(object, griddim=griddim)
+ object <- bgMASFS(object, griddim=griddim)
}else if (method == "LESN"){
- pm(object) <- backgroundCorrect(pm(object),
+ pm(object, subset=subset, target=target) <- backgroundCorrect(pm(object, subset=subset, target=target),
method="LESN",
copy=FALSE, extra=extra,
verbose=verbose)
34 R/methods-normalization.R
View
@@ -98,18 +98,18 @@ setMethod("normalize", "ff_matrix",
})
setMethod("normalizeToTarget", "matrix",
- function(object, target, method="quantile", copy=TRUE, verbose=TRUE){
- stopifnot(!missing(target))
+ function(object, targetDist, method="quantile", copy=TRUE, verbose=TRUE){
+ stopifnot(!missing(targetDist))
method <- match.arg(method, "quantile")
if (verbose) txtMsg("Normalizing using target... ")
- out <- normalize.quantiles.use.target(object, target, copy=copy)
+ out <- normalize.quantiles.use.target(object, targetDist, copy=copy)
if (verbose) msgOK()
return(out)
})
setMethod("normalizeToTarget", "ff_matrix",
- function(object, target, method="quantile", copy=TRUE, verbose=TRUE){
- stopifnot(!missing(target))
+ function(object, targetDist, method="quantile", copy=TRUE, verbose=TRUE){
+ stopifnot(!missing(targetDist))
method <- match.arg(method, "quantile")
if (verbose) txtMsg("Normalizing using target... ")
if (copy){
@@ -118,25 +118,25 @@ setMethod("normalizeToTarget", "ff_matrix",
out <- object
}
if (method == "quantile"){
- quantileNormalizationLDSmaster(out, target)
+ quantileNormalizationLDSmaster(out, targetDist)
}
if (verbose) msgOK()
return(out)
})
setMethod("normalize", "FeatureSet",
- function(object, method=normalizationMethods(), copy=TRUE, verbose=TRUE, ...){
+ function(object, method=normalizationMethods(), copy=TRUE, subset=NULL, target='core', verbose=TRUE, ...){
if (copy)
object <- cloneFS(object)
if (method != 'quantile.in.blocks'){
- pm(object) <- normalize(pm(object), method=method,
+ pm(object, subset=subset, target=target) <- normalize(pm(object, subset=subset, target=target), method=method,
copy=FALSE, verbose=verbose, ...)
}else{
theDots <- list(...)
blocks <- theDots[['blocks']]
- pms <- pm(object)
+ pms <- pm(object, subset=subset, target=target)
if (is.null(blocks)){
- theDots[['blocks']] <- as.factor(probeNames(object))
+ theDots[['blocks']] <- as.factor(probeNames(object, subset=subset, target=target))
}else{
stopifnot(length(blocks) == nrow(pms))
}
@@ -144,7 +144,7 @@ setMethod("normalize", "FeatureSet",
theDots[['method']] <- method
theDots[['copy']] <- copy
theDots[['verbose']] <- verbose
- pm(object) <- do.call('normalize', theDots)
+ pm(object, subset=subset, target=target) <- do.call('normalize', theDots)
}
object
})
@@ -253,7 +253,7 @@ invariantsetV <- function (data, ref, prd.td = c(0.003, 0.007)){
i.set[i.set] <- prd < threshold
ns.old <- ns
ns <- sum(i.set)
- if (prd.td.adj[1] > prd.td[1])
+ if (prd.td.adj[1] > prd.td[1])
prd.td.adj <- prd.td.adj * 0.9
}
n.curve <- smooth.spline(ref[i.set], data[i.set])
@@ -295,7 +295,7 @@ loessNormV <- function(v1, v2, subset, span, degree, weights, family){
index <- c(which.min(x), subset, which.max(x))
xx <- x[index]
yy <- v1[index]-v2[index]
- aux <- loess(yy ~ xx, span=span, degree=degree,
+ aux <- loess(yy ~ xx, span=span, degree=degree,
weights=weights, family=family)
predict(aux, data.frame(xx=x))
}
@@ -324,16 +324,16 @@ loessNorm <- function (mat, subset, epsilon=0.01, maxit=1, log.it=TRUE,
family=family.loess)/J
means[, j] <- means[, j] + aux
means[, k] <- means[, k] - aux
- if (verbose)
+ if (verbose)
message("Done with ", j, " vs ", k, " in iteration ", iter)
}
}
mat <- mat - means
change <- max(colMeans((means[subset, ])^2))
- if (verbose)
+ if (verbose)
message(sprintf("Iteration: %02d - Change: %02.8f", iter, change))
}
- if ((change > epsilon) & (maxit > 1))
+ if ((change > epsilon) & (maxit > 1))
warning("No convergence after ", maxit, " iterations.")
if (log.it) {
return(2^mat)
@@ -374,7 +374,7 @@ normalizeAdv <- function(pmMat, mmMat, pnVec, normType, normPar, verbose=TRUE){
## types of normalization
allowed <- c('quantile', 'quantile.probeset', 'scaling', 'quantile.robust')
normType <- match.arg(normType, allowed)
-
+
## regardless the normType, parameters must be passed as a list
## normPar with (at least) a 'type' element
stopifnot(is.list(normPar), 'type' %in% names(normPar))
33 man/IntensityMatrix-methods.Rd
View
@@ -15,14 +15,14 @@
\alias{pm<-}
\alias{bg<-}
\alias{intensity<-,FeatureSet-method}
-\alias{mm<-,FeatureSet,matrix-method}
-\alias{pm<-,FeatureSet,matrix-method}
+\alias{mm<-,FeatureSet,ANY,ANY,matrix-method}
+\alias{pm<-,FeatureSet,ANY,ANY,matrix-method}
\alias{bg<-,FeatureSet,matrix-method}
-\alias{mm<-,FeatureSet,ff_matrix-method}
-\alias{pm<-,FeatureSet,ff_matrix-method}
+\alias{mm<-,FeatureSet,ANY,ANY,ff_matrix-method}
+\alias{pm<-,FeatureSet,ANY,ANY,ff_matrix-method}
\alias{bg<-,FeatureSet,ff_matrix-method}
-\alias{mm<-,TilingFeatureSet,array-method}
-\alias{pm<-,TilingFeatureSet,array-method}
+\alias{mm<-,TilingFeatureSet,ANY,ANY,array-method}
+\alias{pm<-,TilingFeatureSet,ANY,ANY,array-method}
\alias{bg<-,TilingFeatureSet,array-method}
%% OK!
@@ -33,11 +33,11 @@
}
\usage{
intensity(object)
-mm(object, subset = NULL)
-pm(object, subset = NULL, ...)
+mm(object, subset = NULL, target='core')
+pm(object, subset = NULL, target='core')
bg(object, subset = NULL)
-mm(object)<-value
-pm(object)<-value
+mm(object, subset = NULL, target='core')<-value
+pm(object, subset = NULL, target='core')<-value
bg(object)<-value
}
@@ -45,7 +45,8 @@ bg(object)<-value
\item{object}{\code{FeatureSet} object.}
\item{subset}{Not implemented yet.}
\item{value}{\code{matrix} object.}
- \item{...}{Extra arguments for future implementation.}
+ \item{target}{One of 'probeset', 'core', 'full', 'extended'. This is
+ ignored if the array design is something other than Gene ST or Exon ST.}
}
\details{
@@ -56,6 +57,16 @@ bg(object)<-value
\code{intensity} will return the whole intensity matrix associated to
the object. \code{pm}, \code{mm}, \code{bg} will return the respective
PM/MM/BG matrix.
+
+ When applied to \code{ExonFeatureSet} or \code{GeneFeatureSet}
+ objects, \code{pm} will return the PM matrix at the transcript level
+ ('core' probes) by default. The user should set the \code{target}
+ argument accordingly if something else is desired. The valid values
+ are: 'probeset' (Exon and Gene arrays), 'core' (Exon and Gene arrays),
+ 'full' (Exon arrays) and 'extended' (Exon arrays).
+
+ The \code{target} argument has no effects when used on designs other
+ than Gene and Exon ST.
}
\examples{
11 man/preprocessTools.Rd
View
@@ -34,21 +34,24 @@
backgroundCorrectionMethods()
normalizationMethods()
summarizationMethods()
-backgroundCorrect(object, method=backgroundCorrectionMethods(), copy=TRUE, extra, verbose=TRUE, ...)
+backgroundCorrect(object, method=backgroundCorrectionMethods(), copy=TRUE, extra, subset=NULL, target='core', verbose=TRUE)
summarize(object, probes=rownames(object), method="medianpolish", verbose=TRUE, ...)
-normalize(object, method=normalizationMethods(), copy=TRUE, verbose=TRUE, ...)
-normalizeToTarget(object, target, method="quantile", copy=TRUE, verbose=TRUE)
+normalize(object, method=normalizationMethods(), copy=TRUE, subset=NULL,target='core', verbose=TRUE, ...)
+normalizeToTarget(object, targetDist, method="quantile", copy=TRUE, verbose=TRUE)
}
\arguments{
\item{object}{Object containing probe intensities to be preprocessed.}
\item{method}{String determining which method to use at that
preprocessing step.}
- \item{target}{Vector with the target distribution}
+ \item{targetDist}{Vector with the target distribution}
\item{probes}{Character vector that identifies the name of the probes represented
by the rows of \code{object}.}
\item{copy}{Logical flag determining if data must be copied before
processing (TRUE), or if data can be overwritten (FALSE).}
+ \item{subset}{Not yet implemented.}
+ \item{target}{One of the following values: 'core', 'full', 'extended',
+ 'probeset'. Used only with Gene ST and Exon ST designs.}
\item{extra}{Extra arguments to be passed to other methods.}
\item{verbose}{Logical flag for verbosity.}
\item{\dots}{Arguments to be passed to methods.}

No commit comments for this range

Something went wrong with that request. Please try again.