Browse code

Removed scanDate slot from eSet and replaced it with protocolData slot. Also updated eSet objects and bumped package version numbers.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/crlmm@40809 bc3139a8-67e5-0310-9ffc-ced21a209358

Patrick Aboyoun authored on 24/07/2009 03:16:33
Showing11 changed files

... ...
@@ -182,7 +182,7 @@ is decoded and scanned
182 182
 2009-07-01 M Ritchie - committed version 1.3.7
183 183
 
184 184
 * made memory savings to reading and normalization if Illumina data
185
-* Now use 'scanDates' slot to save scan dates instead of saving them in phenoData slot
185
+* Now use 'protocolData' slot to save scan dates instead of saving them in phenoData slot
186 186
 * added vignette for genoytping illumina data (crlmmIllumina.pdf in inst/doc and crlmmIllumina.Rnw in inst/scripts)
187 187
 * Changed stop() to warning() when idats are of different type in readIdatFiles()
188 188
 
... ...
@@ -226,7 +226,7 @@ is decoded and scanned
226 226
 
227 227
 2009-07-16 R Scharpf - committed version 1.3.12
228 228
 
229
-* scanDates replacement method for CrlmmSetList objects
229
+* protocolData replacement method for CrlmmSetList objects
230 230
 
231 231
 * added .man page for .computeCopynumber 
232 232
 
... ...
@@ -1,14 +1,14 @@
1 1
 Package: crlmm
2 2
 Type: Package
3 3
 Title: Genotype Calling (CRLMM) and Copy Number Analysis tool for Affymetrix SNP 5.0 and 6.0 and Illumina arrays.
4
-Version: 1.3.14
5
-Date: 2009-06-17
4
+Version: 1.3.15
5
+Date: 2009-07-22
6 6
 Author: Rafael A Irizarry, Benilton S Carvalho <bcarvalh@jhsph.edu>, Robert Scharpf <rscharpf@jhsph.edu>, Matt Ritchie <mritchie@wehi.EDU.AU>
7 7
 Maintainer: Benilton S Carvalho <bcarvalh@jhsph.edu>, Robert Scharpf <rscharpf@jhsph.edu>, Matt Ritchie <mritchie@wehi.EDU.AU>
8 8
 Description: Faster implementation of CRLMM specific to SNP 5.0 and 6.0 arrays, as well as a copy number tool specific to 6.0.
9 9
 License: Artistic-2.0
10 10
 Depends: methods
11
-Imports: affyio, preprocessCore, utils, stats, genefilter, splines, Biobase (>= 2.5.3), mvtnorm, oligoClasses, ellipse, methods
11
+Imports: affyio, preprocessCore, utils, stats, genefilter, splines, Biobase (>= 2.5.5), mvtnorm, oligoClasses, ellipse, methods
12 12
 Suggests: hapmapsnp5, hapmapsnp6, genomewidesnp5Crlmm (>= 1.0.2),genomewidesnp6Crlmm (>= 1.0.2), GGdata, snpMatrix, VanillaICE (>= 1.7.8)
13 13
 Collate: AllClasses.R
14 14
 	 AllGenerics.R
... ...
@@ -8,12 +8,13 @@ importClassesFrom(Biobase, AnnotatedDataFrame, AssayData, eSet,
8 8
 importClassesFrom(oligoClasses, SnpLevelSet)
9 9
 
10 10
 importMethodsFrom(Biobase, annotation, "annotation<-", annotatedDataFrameFrom,
11
-		  assayData, "assayData<-", combine, dims,
12
-		  experimentData, "experimentData<-",
11
+                  assayData, "assayData<-", combine, dims,
12
+                  experimentData, "experimentData<-",
13 13
                   fData, featureData, "featureData<-", featureNames,
14
-		  fvarMetadata, fvarLabels,
15
-                  pData, phenoData, "phenoData<-", pubMedIds, rowMedians, sampleNames, scanDates,
16
-                  "scanDates<-", storageMode, "storageMode<-", updateObject, varLabels)
14
+                  fvarMetadata, fvarLabels,
15
+                  pData, phenoData, "phenoData<-", protocolData, "protocolData<-",
16
+                  pubMedIds, rowMedians, sampleNames,
17
+                  storageMode, "storageMode<-", updateObject, varLabels)
17 18
 
18 19
 
19 20
 ##importMethodsFrom(oligoClasses, chromosome, copyNumber, position)
... ...
@@ -82,8 +83,8 @@ export(batch,
82 83
        position,
83 84
        readIdatFiles,
84 85
        sampleNames,
85
-       scanDates,
86
-       "scanDates<-",
86
+       protocolData,
87
+       "protocolData<-",
87 88
        snprma)
88 89
 
89 90
 
... ...
@@ -199,7 +199,7 @@ harmonizeSnpSet <- function(crlmmResult, ABset){
199 199
 			   callProbability=crlmmConf,
200 200
 			   featureData=fD,
201 201
 			   phenoData=phenoData(crlmmResult),
202
-			   scanDates=scanDates(ABset),
202
+			   protocolData=protocolData(ABset),
203 203
 			   annotation=annotation(ABset))
