git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/crlmm@59041 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.57 |
|
4 |
+Version: 1.11.58 |
|
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> |
8 | 8 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,109 @@ |
1 |
+\name{cnSetExample} |
|
2 |
+\alias{cnSetExample} |
|
3 |
+\alias{cnSetExample2} |
|
4 |
+\docType{data} |
|
5 |
+\title{ |
|
6 |
+ Object of class 'CNSet' |
|
7 |
+} |
|
8 |
+\description{ |
|
9 |
+ |
|
10 |
+ The data for the first 16 polymorphic markers in the HapMap analysis. |
|
11 |
+ |
|
12 |
+} |
|
13 |
+\details{ |
|
14 |
+ This object was created from the copynumber vignette in inst/scripts. |
|
15 |
+} |
|
16 |
+\usage{ |
|
17 |
+ |
|
18 |
+data(cnSetExample) |
|
19 |
+data(cnSetExample2) |
|
20 |
+ |
|
21 |
+} |
|
22 |
+\format{ |
|
23 |
+ The data illustrates the \code{CNSet-class}, with |
|
24 |
+ \code{assayData} containing the quantile-normalized |
|
25 |
+ intensities for the A and B alleles, genotype calls and |
|
26 |
+ confidence scores. New slots that specific to copy number |
|
27 |
+ estimation are \code{batch} and \code{batchStatistics}. |
|
28 |
+ |
|
29 |
+} |
|
30 |
+\examples{ |
|
31 |
+\dontshow{ |
|
32 |
+\dontrun{ |
|
33 |
+ |
|
34 |
+ ## hapmap phase 3 data |
|
35 |
+ data(hapmapSet, package="CnvScripts") |
|
36 |
+ marker.index <- which(chromosome(hapmapSet) == 8) |
|
37 |
+ marker.index <- marker.index[1:60e3] |
|
38 |
+ sample.CNSet <- hapmapSet[marker.index, c(1168:1169)] |
|
39 |
+ cnSetExample <- sample.CNSet |
|
40 |
+ save(cnSetExample, file="~/Software/crlmm/data/cnSetExample.rda") |
|
41 |
+ ## 2 samples, many markers |
|
42 |
+ |
|
43 |
+ ## all samples, a few markers |
|
44 |
+ snp.index <- which(isSnp(hapmapSet))[1:100] |
|
45 |
+ np.index <- which(!isSnp(hapmapSet))[1:100] |
|
46 |
+ marker.index <- c(snp.index, np.index) |
|
47 |
+ sample.CNSet2 <- hapmapSet[marker.index, ] |
|
48 |
+ sample.CNSet2$gender <- sample.CNSet2$gender[] |
|
49 |
+ sample.CNSet2$SKW <- sample.CNSet2$SKW[] |
|
50 |
+ sample.CNSet2$SNR <- sample.CNSet2$SNR[] |
|
51 |
+ cnSetExample2 <- sample.CNSet2 |
|
52 |
+ save(cnSetExample2, file="~/Software/crlmm/data/cnSetExample2.rda") |
|
53 |
+} |
|
54 |
+} |
|
55 |
+data(cnSetExample) |
|
56 |
+## -------------------------------------------------- |
|
57 |
+## accessors for the feature-level info |
|
58 |
+## -------------------------------------------------- |
|
59 |
+chromosome(cnSetExample)[1:5] |
|
60 |
+position(cnSetExample)[1:5] |
|
61 |
+isSnp(cnSetExample)[1:5] |
|
62 |
+table(isSnp(cnSetExample)) |
|
63 |
+## -------------------------------------------------- |
|
64 |
+## sample-level statistics computed by crlmm |
|
65 |
+## -------------------------------------------------- |
|
66 |
+varLabels(cnSetExample) |
|
67 |
+## accessors for sample-level statistics |
|
68 |
+## The signal to noise ratio (SNR) |
|
69 |
+cnSetExample$SNR[] |
|
70 |
+## the skew |
|
71 |
+cnSetExample$SKW[] |
|
72 |
+## the gender (gender is imputed unless specified in the call to crlmm) |
|
73 |
+table(cnSetExample$gender[]) ## 1=male, 2=female |
|
74 |
+## -------------------------------------------------- |
|
75 |
+## batchStatistics |
|
76 |
+## -------------------------------------------------- estimate of |
|
77 |
+## intercept from linear model |
|
78 |
+dim(nu(cnSetExample, "A")) |
|
79 |
+## background for the A allele in the 2 batches for the |
|
80 |
+## first 5 markers |
|
81 |
+nu(cnSetExample, "A")[1:5, ] |
|
82 |
+## background for the B allele in the 2 batches for the |
|
83 |
+## first 5 markers |
|
84 |
+nu(cnSetExample, "B")[1:5, ] |
|
85 |
+## the slope |
|
86 |
+phi(cnSetExample, "A")[1:5, ] |
|
87 |
+ |
|
88 |
+## -------------------------------------------------- |
|
89 |
+## calculating allele-specific copy number |
|
90 |
+## -------------------------------------------------- |
|
91 |
+(ca <- CA(cnSetExample, i=1:5, j=1:2)) |
|
92 |
+## copy number for allele B, first 5 markers, first 2 samples |
|
93 |
+(cb <- CB(cnSetExample, i=1:5, j=1:2)) |
|
94 |
+index <- which(!isSnp(cnSetExample))[1:5] |
|
95 |
+cn2 <- CA(cnSetExample, i=index, j=1:2) |
|
96 |
+## note, cb is 0 at nonpolymorphic loci |
|
97 |
+CB(cnSetExample, i=index, j=1:2) |
|
98 |
+## A shortcut for total copy number |
|
99 |
+cn3 <- totalCopynumber(cnSetExample, i=1:5, j=1:2) |
|
100 |
+all.equal(cn3, ca+cb) |
|
101 |
+cn4 <- totalCopynumber(cnSetExample, i=index, j=1:2) |
|
102 |
+all.equal(cn4, cn2) |
|
103 |
+ |
|
104 |
+## markers 1-5, all samples |
|
105 |
+cn5 <- totalCopynumber(cnSetExample, i=1:5) |
|
106 |
+## all markers, samples 1-2 |
|
107 |
+cn6 <- totalCopynumber(cnSetExample, j=1:2) |
|
108 |
+} |
|
109 |
+\keyword{datasets} |