Browse code

Bug in copy number accessors fixed.

This fixes a bug that occurs when CA() or CB() for a random subset of
samples with mixed batches was accessed -- the order of samples
returned was incorrect. The dimnames of the resulting object are
returned as well.

copynumber.pdf vignette also updated

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

Rob Scharp authored on 16/02/2011 15:58:23
Showing2 changed files

... ...
@@ -510,7 +510,7 @@ ACN <- function(object, allele, i , j){
510 510
 		if(any(is.auto)){
511 511
 			auto.index <- which(is.auto & is.snp)
512 512
 			if(length(auto.index) > 0){
513
-				marker.index <- i[is.auto]
513
+				marker.index <- i[auto.index]
514 514
 				acn[auto.index, ] <- C2(object, marker.index, batch.index, j)
515 515
 			}
516 516
 		}
... ...
@@ -243,8 +243,7 @@ stopifnot(all.equal(ct, ct2))
243 243
 @
244 244
 
245 245
 
246
- Nonpolymorphic markers on chromosome X:
247
-
246
+Nonpolymorphic markers on chromosome X:
248 247
 
249 248
 <<nonpolymorphicX, fig=TRUE, width=8, height=4>>=
250 249
 npx.index <- which(chromosome(cnSet)==23 & !isSnp(cnSet))
... ...
@@ -255,7 +254,6 @@ cn.F <- CA(cnSet, i=npx.index, j=F)
255 254
 boxplot(data.frame(cbind(cn.M, cn.F)), pch=".", col="grey60", outline=FALSE)
256 255
 @
257 256
 
258
-
259 257
 \begin{figure}[t!]
260 258
  \centering
261 259
  \includegraphics[width=0.8\textwidth]{copynumber-nonpolymorphicX}