Browse code

Fixed bug in totalCopynumber for datasets with more than 2000 samples.

Need is.ff to be true for ffdf objects

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

Rob Scharp authored on 30/08/2010 19:41:24
Showing 1 changed files

... ...
@@ -323,7 +323,7 @@ C1 <- function(object, marker.index, batch.index, sample.index){
323 323
 	if(length(acn) > 1){
324 324
 		acn <- do.call("cbind", acn)
325 325
 	} else acn <- acn[[1]]
326
-	return(acn)
326
+	return(as.matrix(acn))
327 327
 }
328 328
 
329 329
 ## allele B  (allele 'A' for chromosome X NPs)
... ...
@@ -344,7 +344,7 @@ C2 <- function(object, marker.index, batch.index, sample.index, NP.X=FALSE){
344 344
 	if(length(acn) > 1){
345 345
 		acn <- do.call("cbind", acn)
346 346
 	} else acn <- acn[[1]]
347
-	return(acn)
347
+	return(as.matrix(acn))
348 348
 }
349 349
 
350 350
 ## Chromosome X SNPs
... ...
@@ -382,7 +382,7 @@ C3 <- function(object, allele, marker.index, batch.index, sample.index){
382 382
 	if(length(acn) > 1){
383 383
 		acn <- do.call("cbind", acn)
384 384
 	} else acn <- acn[[1]]
385
-	return(acn)
385
+	return(as.matrix(acn))
386 386
 }
387 387
 
388 388
 
... ...
@@ -390,7 +390,7 @@ C3 <- function(object, allele, marker.index, batch.index, sample.index){
390 390
 
391 391
 ACN <- function(object, allele, i , j){
392 392
 	if(missing(i) & missing(j)) stop("must specify rows (i) or columns (j)")
393
-	is.ff <- is(calls(object), "ff")
393
+	is.ff <- is(calls(object), "ff") | is(calls(object), "ffdf")
394 394
 	missing.i <- missing(i)
395 395
 	missing.j <- missing(j)
396 396
 	if(!missing.i){