Browse code

fixed bug in nonpolymorphic function

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

Rob Scharp authored on 27/04/2009 14:11:59
Showing 3 changed files

... ...
@@ -147,3 +147,7 @@ is decoded and scanned
147 147
 2009-04-09 R Scharpf - committed version 1.0.81
148 148
 
149 149
 * added a skeleton of a copy number vignette for the illumina platform (illumina_copynumber.Rnw) to inst/scripts
150
+
151
+2009-04-27 R Scharpf - committed version 1.3.1
152
+
153
+* Fixed bug in nonpolymorphic() function
... ...
@@ -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.3.0
4
+Version: 1.3.1
5 5
 Date: 2008-12-30
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>
... ...
@@ -440,7 +440,11 @@ nonpolymorphic <- function(plateIndex, NP, envir, CONF.THR=0.99, DF.PRIOR=50, pk
440 440
 	muB <- muB[!flagsB, "BB"]
441 441
 	X <- cbind(1, log2(c(muA, muB)))
442 442
 	Y <- log2(c(phiA[!flagsA], phiB[!flagsB]))
443
-	if(nrow(X) > 5000) ix <- sample(1:nrow(X), 5000)
443
+	if(nrow(X) > 5000){
444
+		ix <- sample(1:nrow(X), 5000)
445
+	} else {
446
+		ix <- 1:nrow(X)
447
+	}
444 448
 	##X <- X[ix, ]
445 449
 	##Y <- Y[ix]
446 450
 	betahat <- solve(crossprod(X[ix, ]), crossprod(X[ix, ], Y[ix]))