Browse code

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

unknown authored on 26/08/2010 00:27:53
Showing1 changed files

... ...
@@ -693,6 +693,12 @@ preprocessInfinium2 <- function(XY, mixtureSampleSize=10^5,
693 693
     close(mixtureParams)
694 694
     close(SNR)
695 695
 #  }  
696
+
697
+  open(res[["A"]])
698
+  open(res[["B"]])
699
+  open(res[["zero"]])
700
+  open(res[["SNR"]])
701
+  open(res[["mixtureParams"]])
696 702
   
697 703
   res = list(A=A, B=B,
698 704
              zero=zero, sns=sns, gns=names(snpIndex), SNR=SNR, SKW=SKW,
... ...
@@ -705,6 +711,12 @@ preprocessInfinium2 <- function(XY, mixtureSampleSize=10^5,
705 711
     if(verbose) message("Used ", round(t0[3],1), " seconds to save ", snpFile, ".")
706 712
   }
707 713
 
714
+  close(res[["A"]])
715
+  close(res[["B"]])
716
+  close(res[["zero"]])
717
+  close(res[["SNR"]])
718
+  close(res[["mixtureParams"]])
719
+
708 720
   return(res)
709 721
 }
710 722
 
... ...
@@ -738,10 +750,6 @@ crlmmIllumina <- function(RG, XY, stripNorm=TRUE, useTarget=TRUE,
738 750
     res = preprocessInfinium2(XY, mixtureSampleSize=mixtureSampleSize, fitMixture=TRUE, verbose=verbose,
739 751
                         seed=seed, eps=eps, cdfName=cdfName, sns=sns, stripNorm=stripNorm, useTarget=useTarget,
740 752
                         save.it=save.it, snpFile=snpFile, cnFile=cnFile)
741
-    open(res[["A"]])  # this should perhaps go below }else{ below
742
-    open(res[["B"]])
743
-    open(res[["SNR"]])
744
-    open(res[["mixtureParams"]])    
745 753
 
746 754
 #    fD = featureData(XY)
747 755
 #    phenD = XY@phenoData
... ...
@@ -769,8 +777,13 @@ crlmmIllumina <- function(RG, XY, stripNorm=TRUE, useTarget=TRUE,
769 777
           stop("Object in ", snpFile, " seems to be invalid.")
770 778
   }
771 779
 
780
+    open(res[["A"]])
781
+    open(res[["B"]])
782
+    open(res[["SNR"]])
783
+    open(res[["mixtureParams"]])
784
+
772 785
 #    rm(phenD, protD , fD)
773
-	
786
+
774 787
 #    snp.index <- res$snpIndex #match(res$gns, featureNames(callSet))                
775 788
 #    suppressWarnings(A(callSet) <- res[["A"]])
776 789
 #    suppressWarnings(B(callSet) <- res[["B"]])
... ...
@@ -873,6 +886,11 @@ crlmmIlluminaV2 = function(sampleSheet=NULL,
873 886
     res = preprocessInfinium2(XY, mixtureSampleSize=mixtureSampleSize, fitMixture=TRUE, verbose=verbose,
874 887
                                seed=seed, eps=eps, cdfName=cdfName, sns=sns, stripNorm=stripNorm, useTarget=useTarget, #) # sns=subsns
875 888
                                save.it=save.it, snpFile=snpFile, cnFile=cnFile)
889
+    open(res[["A"]])
890
+    open(res[["B"]])
891
+    open(res[["SNR"]])
892
+    open(res[["mixtureParams"]])
893
+						   
876 894
 #    fD = featureData(XY)
877 895
 #    phenD = XY@phenoData
878 896
 #    protD = XY@protocolData