Skip to content

Commit 59d377b

Browse files
author
khansen
committed
Changed manifest and annotation constructors
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/minfi@68830 bc3139a8-67e5-0310-9ffc-ced21a209358
1 parent 3d87089 commit 59d377b

5 files changed

+23
-9
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: minfi
2-
Version: 1.3.3
2+
Version: 1.3.4
33
Title: Analyze Illumina's 450k methylation arrays
44
Description: Tools for analyzing and visualizing Illumina's 450k array data
55
Author: Kasper Daniel Hansen, Martin Aryee

NAMESPACE

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ importClassesFrom(Biobase, aggregator, container, eSet,
88
Versions, VersionsNull, Versioned, VersionedBiobase,
99
ScalarObject, ScalarInteger, ScalarLogical, ScalarNumeric,
1010
ScalarCharacter)
11-
1211
importMethodsFrom(Biobase, "[", "[[", "$", abstract, aggenv, aggfun,
1312
annotatedDataFrameFrom, annotation,
1413
channel, channelNames, coerce,
@@ -42,7 +41,6 @@ import(GenomicRanges)
4241
importFrom(Biobase, assayDataElementNames,
4342
assayDataElement, assayDataElementReplace, "assayDataElement<-",
4443
"cache", "copyEnv", "copySubstitute")
45-
4644
importFrom(reshape, melt)
4745
importFrom(mclust, Mclust)
4846
importFrom(RColorBrewer, brewer.pal)
@@ -53,9 +51,10 @@ importFrom(limma, squeezeVar, lmFit, eBayes, contrasts.fit)
5351
importFrom(preprocessCore, normalize.quantiles)
5452
importFrom(crlmm, readIDAT)
5553

56-
export(manifestNew, getManifest, getProbeData, getProbeInfo, getManifestInfo,
54+
export(getManifest, getProbeData, getProbeInfo, getManifestInfo,
5755
getControlAddress, getRed, getGreen, getMeth, getUnmeth,
5856
getBeta, getM, dmpFinder, mdsPlot, plotCpg, preprocessRaw,
57+
IlluminaMethylationManifest, IlluminaMethylationAnnotation,
5958
normalize.illumina.control, bgcorrect.illumina, preprocessIllumina,
6059
preprocessSWAN, plotBetasByType,
6160
detectionP, qcReport, controlStripPlot, densityBeanPlot, densityPlot,

R/class.R

+15-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ setMethod("show", "IlluminaMethylationManifest", function(object) {
152152
cat("Number of control probes:", nrow(object@data[["TypeControl"]]), "\n")
153153
})
154154

155-
manifestNew <- function(TypeI = new("data.frame"), TypeII = new("data.frame"),
155+
IlluminaMethylationManifest <- function(TypeI = new("data.frame"), TypeII = new("data.frame"),
156156
TypeControl = new("data.frame"), annotation = "") {
157157
data <- new.env(parent = emptyenv())
158158
data[["TypeI"]] <- TypeI
@@ -163,7 +163,6 @@ manifestNew <- function(TypeI = new("data.frame"), TypeII = new("data.frame"),
163163
manifest
164164
}
165165

166-
167166
setClass("IlluminaMethylationAnnotation",
168167
representation(data = "environment",
169168
annotation = "character"))
@@ -178,3 +177,17 @@ setMethod("show", "IlluminaMethylationAnnotation", function(object) {
178177
cat("Annotation:", object@annotation, "\n")
179178
})
180179

180+
IlluminaMethylationAnnotation <- function(listOfObjects,
181+
annotation = "") {
182+
data <- new.env(parent = emptyenv())
183+
stopifnot(all(c("Locations.hg18", "Locations.hg19") %in% names(listOfObjects)))
184+
for(nam in names(listOfObjects)) {
185+
cat(nam, "\n")
186+
assign(nam, listOfObjects[[nam]], envir = data)
187+
}
188+
lockEnvironment(data, bindings = TRUE)
189+
anno <- new("IlluminaMethylationAnnotation",
190+
annotation = annotation, data = data)
191+
anno
192+
}
193+

man/IlluminaMethylationAnnotation-class.Rd

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
\Rdversion{1.1}
33
\docType{class}
44
\alias{IlluminaMethylationAnnotation-class}
5+
\alias{IlluminaMethylationAnnotation}
56
\alias{show,IlluminaMethylationAnnotation-method}
67
\title{Class \code{"IlluminaMethylationAnnotation"}}
78
\description{
@@ -12,7 +13,8 @@
1213
}
1314
\section{Objects from the Class}{
1415
Objects can be created by calls of the form
15-
\code{new("IlluminaMethylationAnnotation", ...)}.
16+
\code{new("IlluminaMethylationAnnotation", ...)}, but the preferred way
17+
is to use \code{IlluminaMethylationAnnotation()}.
1618
}
1719
\section{Slots}{
1820
\describe{

man/IlluminaMethylationManifest-class.Rd

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
\Rdversion{1.1}
33
\docType{class}
44
\alias{IlluminaMethylationManifest-class}
5-
\alias{manifestNew}
5+
\alias{IlluminaMethylationManifest}
66
\alias{show,IlluminaMethylationManifest-method}
77
\title{Class \code{"IlluminaMethylationManifest"}}
88
\description{
@@ -12,7 +12,7 @@
1212
\section{Objects from the Class}{
1313
Objects can be created by calls of the form
1414
\code{new("IlluminaMethylationManifest", ...)}, but the preferred way is
15-
to use \code{manifestNew()}.
15+
to use \code{IlluminaMethylationManifest()}.
1616
}
1717
\section{Slots}{
1818
\describe{

0 commit comments

Comments
 (0)