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) |
... | ... |
@@ -78,10 +78,7 @@ rawCopynumber(object,...) |
78 | 78 |
|
79 | 79 |
\examples{ |
80 | 80 |
## Version 1.6* of crlmm used CNSetLM objects. |
81 |
-data(sample.CNSetLM) |
|
82 |
- |
|
83 |
-## To update to class CNSet, use |
|
84 |
-cnSet <- as(sample.CNSetLM, "CNSet") |
|
81 |
+data(sample.CNSet) |
|
85 | 82 |
all(isCurrent(cnSet)) ## is the cnSet object current? |
86 | 83 |
|
87 | 84 |
## -------------------------------------------------- |
88 | 85 |
similarity index 53% |
89 | 86 |
rename from man/sample.CNSetLM.Rd |
90 | 87 |
rename to man/sample.CNSet.Rd |
... | ... |
@@ -1,63 +1,34 @@ |
1 |
-\name{sample.CNSetLM} |
|
2 |
-\alias{sample.CNSetLM} |
|
1 |
+\name{sample.CNSet} |
|
2 |
+\alias{sample.CNSet} |
|
3 | 3 |
\docType{data} |
4 | 4 |
\title{ |
5 |
- Dataset of class 'CNSetLM' |
|
5 |
+ Object of class 'CNSet' |
|
6 | 6 |
} |
7 | 7 |
\description{ |
8 | 8 |
|
9 |
- The data for 2119 polymorphic and nonpolymorphic markers on |
|
10 |
- chromosome 1 for the CEPH and Yoruban HapMap samples. |
|
9 |
+ The data for the first 16 polymorphic markers in the HapMap analysis. |
|
11 | 10 |
|
12 | 11 |
} |
13 |
-\usage{data(sample.CNSetLM)} |
|
12 |
+\details{ |
|
13 |
+ This object was created from the copynumber vignette in inst/scripts. |
|
14 |
+} |
|
15 |
+\usage{data(sample.CNSet)} |
|
14 | 16 |
\format{ |
15 |
- |
|
16 |
- This class has been deprecated. See example below for how to |
|
17 |
- update an existing 'CNSetLM' object to class 'CNSet'. |
|
18 |
- |
|
19 |
- The data illustrates the \code{CNSetLM-class}, with |
|
17 |
+ The data illustrates the \code{CNSet-class}, with |
|
20 | 18 |
\code{assayData} containing the quantile-normalized |
21 | 19 |
intensities for the A and B alleles, genotype calls and |
22 |
- confidence scores (call and callProbability), and |
|
23 |
- allele-specific copy number (CA and CB). The parameters from |
|
24 |
- the linear model are stored in the lM slot. |
|
20 |
+ confidence scores. New slots that specific to copy number |
|
21 |
+ estimation are \code{batch} and \code{batchStatistics}. |
|
25 | 22 |
|
26 | 23 |
} |
27 | 24 |
\examples{ |
28 |
-## class CNSetLM has been deprecated |
|
29 |
-data(sample.CNSetLM) |
|
30 |
-## update to class CNSet |
|
31 |
-cnSet <- as(sample.CNSetLM, "CNSet") |
|
32 |
-all(isCurrent(cnSet)) ## is the cnSet object current? |
|
33 |
-##subsetting |
|
34 |
-cnSet2 <- cnSet[, 1:5] |
|
35 |
-stopifnot(batchNames(cnSet2) == "C") |
|
36 |
-\dontrun{ |
|
37 |
- ## updating class CNSetLM using ff objects |
|
38 |
- ## a bigger object with multiple batches |
|
39 |
- if(require(ff)){ |
|
40 |
- outdir <- "/amber1/scratch/rscharpf/jss/hapmap2" |
|
41 |
- load(file.path(outdir, "container.rda")) |
|
42 |
- container <- object; rm(object); gc() |
|
43 |
- container2 <- as(container, "CNSet") |
|
44 |
- all(isCurrent(container2)) |
|
45 |
- ## test replacement methods, subset methods |
|
46 |
- table(batch(container2)) |
|
47 |
- ##generates warning ... would need open, close in the '[' method |
|
48 |
- invisible(open(nuA(container2))) |
|
49 |
- xx <- nu(container2, "A")[1:5, ] |
|
50 |
- nuA(container2)[1:5, ] <- xx |
|
51 |
- invisible(close(nuA(container2))) |
|
52 |
- } |
|
53 |
-} |
|
25 |
+data(sample.CNSet) |
|
54 | 26 |
## -------------------------------------------------- |
55 | 27 |
## accessors for the feature-level info |
56 | 28 |
## -------------------------------------------------- |
57 | 29 |
chromosome(cnSet)[1:5] |
58 | 30 |
position(cnSet)[1:5] |
59 | 31 |
isSnp(cnSet)[1:5] |
60 |
-## 980 nonpolymorphic markers and 1139 polymoprhic markers |
|
61 | 32 |
table(isSnp(cnSet)) |
62 | 33 |
## -------------------------------------------------- |
63 | 34 |
## sample-level statistics computed by crlmm |
... | ... |
@@ -71,14 +42,9 @@ cnSet$SKW[1:5] |
71 | 42 |
## the gender (gender is imputed unless specified in the call to crlmm) |
72 | 43 |
table(cnSet$gender) ## 1=male, 2=female |
73 | 44 |
## -------------------------------------------------- |
74 |
-## -------------------------------------------------- |
|
75 |
-## |
|
76 |
-## accessors for parameters estimated from the linear model for copy |
|
77 |
-## number (note that the parameters have dimension R x C, where R |
|
78 |
-## corresponds to the number of features and C corresponds to the |
|
79 |
-## number of batches) |
|
45 |
+## batchStatistics |
|
80 | 46 |
## -------------------------------------------------- estimate of |
81 |
-## background |
|
47 |
+## intercept from linear model |
|
82 | 48 |
dim(nu(cnSet, "A")) |
83 | 49 |
## background for the A allele in the 2 batches for the |
84 | 50 |
## first 5 markers |
... | ... |
@@ -123,14 +89,5 @@ all.equal(cn4, cn2) |
123 | 89 |
cn5 <- totalCopynumber(cnSet, i=1:5) |
124 | 90 |
## all markers, samples 1-5 |
125 | 91 |
cn6 <- totalCopynumber(cnSet, j=1:5) |
126 |
- |
|
127 |
-## NOTE: subsetting the object before extracting copy number |
|
128 |
-## can be very inefficient when the data set is very large, |
|
129 |
-## particularly if using ff objects. IN particular, subsetting |
|
130 |
-## the CNSet object will subset all of the assay data elements |
|
131 |
-## and all of the elements in the LinearModelParameter slot |
|
132 |
-\dontrun{ |
|
133 |
- cnsubset <- cnSet[1:5, ] |
|
134 |
-} |
|
135 | 92 |
} |
136 | 93 |
\keyword{datasets} |