Browse code

Use factor for snpid in xyplotcrlmm (otherwise plots are out of order

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

Rob Scharp authored on 01/10/2011 04:47:47
Showing2 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.11.18
4
+Version: 1.11.19
5 5
 Date: 2010-12-10
6 6
 Author: Benilton S Carvalho <Benilton.Carvalho@cancer.org.uk>, Robert Scharpf <rscharpf@jhsph.edu>, Matt Ritchie <mritchie@wehi.edu.au>, Ingo Ruczinski <iruczins@jhsph.edu>, 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>
... ...
@@ -433,6 +433,7 @@ setMethod("xyplotcrlmm", signature(x="formula", data="CNSet", predictRegion="lis
433 433
 			     gt.conf=as.numeric(confs(data)),
434 434
 			     snpid=fns)#, snp=snpId)
435 435
 		  df <- as.data.frame(df)
436
+		  df$snpid <- factor(df$snpid, levels=unique(df$snpid), ordered=TRUE)
436 437
 		  bns <- batchNames(data)
437 438
 		  predictRegion <- lapply(predictRegion, function(x, bns){
438 439
 			  batch.index <- match(bns, dimnames(x$mu)[[3]])
... ...
@@ -440,7 +441,6 @@ setMethod("xyplotcrlmm", signature(x="formula", data="CNSet", predictRegion="lis
440 441
 			  x$cov <- x$cov[, , batch.index, drop=FALSE]
441 442
 			  return(x)
442 443
 		  }, bns=bns)
443
-		  df$snpid <- as.character(df$snpid)
444 444
 		  ##df <- as.data.frame(data)
445 445
 		  xyplot(x, df, predictRegion=predictRegion, ...)
446 446
 	  })