Browse code

Removed 'signed=FALSE' args from calls to readBin() in readIDAT() and readBPM() when size is something other than 1 or 2 (produced warnings - thanks to Kasper Daniel Hansen for reporting this)

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

unknown authored on 29/09/2011 07:09:34
Showing2 changed files

... ...
@@ -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.11.4
4
+Version: 1.11.5
5 5
 Date: 2010-12-10
6 6
 Author: Benilton S Carvalho <Benilton.Carvalho@cancer.org.uk>, Robert Scharpf <rscharpf@jhsph.edu>, Matt Ritchie <mritchie@wehi.edu.au>, Ingo Ruczinski <iruczins@jhsph.edu>, Rafael A Irizarry
7 7
 Maintainer: Benilton S Carvalho <Benilton.Carvalho@cancer.org.uk>, Robert Scharpf <rscharpf@jhsph.edu>, Matt Ritchie <mritchie@wehi.EDU.AU>
... ...
@@ -161,13 +161,13 @@ readIDAT <- function(idatFile){
161 161
   }
162 162
 
163 163
   versionNumber <- readBin(tempCon, "integer", n=1, size=8,
164
-                           endian="little", signed=FALSE)
164
+                           endian="little")
165 165
 
166 166
   if(versionNumber<3)
167 167
 	  stop("Older style IDAT files not supported:  consider updating your scanner settings")
168 168
 
169 169
   nFields <- readBin(tempCon, "integer", n=1, size=4,
170
-                     endian="little", signed=FALSE)
170
+                     endian="little")
171 171
 
172 172
   fields <- matrix(0,nFields,3);
173 173
   colnames(fields) <- c("Field Code", "Byte Offset", "Bytes")
... ...
@@ -175,7 +175,7 @@ readIDAT <- function(idatFile){
175 175
     fields[i1,"Field Code"] <-
176 176
       readBin(tempCon, "integer", n=1, size=2, endian="little", signed=FALSE)
177 177
     fields[i1,"Byte Offset"] <-
178
-      readBin(tempCon, "integer", n=1, size=8, endian="little", signed=FALSE)
178
+      readBin(tempCon, "integer", n=1, size=8, endian="little")
179 179
   }
180 180
 
181 181
   knownCodes <- c(1000, 102, 103, 104, 107, 200, 300, 400,
... ...
@@ -214,11 +214,11 @@ readIDAT <- function(idatFile){
214 214
 
215 215
   seek(tempCon, fields["nSNPsRead", "Byte Offset"])
216 216
   nSNPsRead <- readBin(tempCon, "integer", n=1, size=4,
217
-                       endian="little", signed=FALSE)
217
+                       endian="little")
218 218
 
219 219
   seek(tempCon, fields["IlluminaID", "Byte Offset"])
220 220
   IlluminaID <- readBin(tempCon, "integer", n=nSNPsRead, size=4,
221
-                       endian="little", signed=FALSE)
221
+                       endian="little")
222 222
 
223 223
   seek(tempCon, fields["SD", "Byte Offset"])
224 224
   SD <- readBin(tempCon, "integer", n=nSNPsRead, size=2,
... ...
@@ -233,13 +233,13 @@ readIDAT <- function(idatFile){
233 233
 
234 234
   seek(tempCon, fields["MidBlock", "Byte Offset"])
235 235
   nMidBlockEntries <- readBin(tempCon, "integer", n=1, size=4,
236
-                              endian="little", signed=FALSE)
236
+                              endian="little")
237 237
   MidBlock <- readBin(tempCon, "integer", n=nMidBlockEntries, size=4,
238
-                      endian="little", signed=FALSE)
238
+                      endian="little")
239 239
 
240 240
   seek(tempCon, fields["RunInfo", "Byte Offset"])
241 241
   nRunInfoBlocks <- readBin(tempCon, "integer", n=1, size=4,
242
-                            endian="little", signed=FALSE)
242
+                            endian="little")
243 243
   RunInfo <- matrix(NA, nRunInfoBlocks, 5)
244 244
   colnames(RunInfo) <- c("RunTime", "BlockType", "BlockPars",
245 245
                          "BlockCode", "CodeVersion")
... ...
@@ -252,7 +252,7 @@ readIDAT <- function(idatFile){
252 252
 
253 253
   seek(tempCon, fields["RedGreen", "Byte Offset"])
254 254
   RedGreen <- readBin(tempCon, "numeric", n=1, size=4,
255
-                      endian="little", signed=FALSE)
255
+                      endian="little")
256 256
   #RedGreen <- readBin(tempCon, "integer", n=4, size=1,
257 257
   #                    endian="little", signed=FALSE)
258 258
 
... ...
@@ -346,7 +346,7 @@ readBPM <- function(bpmFile){
346 346
   ## should be 1
347 347
 
348 348
   versionNumber <-
349
-    readBin(tempCon, "integer", n=1, size=4, endian="little", signed=FALSE)
349
+    readBin(tempCon, "integer", n=1, size=4, endian="little")
350 350
   ## should be 4
351 351
 
352 352
   nChars <- readBin(tempCon, "integer", n=1, size=1, signed=FALSE)
... ...
@@ -358,13 +358,13 @@ readBPM <- function(bpmFile){
358 358
 
359 359
   entriesByteOffset <- seek(tempCon);
360 360
   nEntries <- readBin(tempCon, "integer", n=1, size=4,
361
-                      endian="little", signed=FALSE)
361
+                      endian="little")
362 362
 
363 363
   if(FALSE){
364 364
 
365 365
     snpIndexByteOffset <- seek(tempCon)
366 366
     snpIndex <- readBin(tempCon, "integer", n=nEntries, size=4,
367
-                        endian="little", signed=FALSE)
367
+                        endian="little")
368 368
     ## for the 1M array, these are simply in order from 1 to 1072820.
369 369
 
370 370
     snpNamesByteOffset <- seek(tempCon)