Browse code

merge bug fix for creating NChannelSet from the devel branch

mmit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.

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

Rob Scharp authored on 31/10/2013 02:00:52
Showing2 changed files

... ...
@@ -1,8 +1,8 @@
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.20.0
5
-Date: Tue Oct 01 14:48:41 EDT 2013
4
+Version: 1.21.1
5
+Date: Wed Oct 30 21:42:52 EDT 2013
6 6
 Author: Benilton S Carvalho, Robert Scharpf, Matt Ritchie, Ingo Ruczinski, Rafael A Irizarry
7 7
 Maintainer: Benilton S Carvalho <Benilton.Carvalho@cancer.org.uk>, Robert Scharpf <rscharpf@jhsph.edu>, Matt Ritchie <mritchie@wehi.EDU.AU>
8 8
 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
... ...
@@ -53,3 +53,6 @@ Collate: AllGenerics.R
53 53
 	 test_crlmm_package.R
54 54
 LazyLoad: yes
55 55
 biocViews: Microarray, Preprocessing, SNP, Bioinformatics,CopyNumberVariants
56
+## Local Variables:
57
+## time-stamp-pattern: "8/Date: %3a %3b %2d %02H:%02M:%02S %Z %:y\n"
58
+## End:
... ...
@@ -371,12 +371,18 @@ RGtoXY = function(RG, chipType, verbose=TRUE) {
371 371
   bord = match(bids, featureNames(RG)) # and here
372 372
 #  argrg = aids[rrgg]
373 373
 #  brgrg = bids[rrgg]
374
+  xyPhenoData = AnnotatedDataFrame(data=RG@phenoData@data,varMetadata=RG@phenoData@varMetadata)
375
+  levels(xyPhenoData@varMetadata$channel) = c("X","Y","zero","_ALL_")
374 376
   XY <- new("NChannelSet",
375
-	    X=matrix(0, nsnps, narrays),
376
-	    Y=matrix(0, nsnps, narrays),
377
-	    zero=matrix(0, nsnps, narrays),
378
-	    annotation=chipType, phenoData=RG@phenoData,
379
-	    protocolData=RG@protocolData, storage.mode="environment")
377
+        assayDataNew(X=matrix(0, nsnps, narrays),Y=matrix(0, nsnps, narrays),zero=matrix(0, nsnps, narrays)),
378
+        phenoData=xyPhenoData, protocolData=RG@protocolData, annotation=chipType)
379
+   storageMode(XY) = "environment"
380
+#  XY <- new("NChannelSet",
381
+#	    X=matrix(0, nsnps, narrays),
382
+#	    Y=matrix(0, nsnps, narrays),
383
+#	    zero=matrix(0, nsnps, narrays),
384
+#	    annotation=chipType, phenoData=RG@phenoData,
385
+#	    protocolData=RG@protocolData, storage.mode="environment")
380 386
   featureNames(XY) = ids
381 387
   sampleNames(XY) = sampleNames(RG)
382 388
   ## RS
... ...
@@ -1352,7 +1358,7 @@ processIDAT <- function(stratum, sampleBatches, sampleSheet=NULL,
1352 1358
 			A, B,
1353 1359
 			GT,
1354 1360
 			GTP,
1355
-			SKW, SNR, mixtureParams, is.snp) { #, outdir=".") {
1361
+			SKW, SNR, mixtureParams, is.snp) { #, outdir=".") {
1356 1362
 	message("Processing sample stratum ", stratum, " of ", length(sampleBatches))
1357 1363
 	sel <- sampleBatches[[stratum]]
1358 1364
         if(length(path)>= length(sel)) path = path[sel]