git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/crlmm@59039 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -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} |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/crlmm@58647 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -28,16 +28,12 @@ Ns(object,...) |
28 | 28 |
|
29 | 29 |
\arguments{ |
30 | 30 |
\item{object}{ An object of class \code{CNSet}.} |
31 |
- \item{\dots}{ |
|
32 |
- An additional argument named 'i' can be passed to subset the markers |
|
33 |
- and an argument 'j' can be passed to subset the batches. Other |
|
34 |
- arguments are ignored. |
|
35 |
- } |
|
31 |
+ \item{\dots}{Ignored} |
|
36 | 32 |
} |
37 | 33 |
|
38 | 34 |
\value{ |
39 |
- |
|
40 |
-An array with dimension R x A x G x C, or R x G x C. |
|
35 |
+ |
|
36 |
+An array with dimension R x A x G x C, or R x G x C. |
|
41 | 37 |
|
42 | 38 |
R: number of markers |
43 | 39 |
A: number of alleles (2) |
... | ... |
@@ -78,11 +74,10 @@ log-scale the variance is rougly constant for CA, CB > 0). |
78 | 74 |
|
79 | 75 |
\examples{ |
80 | 76 |
data(sample.CNSet) |
81 |
-## All NAs. Need to replace sample.CNSet with a HapMap example |
|
82 |
-Ns(cnSet, i=1:5, j=1:2) |
|
83 |
-corr(cnSet, i=1:5, j=1:2) |
|
84 |
-medians(cnSet, i=1:5, j=1:2) |
|
85 |
-mads(cnSet, i=1:5, j=1:2) |
|
86 |
-tau2(cnSet, i=1:5, j=1:2) |
|
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, , ,] |
|
87 | 82 |
} |
88 | 83 |
\keyword{manip} |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/crlmm@53580 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -77,10 +77,8 @@ log-scale the variance is rougly constant for CA, CB > 0). |
77 | 77 |
} |
78 | 78 |
|
79 | 79 |
\examples{ |
80 |
-data(sample.CNSetLM) |
|
81 |
-## update to class CNSet |
|
82 |
-cnSet <- as(sample.CNSetLM, "CNSet") |
|
83 |
-## All NAs. Need to replace sample.CNSetLM with a HapMap example |
|
80 |
+data(sample.CNSet) |
|
81 |
+## All NAs. Need to replace sample.CNSet with a HapMap example |
|
84 | 82 |
Ns(cnSet, i=1:5, j=1:2) |
85 | 83 |
corr(cnSet, i=1:5, j=1:2) |
86 | 84 |
medians(cnSet, i=1:5, j=1:2) |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/crlmm@49145 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,90 @@ |
1 |
+\name{batchStatisticAccessors} |
|
2 |
+\alias{Ns} |
|
3 |
+\alias{corr} |
|
4 |
+\alias{tau2} |
|
5 |
+\alias{mads} |
|
6 |
+\alias{medians} |
|
7 |
+ |
|
8 |
+\title{ |
|
9 |
+ |
|
10 |
+ Accessors for batch-specific summary statistics. |
|
11 |
+ |
|
12 |
+} |
|
13 |
+ |
|
14 |
+\description{ |
|
15 |
+ |
|
16 |
+ The summary statistics stored here are used by the tools for |
|
17 |
+ copy number estimation. |
|
18 |
+ |
|
19 |
+} |
|
20 |
+ |
|
21 |
+\usage{ |
|
22 |
+corr(object, ...) |
|
23 |
+tau2(object, ...) |
|
24 |
+mads(object,...) |
|
25 |
+medians(object,...) |
|
26 |
+Ns(object,...) |
|
27 |
+} |
|
28 |
+ |
|
29 |
+\arguments{ |
|
30 |
+ \item{object}{ An object of class \code{CNSet}.} |
|
31 |
+ \item{\dots}{ |
|
32 |
+ An additional argument named 'i' can be passed to subset the markers |
|
33 |
+ and an argument 'j' can be passed to subset the batches. Other |
|
34 |
+ arguments are ignored. |
|
35 |
+ } |
|
36 |
+} |
|
37 |
+ |
|
38 |
+\value{ |
|
39 |
+ |
|
40 |
+An array with dimension R x A x G x C, or R x G x C. |
|
41 |
+ |
|
42 |
+R: number of markers |
|
43 |
+A: number of alleles (2) |
|
44 |
+G: number of biallelic genotypes (3) |
|
45 |
+C: number of batches |
|
46 |
+ |
|
47 |
+\code{Ns} returns an array of genotype frequencies stratified by |
|
48 |
+batch. Dimension R x G x C. |
|
49 |
+ |
|
50 |
+\code{corr} returns an array of within-genotype correlations |
|
51 |
+(log2-scale) stratified by batch. Dimension R x G x C. |
|
52 |
+ |
|
53 |
+\code{medians} returns an array of the within-genotype medians |
|
54 |
+(intensity-scale) stratified by batch and allele. Dimension R x A x G |
|
55 |
+x C. |
|
56 |
+ |
|
57 |
+\code{mads} returns an array of the within-genotype median absolute |
|
58 |
+deviations (intensity-scale) stratified by batch and allele. Dimension |
|
59 |
+is the same as for \code{medians}. |
|
60 |
+ |
|
61 |
+\code{tau2} returns an array of the squared within-genotype median |
|
62 |
+absolute deviation on the log-scale. Only the mads for AA and BB |
|
63 |
+genotypes are stored. Dimension is R x A x G x C, where G is AA or |
|
64 |
+BB. Note that the mad for allele A/B for subjects with genotype BB/AA |
|
65 |
+is a robust estimate of the background variance, whereas the the mad |
|
66 |
+for allele A/B for subjects with genotype AA/BB is a robust estimate |
|
67 |
+of the variance for copy number greater than 0 (we assume that on the |
|
68 |
+log-scale the variance is rougly constant for CA, CB > 0). |
|
69 |
+ |
|
70 |
+} |
|
71 |
+ |
|
72 |
+ |
|
73 |
+\seealso{ |
|
74 |
+ |
|
75 |
+ \code{\link{batchStatistics}} |
|
76 |
+ |
|
77 |
+} |
|
78 |
+ |
|
79 |
+\examples{ |
|
80 |
+data(sample.CNSetLM) |
|
81 |
+## update to class CNSet |
|
82 |
+cnSet <- as(sample.CNSetLM, "CNSet") |
|
83 |
+## All NAs. Need to replace sample.CNSetLM with a HapMap example |
|
84 |
+Ns(cnSet, i=1:5, j=1:2) |
|
85 |
+corr(cnSet, i=1:5, j=1:2) |
|
86 |
+medians(cnSet, i=1:5, j=1:2) |
|
87 |
+mads(cnSet, i=1:5, j=1:2) |
|
88 |
+tau2(cnSet, i=1:5, j=1:2) |
|
89 |
+} |
|
90 |
+\keyword{manip} |