Browse code

Merge branch 'collab'

* collab:
update Rds
revert imputeGender to original api
bug fix for calculateRBafCNSet
update calculateRBafCNSet
Fix documentation for crlmmCopynumber -- added argument fitLinearModel
update crlmmGT2
Put rm(DD, ...) further down in crlmmGT2 function
remove message about cloning A and B
Open and close callsPr and callsGt in crlmmGT2 (when args not missing)
revert removed indices loaded in crlmmGT2
snprmaAffy no longer writes normalized intensities to calls and callProbability slots. crlmmGT2 takes arguments callsGt and callsPr. When present, crlmmGT2 will not overwrite A and B.
explicit coercion to matrix in imputeGender
Assign imputed gender to cnSet$gender within crlmmGT2 function.
Change sum(SNR > SNRmin) to sum(SNR[] > SNRmin) in imputeGender

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

Rob Scharp authored on 14/09/2012 20:07:37
Showing11 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.15.18
4
+Version: 1.15.25
5 5
 Author: Benilton S Carvalho, Robert Scharpf, Matt Ritchie, Ingo Ruczinski, Rafael A Irizarry
6 6
 Maintainer: Benilton S Carvalho <Benilton.Carvalho@cancer.org.uk>, Robert Scharpf <rscharpf@jhsph.edu>, Matt Ritchie <mritchie@wehi.EDU.AU>
7 7
 Description: Faster implementation of CRLMM specific to SNP 5.0 and 6.0 arrays, as well as a copy number tool specific to 5.0, 6.0, and Illumina platforms
