git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/crlmm@49129 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -447,32 +447,7 @@ setMethod("copyNumber", "CNSet", function(object){ |
447 | 447 |
CN |
448 | 448 |
}) |
449 | 449 |
|
450 |
-setMethod("totalCopyNumber", "CNSet", function(object, i, j){ |
|
451 |
- if(missing(i) & missing(j)){ |
|
452 |
- if(inherits(CA(object), "ff") | inherits(CA(object), "ffdf")) stop("Must specify i and/or j for ff objects") |
|
453 |
- } |
|
454 |
- if(missing(i) & !missing(j)){ |
|
455 |
- snp.index <- which(isSnp(object)) |
|
456 |
- cn.total <- as.matrix(CA(cnSet)[, j]) |
|
457 |
- cb <- as.matrix(CB(cnSet)[snp.index, j] ) |
|
458 |
- cn.total[snp.index, ] <- cn.total[snp.index, ] + cb |
|
459 |
- } |
|
460 |
- if(!missing(i) & missing(j)){ |
|
461 |
- snp.index <- intersect(which(isSnp(object)), i) |
|
462 |
- cn.total <- as.matrix(CA(cnSet)[i, ]) |
|
463 |
- cb <- as.matrix(CB(cnSet)[snp.index, ]) |
|
464 |
- cn.total[snp.index, ] <- cn.total[snp.index, ] + cb |
|
465 |
- } |
|
466 |
- if(!missing(i) & !missing(j)){ |
|
467 |
- snp.index <- intersect(which(isSnp(object)), i) |
|
468 |
- cn.total <- as.matrix(CA(cnSet)[i, j]) |
|
469 |
- cb <- as.matrix(CB(cnSet)[snp.index, j]) |
|
470 |
- cn.total[snp.index, ] <- cn.total[snp.index, ] + cb |
|
471 |
- } |
|
472 |
- cn.total <- cn.total/100 |
|
473 |
- dimnames(cn.total) <- NULL |
|
474 |
- return(cn.total) |
|
475 |
-}) |
|
450 |
+ |
|
476 | 451 |
|
477 | 452 |
##setMethod("copyNumber", "CNSet", function(object){ |
478 | 453 |
## I <- isSnp(object) |