Browse code

assigne basename(filenames) to sns if sns is missing in constructAffy function.

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

Rob Scharp authored on 01/10/2011 04:45:05
Showing2 changed files

... ...
@@ -100,12 +100,13 @@ construct <- function(filenames,
100 100
 }
101 101
 
102 102
 constructAffy <- function(filenames, sns, cdfName, batch, verbose=TRUE){
103
+	stopifnot(!missing(filenames))
104
+	if(missing(sns)) sns <- basename(filenames)
103 105
 	stopifnot(length(sns)==length(batch))
104 106
 	is.lds <- ifelse(isPackageLoaded("ff"), TRUE, FALSE)
105 107
 	if(!is.lds) stop("this function now requires that the ff package be loaded")
106 108
 	if(missing(cdfName)) stop("must specify cdfName")
107 109
 	if(!isValidCdfName(cdfName)) stop("cdfName not valid.  see validCdfNames")
108
-	if(missing(sns)) sns <- basename(filenames)
109 110
 	stopifnot(!missing(batch))
110 111
 	##---------------------------------------------------------------------------
111 112
 	##
... ...
@@ -47,7 +47,7 @@ crlmmGT2 <- function(A, B, SNR, mixtureParams, cdfName, row.names=NULL,
47 47
 	## FIXME: XIndex may be greater than ocProbesets()
48 48
 	if(is.null(gender)){
49 49
 		if(verbose) message("Determining gender.")
50
-		##    XMedian <- apply(log2(A[XIndex,, drop=FALSE])+log2(B[XIndex,, drop=FALSE]), 2, median)/2
50
+		##   XMedian <- apply(log2(A[XIndex,, drop=FALSE])+log2(B[XIndex,, drop=FALSE]), 2, median)/2
51 51
 		XMedian <- ocLapply(splitIndicesByNode(1:NC), predictGender, theA=A, theB=B, XIndex=XIndex, neededPkgs="crlmm")
52 52
 		XMedian <- unlist(XMedian)
53 53
 		if(sum(SNR[] > SNRMin)==1){