Browse code

changed copynumber vignette to call genotype, not genotypeLD.

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

Rob Scharp authored on 30/08/2010 19:41:17
Showing4 changed files

... ...
@@ -159,7 +159,7 @@ be run interactively.
159 159
 if(!file.exists(file.path(outdir, "cnSet.rda"))){
160 160
 	gtSet <- checkExists("gtSet",
161 161
 			     .path=outdir,
162
-			     .FUN=genotypeLD,
162
+			     .FUN=genotype,
163 163
 			     filenames=celFiles[1:200],
164 164
 			     cdfName=cdfName,
165 165
 			     batch=batch[1:200])
166 166
new file mode 100644
... ...
@@ -0,0 +1,35 @@
1
+\name{AssayData-methods}
2
+\Rdversion{1.1}
3
+\docType{methods}
4
+\alias{Ns,AssayData-method}
5
+\alias{corr,AssayData-method}
6
+\alias{mads,AssayData-method}
7
+\alias{medians,AssayData-method}
8
+\alias{tau2,AssayData-method}
9
+
10
+\title{Methods for class "AssayData" in crlmm}
11
+
12
+\description{
13
+
14
+	The \code{batchStatistics} slot in a \code{CNSet} object is an
15
+	instance of the \code{AssayData} slot. In general, the
16
+	accessors for \code{AssayData} are called indirectly by the
17
+	corresponding method for the \code{CNSet} class and not called
18
+	directly by the user.
19
+
20
+}
21
+
22
+\section{Methods}{
23
+  \describe{
24
+    \item{Ns}{\code{signature(object="AssayData")}: ...}
25
+    \item{corr}{\code{signature(object="AssayData")}: ...}
26
+    \item{mads}{\code{signature(x="AssayData")}: ...}
27
+    \item{medians}{\code{signature(object="AssayData")}: ...}
28
+    \item{tau2}{\code{signature(object="AssayData")}: ...}
29
+	 }
30
+}
31
+
32
+\seealso{
33
+  \code{\link{CNSet-class}}, \code{\link{Ns}}, \code{\link{tau2}}, \code{\link{corr}}, \code{\link{mads}}, \code{\link{medians}}
34
+}
35
+\keyword{manip}
... ...
@@ -5,6 +5,11 @@
5 5
 \alias{CB,CNSet-method}
6 6
 \alias{lines,CNSet-method}
7 7
 \alias{totalCopynumber,CNSet-method}
8
+\alias{Ns,CNSet-method}
9
+\alias{corr,CNSet-method}
10
+\alias{mads,CNSet-method}
11
+\alias{medians,CNSet-method}
12
+\alias{tau2,CNSet-method}
8 13
 
9 14
 \title{crlmm methods for class "CNSet"}
10 15
 \description{
... ...
@@ -27,6 +32,11 @@
27 32
     \item{CB}{\code{signature(object="CNSet")}: ...}
28 33
     \item{lines}{\code{signature(x="CNSet")}: ...}
29 34
     \item{totalCopynumber}{\code{signature(object="CNSet")}: ...}
35
+    \item{Ns}{\code{signature(object="CNSet")}: ...}
36
+    \item{corr}{\code{signature(object="CNSet")}: ...}
37
+    \item{mads}{\code{signature(x="CNSet")}: ...}
38
+    \item{medians}{\code{signature(object="CNSet")}: ...}
39
+    \item{tau2}{\code{signature(object="CNSet")}: ...}
30 40
 	 }
31 41
 }
32 42
 
33 43
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}