204 204
 	stopifnot(all.equal(dimnames(crlmmResult), dimnames(ABset)))
205 205
 	crlmmResult
... ...
@@ -235,7 +235,7 @@ crlmmIlluminaWrapper <- function(sampleSheet, outdir="./", cdfName,
235 235
 		load(file.path(outdir, "crlmmOut.rda"))		
236 236
 	}
237 237
 	ABset <- combineIntensities(res, NULL, cdfName=cdfName)
238
-	scanDates(ABset) <- as.character(pData(RG)$ScanDate)
238
+	protocolData(ABset)[["ScanDate"]] <- as.character(pData(RG)$ScanDate)
239 239
 	crlmmResult <- harmonizeSnpSet(crlmmOut, ABset)
240 240
 	stopifnot(all.equal(dimnames(crlmmOut), dimnames(ABset)))
241 241
 	crlmmList <- list(ABset,
... ...
@@ -274,7 +274,7 @@ crlmmWrapper <- function(filenames, outdir="./", cdfName="genomewidesnp6",
274 274
 	}
275 275
 	load(file.path(outdir, "intensities.rda"))
276 276
 	ABset <- combineIntensities(res, cnrmaResult, cdfName)
277
-	scanDates(ABset) <- as.character(celDates(filenames))	
277
+	protocolData(ABset)[["ScanDate"]] <- as.character(celDates(filenames))	
278 278
 	crlmmResult <- harmonizeSnpSet(crlmmResult, ABset)
279 279
 	stopifnot(all.equal(dimnames(crlmmResult), dimnames(ABset)))
280 280
 	crlmmResults <- list(ABset,
... ...
@@ -139,8 +139,9 @@ readIdatFiles <- function(sampleSheet=NULL, arrayNames=NULL, ids=NULL, path=".",
139 139
 	       rm(R)
140 140
 	       gc()
141 141
        }
142
-       if(saveDate)
143
-	       RG@scanDates = dates$scan
142
+       if(saveDate) {
143
+	       protocolData(RG)[["ScanDate"]] = dates$scan
144
+       }
144 145
        storageMode(RG) = "lockedEnvironment"
145 146
        RG
146 147
 }
... ...
@@ -456,7 +457,7 @@ RGtoXY = function(RG, chipType, verbose=TRUE) {
456 457
   rownames(tmpmat) = ids
457 458
   colnames(tmpmat) = sampleNames(RG)
458 459
   XY = new("NChannelSet", X=tmpmat, Y=tmpmat, Xnb=tmpmat, Ynb=tmpmat, Xse=tmpmat, Yse=tmpmat, zero=tmpmat,
459
-                 annotation=chipType, phenoData=RG@phenoData, scanDates=RG@scanDates, storage.mode="environment")
460
+                 annotation=chipType, phenoData=RG@phenoData, protocolData=RG@protocolData, storage.mode="environment")
460 461
   rm(tmpmat)
461 462
   gc()
462 463
   
... ...
@@ -90,11 +90,6 @@ setMethod("points", signature(x="CrlmmSetList"),
90 90
 	  })
91 91
 
92 92
 setMethod("sampleNames", "CrlmmSetList", function(object) sampleNames(object[[1]]))
93
-setMethod("scanDates", "CrlmmSetList", function(object) scanDates(object[[1]]))
94
-setReplaceMethod("scanDates", signature(object="CrlmmSetList", value="character"), function(object, value){
95
-	scanDates(object[[1]]) <- value
96
-	return(object)
97
-}) 
98 93
 
