Browse code

fixed bug in initialization of SnpCallSetPlus

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

Rob Scharp authored on 19/11/2009 15:35:57
Showing 4 changed files

... ...
@@ -332,3 +332,7 @@ is decoded and scanned
332 332
  * added CNSet class
333 333
  * segmentData slot in CNSet class is an extension of RangedData (defined in IRanges package)
334 334
 
335
+2009-11-19 R. Scharpf - committed version 1.5.6
336
+
337
+ * fixed bug in initialization of SnpCallSetPlus
338
+
... ...
@@ -1,7 +1,7 @@
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.5.5
4
+Version: 1.5.6
5 5
 Date: 2009-11-15
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>
... ...
@@ -148,34 +148,33 @@ setMethod("computeHmm", "CNSet", function(object, hmmOptions){
148 148
 ## Genotype everything to get callSetPlus objects
149 149
 ## Go from callSets to Segments sets, writing only the segment set to file
150 150
 ## Safe, but very inefficient. Writes the quantile normalized data to file several times...
151
-setMethod("computeHmm", "character", function(object, hmmOptions){
152
-	outdir <- cnOptions[["outdir"]]
153
-	hmmOptions <- hmmOptions[["hmmOpts"]]
154
-	filenames <- object
155
-	for(i in seq(along=filenames)){
156
-		chrom <- gsub(".rda", "", strsplit(filenames[i], "_")[[1]][[2]])
157
-		if(hmmOptions[["verbose"]])
158
-			message("Fitting HMM to chromosome ", chrom)
159
-		if(file.exists(filenames[i])){
160
-			message("Loading ", filenames[i])
161
-			load(filenames[i])
162
-			cnSet <- get("cnSet")
163
-		} else {
164
-			stop("File ", filenames[i], " does not exist.")
165
-		}
166
-		hmmOptions$emission <- computeEmission(filenames[i], hmmOptions)
167
-		cnSet <- computeHmm(cnSet, hmmOptions)
168
-		##MIN.MARKERS <- hmmOptions[["MIN.MARKERS"]]
169
-		##segmentSet <- segments[segments$nprobes >= MIN.MARKERS, ]
170
-		message("Saving ", file.path(outdir, paste("cnSet_", chrom, ".rda", sep="")))
171
-		save(cnSet,
172
-		     file=file.path(outdir, paste("cnSet_", chrom, ".rda", sep="")))
173
-		unlink(file.path(outdir, paste("cnSet_", chrom, ".rda", sep="")))
174
-	}
175
-	fns <- list.files(outdir, pattern="cnSet", full.names=TRUE)
176
-	return(fns)	
177
-})
178
-
151
+##setMethod("computeHmm", "character", function(object, hmmOptions){
152
+##	outdir <- cnOptions[["outdir"]]
153
+##	hmmOptions <- hmmOptions[["hmmOpts"]]
154
+##	filenames <- object
155
+##	for(i in seq(along=filenames)){
156
+##		chrom <- gsub(".rda", "", strsplit(filenames[i], "_")[[1]][[2]])
157
+##		if(hmmOptions[["verbose"]])
158
+##			message("Fitting HMM to chromosome ", chrom)
159
+##		if(file.exists(filenames[i])){
160
+##			message("Loading ", filenames[i])
161
+##			load(filenames[i])
162
+##			cnSet <- get("cnSet")
163
+##		} else {
164
+##			stop("File ", filenames[i], " does not exist.")
165
+##		}
166
+##		hmmOptions$emission <- computeEmission(filenames[i], hmmOptions)
167
+##		cnSet <- computeHmm(cnSet, hmmOptions)
168
+##		##MIN.MARKERS <- hmmOptions[["MIN.MARKERS"]]
169
+##		##segmentSet <- segments[segments$nprobes >= MIN.MARKERS, ]
170
+##		message("Saving ", file.path(outdir, paste("cnSet_", chrom, ".rda", sep="")))
171
+##		save(cnSet,
172
+##		     file=file.path(outdir, paste("cnSet_", chrom, ".rda", sep="")))
173
+##		unlink(file.path(outdir, paste("cnSet_", chrom, ".rda", sep="")))
174
+##	}
175
+##	fns <- list.files(outdir, pattern="cnSet", full.names=TRUE)
176
+##	return(fns)	
177
+##})
179 178
 
180 179
 
181 180
 setValidity("CNSet", function(object) {
... ...
@@ -32,7 +32,7 @@ setMethod("initialize", "SnpCallSetPlus",
32 32
 		  ## Do after annotation has been assigned
33 33
 		  if(!(all(c("chromosome", "position", "isSnp")  %in% colnames(.Object@featureData)))){
34 34
 			  ##update the featureData
35
-			  .Object@featureData <- addFeatureAnnotation.SnpCallSetPlus(object)
35
+			  .Object@featureData <- addFeatureAnnotation.SnpCallSetPlus(.Object)
36 36
 		  }
37 37
 		  .Object
38 38
           })