... ...
@@ -225,17 +225,12 @@ snprmaAffy <- function(cnSet,
225 225
 	idx2 <- sample(length(fid), 10^5)
226 226
 	A <- A(cnSet)
227 227
 	B <- B(cnSet)
228
-	C <- calls(cnSet)
229
-	D <- snpCallProbability(cnSet)
230 228
 	SKW <- cnSet$SKW; SNR <- cnSet$SNR
231 229
 	open(A)
232 230
 	open(B)
233
-	open(C)
234
-	open(D)
235 231
 	open(SKW)
236 232
 	open(mixtureParams)
237 233
 	open(SNR)
238
-	if(verbose) message("Cloning A and B matrices to store genotype calls and confidence scores.")
239 234
 	## RS ADDED
240 235
 	index <- match(gns, rownames(A))
241 236
 	rsprocessCEL <- function(i){
... ...
@@ -246,10 +241,10 @@ snprmaAffy <- function(cnSet,
246 241
 			rm(x)
247 242
 			y <- normalize.quantiles.use.target(y, target=reference)
248 243
 			## RS: add index for row assignment
249
-			A[index, k] <- intMedianSummaries(y[aIndex, 1, drop=FALSE], pnsa)
250
-			B[index, k] <- intMedianSummaries(y[bIndex, 1, drop=FALSE], pnsb)
251
-			C[index, k] <- intMedianSummaries(y[aIndex, 1, drop=FALSE], pnsa)
252
-			D[index, k] <- intMedianSummaries(y[bIndex, 1, drop=FALSE], pnsb)
244
+			ya <- intMedianSummaries(y[aIndex, 1, drop=FALSE], pnsa)
245
+			yb <- intMedianSummaries(y[bIndex, 1, drop=FALSE], pnsb)
246
+			A[index, k] <- ya
247
+			B[index, k] <- yb
253 248
 			rm(y)
254 249
 			S <- (log2(A[idx,k])+log2(B[idx, k]))/2 - SMEDIAN
255 250
 			M <- log2(A[idx, k])-log2(B[idx, k])
... ...
@@ -264,8 +259,6 @@ snprmaAffy <- function(cnSet,
264 259
 	ocLapply(sampleBatches, rsprocessCEL, neededPkgs="crlmm")
265 260
 	close(A)
266 261
 	close(B)
267
-	close(C)
268
-	close(D)
269 262
 	close(SKW)
270 263
 	close(mixtureParams)
271 264
 	close(SNR)
... ...
@@ -325,8 +318,10 @@ genotypeAffy <- function(cnSet, SNRMin=5, recallMin=10,
325 318
 			 recallRegMin=1000,
326 319
 			 gender=NULL, badSNP=0.7, returnParams=TRUE,
327 320
 			 verbose=TRUE){
328
-	tmp <- crlmmGT2(A=calls(cnSet),
329
-			B=snpCallProbability(cnSet),
321
+	## The passed arguments A and B currently contain the intensities
322
+	## (not calls and call probabilities)
323
+	tmp <- crlmmGT2(A=A(cnSet),
324
+			B=B(cnSet),
330 325
 			SNR=cnSet$SNR,
331 326
 			mixtureParams=cnSet@mixtureParams,
332 327
 			cdfName=annotation(cnSet),
... ...
@@ -338,11 +333,10 @@ genotypeAffy <- function(cnSet, SNRMin=5, recallMin=10,
338 333
 			gender=gender,
339 334
 			verbose=verbose,
340 335
 			returnParams=returnParams,
341
-			badSNP=badSNP)
342
-	if(verbose) message("Genotyping finished.  Updating container with genotype calls and confidence scores.")
343
-	open(cnSet$gender)
344
-	cnSet$gender[,] <- tmp[["gender"]]
345
-	close(cnSet$gender)
336
+			badSNP=badSNP,
337
+			callsGt=calls(cnSet),
338
+			callsPr=snpCallProbability(cnSet))
339
+	if(verbose) message("Genotyping finished.")
346 340
 	return(TRUE)
347 341
 }
348 342
 
... ...
@@ -313,20 +313,20 @@ crlmm2 <- function(filenames, row.names=TRUE, col.names=TRUE,
313 313
 
314 314
 imputeGender <- function(A, B, XIndex, YIndex, SNR, SNRMin){
315 315
 	if(length(YIndex) > 0){
316
-		a <- log2(A[XIndex,,drop=FALSE])
317
-		b <- log2(B[XIndex,,drop=FALSE])
316
+		a <- log2(as.matrix(A[XIndex,,drop=FALSE]))
317
+		b <- log2(as.matrix(B[XIndex,,drop=FALSE]))
318 318
 		meds.X <- (apply(a+b, 2, median))/2
319
-		a <- log2(A[YIndex,,drop=FALSE])
320
-		b <- log2(B[YIndex,,drop=FALSE])
319
+		a <- log2(as.matrix(A[YIndex,,drop=FALSE]))
320
+		b <- log2(as.matrix(B[YIndex,,drop=FALSE]))
321 321
 		meds.Y <- (apply(a+b, 2, median))/2
322 322
 		R <- meds.X - meds.Y
323
-		if(sum(SNR > SNRMin) == 1){
323
+		if(sum(SNR[] > SNRMin) == 1){
324 324
 			gender <- ifelse(R[SNR[] > SNRMin] > 0.5, 2L, 1L)
325 325
 		} else{
326 326
 			gender <- kmeans(R, c(min(R[SNR[]>SNRMin]), max(R[SNR[]>SNRMin])))[["cluster"]]
327 327
 		}
328 328
 	} else {
329
-		XMedian <- apply(log2(A[XIndex,,drop=FALSE])+log2(B[XIndex,, drop=FALSE]), 2, median)/2
329
+		XMedian <- apply(log2(as.matrix(A[XIndex,,drop=FALSE]))+log2(as.matrix(B[XIndex,, drop=FALSE])), 2, median)/2
330 330
 		if(sum(SNR > SNRMin) == 1){
331 331
 			gender <- which.min(c(abs(XMedian-8.9), abs(XMedian-9.5)))
332 332
 		} else{
... ...
@@ -2,7 +2,9 @@ crlmmGT2 <- function(A, B, SNR, mixtureParams, cdfName, row.names=NULL,
2 2
                      col.names=NULL, probs=c(1/3, 1/3, 1/3), DF=6,
3 3
                      SNRMin=5, recallMin=10, recallRegMin=1000,
4 4
                      gender=NULL, desctrucitve=FALSE, verbose=TRUE,
5
-                     returnParams=FALSE, badSNP=.7){
5
+                     returnParams=FALSE, badSNP=.7,
6
+		     callsGt,
7
+		     callsPr){
6 8
 	pkgname <- getCrlmmAnnotationName(cdfName)
7 9
 	stopifnot(require(pkgname, character.only=TRUE, quietly=!verbose))
8 10
 	open(SNR)
... ...
@@ -20,7 +22,6 @@ crlmmGT2 <- function(A, B, SNR, mixtureParams, cdfName, row.names=NULL,
20 22
 	} else {
21 23
 		index <- match(gns, rownames(A))
22 24
 	}
23
-	##snpBatches <- splitIndicesByLength(index, ocProbesets(), balance=TRUE)
24 25
 	snpBatches <- splitIndicesByLength(index, ocProbesets())
25 26
 	NR <- length(unlist(snpBatches))
26 27
 	if(verbose) message("Calling ", NR, " SNPs for recalibration... ")
... ...
@@ -29,6 +30,7 @@ crlmmGT2 <- function(A, B, SNR, mixtureParams, cdfName, row.names=NULL,
29 30
 	if(verbose) message("Loading annotations.")
30 31
 	obj1 <- loader("genotypeStuff.rda", .crlmmPkgEnv, pkgname)
31 32
 	obj2 <- loader("mixtureStuff.rda", .crlmmPkgEnv, pkgname)
33
+	##
32 34
 	## this is toget rid of the 'no visible binding' notes
33 35
 	## variable definitions
34 36
 	XIndex <- getVarInEnv("XIndex")
... ...
@@ -43,20 +45,21 @@ crlmmGT2 <- function(A, B, SNR, mixtureParams, cdfName, row.names=NULL,
43 45
 	## use lexical scope
44 46
 	imputeGender <- function(XIndex, YIndex){
45 47
 		if(length(YIndex) > 0){
46
-			a <- log2(A[XIndex,,drop=FALSE])
47
-			b <- log2(B[XIndex,,drop=FALSE])
48
+			a <- log2(as.matrix(A[XIndex,,drop=FALSE]))
49
+			b <- log2(as.matrix(B[XIndex,,drop=FALSE]))
48 50
 			meds.X <- (apply(a+b, 2, median))/2
49
-			a <- log2(A[YIndex,,drop=FALSE])
50
-			b <- log2(B[YIndex,,drop=FALSE])
51
+			## Y
52
+			a <- log2(as.matrix(A[YIndex,,drop=FALSE]))
53
+			b <- log2(as.matrix(B[YIndex,,drop=FALSE]))
51 54
 			meds.Y <- (apply(a+b, 2, median))/2
52 55
 			R <- meds.X - meds.Y
53
-			if(sum(SNR > SNRMin) == 1){
56
+			if(sum(SNR[] > SNRMin) == 1){
54 57
 				gender <- ifelse(R[SNR[] > SNRMin] > 0.5, 2L, 1L)
55 58
 			} else{
56 59
 				gender <- kmeans(R, c(min(R[SNR[]>SNRMin]), max(R[SNR[]>SNRMin])))[["cluster"]]
57 60
 			}
58 61
 		} else {
59
-			XMedian <- apply(log2(A[XIndex,,drop=FALSE])+log2(B[XIndex,, drop=FALSE]), 2, median)/2
62
+			XMedian <- apply(log2(as.matrix(A[XIndex,,drop=FALSE]))+log2(as.matrix(B[XIndex,, drop=FALSE])), 2, median)/2
60 63
 			if(sum(SNR > SNRMin) == 1){
61 64
 				gender <- which.min(c(abs(XMedian-8.9), abs(XMedian-9.5)))
62 65
 			} else{
... ...
@@ -75,6 +78,7 @@ crlmmGT2 <- function(A, B, SNR, mixtureParams, cdfName, row.names=NULL,
75 78
 		} else YIndex2 <- YIndex
76 79
 		message("Imputing gender")
77 80
 		gender <- imputeGender(XIndex=XIndex2, YIndex=YIndex2)
81
+		cnSet$gender[,] <- gender
78 82
 	}
79 83
 	Indexes <- list(autosomeIndex, XIndex, YIndex)
80 84
 	cIndexes <- list(keepIndex,
... ...
@@ -186,8 +190,8 @@ crlmmGT2 <- function(A, B, SNR, mixtureParams, cdfName, row.names=NULL,
186 190
 			dev=apply(DD,1,function(x) x%*%SSI%*%x)
187 191
 			dev=1/sqrt( (2*pi)^3*det(SS))*exp(-0.5*dev)
188 192
 		}
193
+		gc(verbose=FALSE)
189 194
 	}
190
-
191 195
 	if (verbose) message("OK")
192 196
 	##
193 197
 	## BC: must keep SD
... ...
@@ -201,6 +205,13 @@ crlmmGT2 <- function(A, B, SNR, mixtureParams, cdfName, row.names=NULL,
201 205
 	## ## MOVE TO C#######
202 206
 	##
203 207
 	## running in batches
208
+	callsGt.present <- !missing(callsGt)
209
+	callsPr.present <- !missing(callsPr)
210
+	overwriteAB <- !callsGt.present & !callsPr.present
211
+	if(overwriteAB){
212
+		open(callsGt)
213
+		open(callsPr)
214
+	}
204 215
 	process2 <- function(idxBatch){
205 216
 		snps <- snpBatches[[idxBatch]]
206 217
 		tmpA <- as.matrix(A[snps,])
... ...
@@ -222,14 +233,23 @@ crlmmGT2 <- function(A, B, SNR, mixtureParams, cdfName, row.names=NULL,
222 233
 					DF, probs, 0.025,
223 234
 					which(regionInfo[snps, 2]),
224 235
 					which(regionInfo[snps, 1]))
225
-		A[snps,] <- tmpA
226
-		B[snps,] <- tmpB
236
+		if(overwriteAB){
237
+			A[snps,] <- tmpA
238
+			B[snps,] <- tmpB
239
+		} else {
240
+			callsGt[snps, ] <- tmpA
241
+			callsPr[snps, ] <- tmpB
242
+		}
227 243
 	}
228 244
 	gc(verbose=FALSE)
229 245
 	ocLapply(seq(along=snpBatches), process2, neededPkgs="crlmm")
230 246
 	close(A)
231 247
 	close(B)
232 248
 	close(mixtureParams)
249
+	if(overwriteAB){
250
+		close(callsGt)
251
+		close(callsPr)
252
+	}
233 253
 	gc(verbose=FALSE)
234 254
 	message("Done with process2")
235 255
 	##  END MOVE TO C#######
... ...
@@ -535,7 +535,11 @@ setMethod("calculateRBaf", signature(object="CNSet"),
535 535
 	  })
536 536
 
537 537
 calculateRBafCNSet <- function(object, batch.name, chrom){
538
-	if(missing(batch.name)) batch.name <- batchNames(object)
538
+	if(missing(batch.name)) {
539
+		batch.name <- batchNames(object)
540
+		if("grandMean" %in% batch.name)
541
+			batch.name <- batch.name[-length(batch.name)]
542
+	}
539 543
 	if(missing(chrom)) chrom <- unique(chromosome(object))
540 544
 	if(!(all(batch.name %in% batchNames(object)))) stop("batch.name must be belong to batchNames(object)")
541 545
 	chr <- chromosome(object)
... ...
@@ -549,35 +553,42 @@ calculateRBafCNSet <- function(object, batch.name, chrom){
549 553
 	## if ff package is loaded, these will be ff objects
550 554
 	chr <- names(indexlist)
551 555
 	rlist <- blist <- vector("list", length(indexlist))
552
-	for(i in seq_along(indexlist)){
553
-		I <- indexlist[[i]]
554
-		nr <- length(I)
555
-		CHR <- names(indexlist)[i]
556
-		bafname <- paste("baf_chr", CHR, sep="")
557
-		rname <- paste("lrr_chr", CHR, sep="")
556
+	path <- ldPath()
557
+	processByChromosome <- function(i, chr, path){
558
+		ldPath(path)
559
+		nr <- length(i)
560
+		##CHR <- names(i)
561
+		bafname <- paste("baf_chr", chr, sep="")
562
+		rname <- paste("lrr_chr", chr, sep="")
558 563
 		bmatrix <- initializeBigMatrix(bafname, nr=nr, nc=length(sns), vmode="integer")
559 564
 		rmatrix <- initializeBigMatrix(rname, nr=nr, nc=length(sns), vmode="integer")
560 565
 		colnames(rmatrix) <- colnames(bmatrix) <- sns
561 566
 		## put rownames in order of physical position
562
-		ix <- order(position(object)[I])
563
-		I <- I[ix]
564
-		rownames(rmatrix) <- rownames(bmatrix) <- featureNames(object)[I]
567
+		ix <- order(position(object)[i])
568
+		i <- i[ix]
569
+		rownames(rmatrix) <- rownames(bmatrix) <- featureNames(object)[i]
565 570
 		for(j in seq_along(sampleindex)){
566 571
 			bname <- batch.name[j]
567 572
 			J <- sampleindex[[j]]
568
-			res <- calculateRTheta(object=object,
569
-					       batch.name=bname,
570
-					       feature.index=I)
573
+			res <- crlmm:::calculateRTheta(object=object,
574
+						       batch.name=bname,
575
+						       feature.index=i)
571 576
 			k <- match(sampleNames(object)[J], sns)
572 577
 			bmatrix[, k] <- res[["baf"]]
573 578
 			rmatrix[, k] <- res[["lrr"]]
574
-			##colnames(bmatrix)[J] <- colnames(rmatrix)[J] <- sampleNames(object)[J]
575 579
 		}
576
-		blist[[i]] <- bmatrix
577
-		rlist[[i]] <- rmatrix
580
+		list(bmatrix, rmatrix)
581
+	}
582
+	## calcualte R BAF by chromosome
583
+	if(isPackageLoaded("ff")){
584
+		pkgs <- c("oligoClasses", "ff", "Biobase", "crlmm")
585
+	} else pkgs <- c("oligoClasses", "Biobase", "crlmm")
586
+	res <- foreach(i=indexlist, chr=names(indexlist), .packages=pkgs) %dopar% {
587
+		processByChromosome(i, chr, path)
578 588
 	}
579
-	res <- list(baf=blist,
580
-		    lrr=rlist)
589
+	blist <- lapply(res, "[[", 1)
590
+	rlist <- lapply(res, "[[", 2)
591
+	res <- list(baf=blist, lrr=rlist)
581 592
 	return(res)
582 593
 }
583 594
 
... ...
@@ -58,10 +58,16 @@ calculateRBaf(object, batch.name, chrom)
58 58
 \author{Lynn Mireless}
59 59
 
60 60
 \examples{
61
-data(cnSetExample)
62
-baf.lrr <- calculateRBaf(cnSetExample, "SHELF")
63
-hist(baf.lrr[["baf"]][[1]]/1000, breaks=100)
64
-hist(baf.lrr[["lrr"]][[1]]/100, breaks=100)
61
+	data(cnSetExample)
62
+	baf.lrr <- suppressWarnings(calculateRBaf(cnSetExample, "SHELF"))
63
+	hist(baf.lrr[["baf"]][[1]]/1000, breaks=100)
64
+	hist(baf.lrr[["lrr"]][[1]]/100, breaks=100)
65
+	\dontrun{
66
+		library(ff)
67
+		baf.lrr <- suppressWarnings(calculateRBaf(cnSetExample, "SHELF"))
68
+		class(baf.lrr[["baf"]][[1]]) ## ff_matrix
69
+		class(baf.lrr[["lrr"]][[1]]) ## ff_matrix
70
+	}
65 71
 }
66 72
 \keyword{list}
67 73
 \keyword{methods}
68 74
new file mode 100644
... ...
@@ -0,0 +1,29 @@
1
+\name{cnrmaAffy}
2
+\alias{cnrmaAffy}
3
+\title{quantile normalize nonpolymorphic markers}
4
+\description{Quantile normalize nonpolymorphic markers to hapmap reference distribution}
5
+\usage{
6
+cnrmaAffy(cnSet, seed = 1, verbose = TRUE)
7
+}
8
+
9
+\arguments{
10
+  \item{cnSet}{
11
+    Object of class \code{CNSet}
12
+  }
13
+  \item{seed}{
14
+    Random number seed
15
+  }
16
+  \item{verbose}{
17
+    Logical.
18
+  }
19
+}
20
+\value{
21
+  Returns logical.  Normalized intensities are written to the alleleA
22
+  \code{ff_matrix} stored in the \code{CNSet} assayData.
23
+}
24
+\author{ R. Scharpf}
25
+
26
+\seealso{\code{\link{snprmaAffy}}}
27
+% Add one or more standard keywords, see file 'KEYWORDS' in the
28
+% R documentation directory.
29
+\keyword{robust}
0 30
\ No newline at end of file
1 31
new file mode 100644
... ...
@@ -0,0 +1,44 @@
1
+\name{constructAffyCNSet}
2
+\alias{constructAffyCNSet}
3
+
4
+\title{ Construct an object of class CNSet from Affymetrix cel files
5
+}
6
+\description{
7
+Construct a container for normalized intensities for Affymetrix cel
8
+files, referred to as a \code{CNSet}
9
+}
10
+\usage{
11
+constructAffyCNSet(filenames, sns, cdfName, batch, verbose = TRUE, genome)
12
+}
13
+%- maybe also 'usage' for other objects documented here.
14
+\arguments{
15
+  \item{filenames}{
16
+    Vector of cel file names.
17
+}
18
+  \item{sns}{
19
+    Sample identifiers. Defaults to \code{basename(filenames)}.
20
+}
21
+  \item{cdfName}{
22
+    Character string indicating annotation package (e.g., "genomewidesnp6Crlmm")
23
+}
24
+  \item{batch}{
25
+    Vector of same length as filenames indicating batch.
26
+}
27
+  \item{verbose}{
28
+    Logical.
29
+}
30
+  \item{genome}{
31
+    Character string indicating UCSC genome build (hg18 or hg19 supported)
32
+}
33
+}
34
+
35
+\value{
36
+  An object of class \code{CNSet}
37
+}
38
+
39
+\author{
40
+R. Scharpf
41
+}
42
+% Add one or more standard keywords, see file 'KEYWORDS' in the
43
+% R documentation directory.
44
+\keyword{manip}
0 45
\ No newline at end of file
... ...
@@ -11,7 +11,8 @@ crlmmCopynumber(object, MIN.SAMPLES=10, SNRMin = 5, MIN.OBS = 1,
11 11
 	        DF.PRIOR = 50, bias.adj = FALSE,
12 12
                 prior.prob = rep(1/4, 4), seed = 1, verbose = TRUE,
13 13
                 GT.CONF.THR = 0.80, MIN.NU = 2^3, MIN.PHI = 2^3,
14
-                THR.NU.PHI = TRUE, type=c("SNP", "NP", "X.SNP", "X.NP"))
14
+                THR.NU.PHI = TRUE, type=c("SNP", "NP", "X.SNP", "X.NP"),
15
+                fit.linearModel=TRUE)
15 16
 }
16 17
 
17 18
 \arguments{
... ...
@@ -103,6 +104,11 @@ crlmmCopynumber(object, MIN.SAMPLES=10, SNRMin = 5, MIN.OBS = 1,
103 104
     "SNP", "NP", "X.SNP", or "X.NP". Type refers to a set of
104 105
     markers. See details below}
105 106
 
107
+  \item{fit.linearModel}{Logical.  If TRUE, a linear model is fit to
108
+  estimate the parameters for computing the absolute copy number.  If
109
+  FALSE, we compute the batch-specific, within-genotype median and MAD
110
+  at polymorphic loci and the median and MAD at nonpolymorphic loci.}
111
+
106 112
  }
107 113
 
108 114
  \references{
109 115
new file mode 100644
... ...
@@ -0,0 +1,49 @@
1
+\name{genotypeAffy}
2
+\alias{genotypeAffy}
3
+\title{Genotype Affymetrix CEL files}
4
+\description{Assign diallelic genotypes at polymorphic markers}
5
+\usage{
6
+genotypeAffy(cnSet, SNRMin = 5, recallMin = 10, recallRegMin = 1000, gender = NULL, badSNP = 0.7, returnParams = TRUE, verbose = TRUE)
7
+}
8
+
9
+\arguments{
10
+  \item{cnSet}{
11
+    An object of class \code{CNSet}
12
+  }
13
+  \item{SNRMin}{
14
+    See \code{\link{crlmm}}
15
+  }
16
+  \item{recallMin}{
17
+    See \code{\link{crlmm}}
18
+}
19
+  \item{recallRegMin}{
20
+    See \code{\link{crlmm}}
21
+}
22
+  \item{gender}{
23
+    See \code{\link{crlmm}}
24
+}
25
+  \item{badSNP}{
26
+    See \code{\link{crlmm}}
27
+}
28
+  \item{returnParams}{
29
+    See \code{\link{crlmm}}
30
+}
31
+  \item{verbose}{
32
+    Logical.
33
+}
34
+}
35
+\details{
36
+  Wrapper for crlmm genotyping.
37
+}
38
+\value{
39
+  Returns logical.  SNP genotypes and confidence scores are written to
40
+  \code{ff_matrix} objects.
41
+}
42
+
43
+\author{
44
+R.Scharpf
45
+}
46
+\seealso{
47
+  \code{\link{crlmm}}, \code{\link{calls}}, \code{\link{confs}}
48
+}
49
+\keyword{classif}
0 50
\ No newline at end of file
1 51
new file mode 100644
... ...
@@ -0,0 +1,31 @@
1
+\name{snprmaAffy}
2
+\alias{snprmaAffy}
3
+\title{Quantile normalize intensities for SNPs}
4
+\description{Quantile normalize intensities for SNPs to a HapMap target
5
+  reference distribution}
6
+\usage{
7
+snprmaAffy(cnSet, mixtureSampleSize = 10^5, eps = 0.1, seed = 1, verbose = TRUE)
8
+}
9
+
10
+\arguments{
11
+  \item{cnSet}{Object of class \code{CNSet}}
12
+  \item{mixtureSampleSize}{Sample size to be use when fitting the
13
+  mixture model. }
14
+  \item{eps}{Stop criteria.}
15
+  \item{seed}{Seed to be used when sampling. }
16
+  \item{verbose}{Logical.}
17
+}
18
+
19
+\value{
20
+  Returns nothing.  Normalized intensities are written to files.
21
+}
22
+\author{
23
+R.Scharpf
24
+}
25
+
26
+\seealso{
27
+  \code{\link{snprma}}
28
+}
29
+% Add one or more standard keywords, see file 'KEYWORDS' in the
30
+% R documentation directory.
31
+\keyword{robust}