99 94
 setMethod("show", "CrlmmSetList", function(object){
100 95
 	for(i in seq(along=object)) show(object[[i]])
... ...
@@ -107,8 +107,8 @@ sns <- sampleNames(crlmmResults)
107 107
 sns[1]
108 108
 plate <- substr(basename(sns), 13, 13)
109 109
 table(plate)
110
-table(format(as.POSIXlt(scanDates(crlmmResults)), "%d %b %Y"), plate)
111
-dts <- scanDates(crlmmResults)
110
+table(format(as.POSIXlt(protocolData(crlmmResults)[["ScanDate"]]), "%d %b %Y"), plate)
111
+dts <- protocolData(crlmmResults)[["ScanDate"]]
112 112
 @ 
113 113
 
114 114
 As all of these samples were run on the first week of March, we would
... ...
@@ -122,7 +122,7 @@ chemistry plate as an argument for \Robject{batch} in the
122 122
 if(!exists("crlmmResults2")){
123 123
 	crlmmResults2 <- crlmmResults
124 124
 	crlmmResults <- computeCopynumber(crlmmResults, SNRmin=5, batch=plate, CHR=CHR, cdfName="genomewidesnp6")
125
-	scanDates(crlmmResults[[3]]) <- scanDates(crlmmResults[[3]])
125
+	protocolData(crlmmResults[[3]])[["ScanDate"]] <- protocolData(crlmmResults[[3]])[["ScanDate"]]
126 126
 }
127 127
 @ 
128 128
 
... ...
@@ -80,7 +80,7 @@ was 1.2 GB of RAM on our linux system.
80 80
 The \Robject{RG} object is an \Rclass{NChannelSet} which stores the 
81 81
 Red and Green intensities, the number of beads and standard errors for 
82 82
 each bead-type.  
83
-The scanning date of each array is stored in the \Robject{scanDates} slot.
83
+The scanning date of each array is stored in the \Robject{protocolData} slot.
84 84
 
85 85
 <<explore>>=
86 86
 class(RG)
... ...
@@ -92,7 +92,7 @@ exprs(channel(RG, "G"))[1:5,1:5]
92 92
 pd = pData(RG)
93 93
 pd[1:5,]
94 94
 
95
-scandatetime = strptime(scanDates(RG), "%m/%d/%Y %H:%M:%S %p")
95
+scandatetime = strptime(protocolData(RG)[["ScanDate"]], "%m/%d/%Y %H:%M:%S %p")
96 96
 datescanned = substr(scandatetime, 1, 10)
97 97
 scanbatch =  factor(datescanned)
98 98
 levels(scanbatch) = 1:16
... ...
@@ -9,7 +9,7 @@
9 9
 \title{Class "ABset"}
10 10
 \description{Containter for quantile-normalized intensities}
11 11
 \section{Objects from the Class}{
12
-Objects can be created by calls of the form \code{new("ABset", assayData, phenoData, featureData, experimentData, annotation, scanDates, ...)}.
12
+Objects can be created by calls of the form \code{new("ABset", assayData, phenoData, featureData, experimentData, annotation, protocolData, ...)}.
13 13
 }
14 14
 \section{Slots}{
15 15
 	 \describe{
... ...
@@ -18,7 +18,7 @@ Objects can be created by calls of the form \code{new("ABset", assayData, phenoD
18 18
     \item{\code{featureData}:}{Object of class \code{"AnnotatedDataFrame"} }
19 19
     \item{\code{experimentData}:}{Object of class \code{"MIAME"} }
20 20
     \item{\code{annotation}:}{Object of class \code{"character"}  }
21
-    \item{\code{scanDates}:}{Object of class \code{"character"}  }
21
+    \item{\code{protocolData}:}{Object of class \code{"AnnotatedDataFrame"}  }
22 22
     \item{\code{.__classVersion__}:}{Object of class \code{"Versions"}  }
23 23
   }
24 24
 }
... ...
@@ -20,7 +20,7 @@
20 20
 \description{Container for allele-specific estimates of copy number and
21 21
   the corresponding uncertainty}
22 22
 \section{Objects from the Class}{
23
-Objects can be created by calls of the form \code{new("CopyNumberSet", assayData, phenoData, featureData, experimentData, annotation, scanDates, ...)}.
23
+Objects can be created by calls of the form \code{new("CopyNumberSet", assayData, phenoData, featureData, experimentData, annotation, protocolData, ...)}.
24 24
 }
25 25
 \section{Slots}{
26 26
 	 \describe{
... ...
@@ -29,7 +29,7 @@ Objects can be created by calls of the form \code{new("CopyNumberSet", assayData
29 29
     \item{\code{featureData}:}{Object of class \code{"AnnotatedDataFrame"} }
30 30
     \item{\code{experimentData}:}{Object of class \code{"MIAME"}  }
31 31
     \item{\code{annotation}:}{Object of class \code{"character"}  }
32
-    \item{\code{scanDates}:}{Object of class \code{"character"} }
32
+    \item{\code{protocolData}:}{Object of class \code{"AnnotatedDataFrame"} }
33 33
     \item{\code{.__classVersion__}:}{Object of class \code{"Versions"}  }
34 34
   }
35 35
 }
... ...
@@ -20,8 +20,6 @@
20 20
 \alias{points,CrlmmSetList-method}
21 21
 \alias{position,CrlmmSetList-method}
22 22
 \alias{sampleNames,CrlmmSetList-method}
23
-\alias{scanDates,CrlmmSetList-method}
24
-\alias{scanDates<-,CrlmmSetList,character-method}
25 23
 \alias{show,CrlmmSetList-method}
26 24
 \alias{snpIndex,CrlmmSetList-method}
27 25
 
... ...
@@ -122,13 +120,6 @@
122 120
     \item{"sampleNames"}{\code{signature(object = "CrlmmSetList")}:
123 121
       Accessor for the column identifiers of the assay data elements.  }
124 122
 
125
-    \item{"scanDates"}{\code{signature(object = "CrlmmSetList")}:
126
-      Accessor for the timestamp when the array was processed.  }
127
-
128
-    \item{"scanDates<-"}{\code{signature(object = "CrlmmSetList",
129
-      value="character")}: Add dates to the scanDates slot in the first
130
-      element of the \code{CrlmmSetList} object.  }
131
-
132 123
     \item{"show"}{\code{signature(object = "CrlmmSetList")}:
133 124
       Shows the \code{ABset} and \code{SnpSet} elements of the list.  }
134 125