git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/crlmm@59039 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -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.55 |
|
4 |
+Version: 1.11.56 |
|
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> |
... | ... |
@@ -73,11 +73,11 @@ log-scale the variance is rougly constant for CA, CB > 0). |
73 | 73 |
} |
74 | 74 |
|
75 | 75 |
\examples{ |
76 |
-data(sample.CNSet) |
|
77 |
-Ns(sample.CNSet)[1:5, , ] |
|
78 |
-corr(sample.CNSet)[1:5, , ] |
|
79 |
-meds <- medians(sample.CNSet) |
|
80 |
-mads(sample.CNSet)[1:5, , ,] |
|
81 |
-tau2(sample.CNSet)[1:5, , ,] |
|
76 |
+data(cnSetExample) |
|
77 |
+Ns(cnSetExample)[1:5, , ] |
|
78 |
+corr(cnSetExample)[1:5, , ] |
|
79 |
+meds <- medians(cnSetExample) |
|
80 |
+mads(cnSetExample)[1:5, , ,] |
|
81 |
+tau2(cnSetExample)[1:5, , ,] |
|
82 | 82 |
} |
83 | 83 |
\keyword{manip} |
... | ... |
@@ -39,8 +39,8 @@ calculateRBaf(object, batch.name) |
39 | 39 |
|
40 | 40 |
\examples{ |
41 | 41 |
|
42 |
-data(sample.CNSet) |
|
43 |
-baf.lrr <- calculateRBaf(sample.CNSet, "SHELF") |
|
42 |
+data(cnSetExample) |
|
43 |
+baf.lrr <- calculateRBaf(cnSetExample, "SHELF") |
|
44 | 44 |
hist(baf.lrr[["baf"]], breaks=100) |
45 | 45 |
hist(baf.lrr[["lrr"]], breaks=100) |
46 | 46 |
|
... | ... |
@@ -88,36 +88,36 @@ elements and all of the elements in the LinearModelParameter slot. |
88 | 88 |
|
89 | 89 |
\examples{ |
90 | 90 |
## Version 1.6* of crlmm used CNSetLM objects. |
91 |
-data(sample.CNSet) |
|
92 |
-all(isCurrent(sample.CNSet)) ## is the cnSet object current? |
|
91 |
+data(cnSetExample) |
|
92 |
+all(isCurrent(cnSetExample)) ## is the cnSet object current? |
|
93 | 93 |
|
94 | 94 |
## -------------------------------------------------- |
95 | 95 |
## calculating allele-specific copy number |
96 | 96 |
## -------------------------------------------------- |
97 | 97 |
## copy number for allele A, first 5 markers, first 2 samples |
98 |
-(ca <- CA(sample.CNSet, i=1:5, j=1:2)) |
|
98 |
+(ca <- CA(cnSetExample, i=1:5, j=1:2)) |
|
99 | 99 |
## copy number for allele B, first 5 markers, first 2 samples |
100 |
-(cb <- CB(sample.CNSet, i=1:5, j=1:2)) |
|
100 |
+(cb <- CB(cnSetExample, i=1:5, j=1:2)) |
|
101 | 101 |
## total copy number for first 5 markers, first 2 samples |
102 | 102 |
(cn1 <- ca+cb) |
103 | 103 |
|
104 | 104 |
## total copy number at first 5 nonpolymorphic loci |
105 |
-index <- which(!isSnp(sample.CNSet))[1:5] |
|
106 |
-cn2 <- CA(sample.CNSet, i=index, j=1:2) |
|
105 |
+index <- which(!isSnp(cnSetExample))[1:5] |
|
106 |
+cn2 <- CA(cnSetExample, i=index, j=1:2) |
|
107 | 107 |
## note, cb is NA at nonpolymorphic loci |
108 |
-(cb <- CB(sample.CNSet, i=index, j=1:2)) |
|
108 |
+(cb <- CB(cnSetExample, i=index, j=1:2)) |
|
109 | 109 |
## note, ca+cb will give NAs at nonpolymorphic loci |
110 |
-CA(sample.CNSet, i=index, j=1:2) + cb |
|
110 |
+CA(cnSetExample, i=index, j=1:2) + cb |
|
111 | 111 |
## A shortcut for total copy number |
112 |
-cn3 <- totalCopynumber(sample.CNSet, i=1:5, j=1:2) |
|
112 |
+cn3 <- totalCopynumber(cnSetExample, i=1:5, j=1:2) |
|
113 | 113 |
all.equal(cn3, cn1) |
114 |
-cn4 <- totalCopynumber(sample.CNSet, i=index, j=1:2) |
|
114 |
+cn4 <- totalCopynumber(cnSetExample, i=index, j=1:2) |
|
115 | 115 |
all.equal(cn4, cn2) |
116 | 116 |
|
117 | 117 |
## markers 1-5, all samples |
118 |
-cn5 <- totalCopynumber(sample.CNSet, i=1:5) |
|
118 |
+cn5 <- totalCopynumber(cnSetExample, i=1:5) |
|
119 | 119 |
## all markers, samples 1-5 |
120 |
-cn6 <- totalCopynumber(sample.CNSet, j=1:2) |
|
120 |
+cn6 <- totalCopynumber(cnSetExample, j=1:2) |
|
121 | 121 |
|
122 | 122 |
} |
123 | 123 |
\keyword{manip} |
... | ... |
@@ -34,14 +34,14 @@ R. Scharpf |
34 | 34 |
} |
35 | 35 |
|
36 | 36 |
\examples{ |
37 |
-data(sample.CNSet2) |
|
38 |
-table(batch(sample.CNSet2)) |
|
39 |
-sample.index <- which(batch(sample.CNSet2) == "CUPID") |
|
37 |
+data(cnSetExample2) |
|
38 |
+table(batch(cnSetExample2)) |
|
39 |
+sample.index <- which(batch(cnSetExample2) == "CUPID") |
|
40 | 40 |
## A single SNP |
41 |
-pr <- predictionRegion(sample.CNSet2[1:4, sample.index], copyNumber=0:4) |
|
42 |
-gt <- calls(sample.CNSet2[1:4, sample.index]) |
|
41 |
+pr <- predictionRegion(cnSetExample2[1:4, sample.index], copyNumber=0:4) |
|
42 |
+gt <- calls(cnSetExample2[1:4, sample.index]) |
|
43 | 43 |
lim <- c(6,13) |
44 |
-xyplot(B~A|snpid, data=sample.CNSet2[1:4, sample.index], |
|
44 |
+xyplot(B~A|snpid, data=cnSetExample2[1:4, sample.index], |
|
45 | 45 |
predictRegion=pr, |
46 | 46 |
panel=ABpanel, |
47 | 47 |
pch=21, |
... | ... |
@@ -50,12 +50,12 @@ xyplot(B~A|snpid, data=sample.CNSet2[1:4, sample.index], |
50 | 50 |
|
51 | 51 |
## multiple SNPs, prediction regions for 3 batches |
52 | 52 |
\dontrun{ |
53 |
- tab <- table(batch(sample.CNSet2)) |
|
53 |
+ tab <- table(batch(cnSetExample2)) |
|
54 | 54 |
bns <- names(tab)[tab > 50] |
55 |
- sample.index <- which(batch(sample.CNSet2) %in% bns[1:3]) |
|
56 |
- pr <- predictionRegion(sample.CNSet2[1:10, sample.index], copyNumber=0:4) |
|
57 |
- gt <- as.integer(calls(sample.CNSet2[1:10, sample.index])) |
|
58 |
- xyplot(B~A|snpid, data=sample.CNSet2[1:10, sample.index], |
|
55 |
+ sample.index <- which(batch(cnSetExample2) %in% bns[1:3]) |
|
56 |
+ pr <- predictionRegion(cnSetExample2[1:10, sample.index], copyNumber=0:4) |
|
57 |
+ gt <- as.integer(calls(cnSetExample2[1:10, sample.index])) |
|
58 |
+ xyplot(B~A|snpid, data=cnSetExample2[1:10, sample.index], |
|
59 | 59 |
predictRegion=pr, |
60 | 60 |
panel=ABpanel, |
61 | 61 |
pch=21, |
... | ... |
@@ -63,20 +63,17 @@ xyplot(B~A|snpid, data=sample.CNSet2[1:4, sample.index], |
63 | 63 |
xlim=c(6,12), ylim=c(6,12)) |
64 | 64 |
|
65 | 65 |
## nonpolymorphic markers |
66 |
- data(sample.CNSet2) |
|
67 |
- tab <- table(batch(sample.CNSet2)) |
|
66 |
+ data(cnSetExample2) |
|
67 |
+ tab <- table(batch(cnSetExample2)) |
|
68 | 68 |
bns <- names(tab)[tab > 50] |
69 |
- sample.index <- which(batch(sample.CNSet2)%in%bns[1:3]) |
|
70 |
- np.index <- which(!isSnp(sample.CNSet2))[1:10] |
|
71 |
- taus <- tau2(sample.CNSet)[np.index, , , ] |
|
72 |
- ##trace(predictionRegion, browser, signature=c("CNSet", "integer")) |
|
73 |
- pr <- predictionRegion(sample.CNSet2[np.index, sample.index], |
|
69 |
+ sample.index <- which(batch(cnSetExample2)%in%bns[1:3]) |
|
70 |
+ np.index <- which(!isSnp(cnSetExample2))[1:10] |
|
71 |
+ taus <- tau2(cnSetExample)[np.index, , , ] |
|
72 |
+ pr <- predictionRegion(cnSetExample2[np.index, sample.index], |
|
74 | 73 |
copyNumber=0:4) |
75 |
- ##trace(posteriorProbability, browser, signature="CNSet") |
|
76 |
- pp <- posteriorProbability(sample.CNSet2[np.index, sample.index], |
|
74 |
+ pp <- posteriorProbability(cnSetExample2[np.index, sample.index], |
|
77 | 75 |
predictRegion=pr, |
78 | 76 |
copyNumber=0:4) |
79 |
- pm <- calculatePosteriorMean(sample.CNSet2[np.index, sample.index], posteriorProb=pp) |
|
80 | 77 |
} |
81 | 78 |
} |
82 | 79 |
\keyword{dplot} |