inst/scripts/illumina_copynumber.Rnw
2ae7850e
 %\VignetteIndexEntry{crlmm copy number Vignette for Illumina}
 %\VignetteDepends{crlmm}
 %\VignetteKeywords{crlmm, illumina}
 %\VignettePackage{crlmm}
 \documentclass{article}
 \usepackage{graphicx}
 \usepackage{natbib}
 \newcommand{\Rfunction}[1]{{\texttt{#1}}}
 \newcommand{\Rmethod}[1]{{\texttt{#1}}}
 \newcommand{\Rcode}[1]{{\texttt{#1}}}
 \newcommand{\Robject}[1]{{\texttt{#1}}}
 \newcommand{\Rpackage}[1]{{\textsf{#1}}}
 \newcommand{\Rclass}[1]{{\textit{#1}}}
 \newcommand{\oligo}{\Rpackage{oligo }}
 \newcommand{\R}{\textsf{R}}
 
 \begin{document}
 \title{Copy number estimation and genotype calling with \Rpackage{crlmm}}
 \date{Oct, 2009}
 \author{Rob Scharpf}
 \maketitle
 
 <<setup, echo=FALSE, results=hide>>=
 options(width=60)
 options(continue=" ")
 options(prompt="R> ")
 @ 
 
e19041ae
 <<>>=
 library(Biobase)
 library(crlmm)
 setwd("/thumper/ctsa/snpmicroarray/illumina/IDATS/370k")
 @ 
 
 <<readIdat>>=
 samplesheet5 = read.csv("HumanHap370Duo_Sample_Map.csv", header=TRUE, as.is=TRUE)[-c(28:46,61:75,78:79),]
 if(!exists("RG")){
 	RG <- readIdatFiles(samplesheet5, arrayInfoColNames=list(barcode=NULL, position="SentrixPosition"), saveDate=TRUE)
 }
 @ 
 
2ae7850e
 Alternatively, arguments to the readIdatFiles can be passed through the
 {\tt ...} argument of the \R{} function \Robject{crlmmWrapper}.
e19041ae
 
2ae7850e
 <<wrapper>>=
 crlmmWrapper(sampleSheet=samplesheet5,
 	     arrayInfoColNames=list(barcode=NULL, position="SentrixPosition"), 
 	     saveDate=TRUE,
 	     cdfName=cdfName,
 	     load.it=FALSE,
 	     save.it=TRUE,
 	     intensityFile=file.path(platedir, "normalizedIntensities.rda"),
 	     crlmmFile=file.path(platedir, "snpsetObject.rda"),
 	     rgFile=file.path(platedir, "rgFile.rda"),
 	     platform="illumina")
e19041ae
 @ 
 
 Note: the code below is run for testing purposes only. None of these
 functions are exported, so would not routinely be run directly by the
2ae7850e
 user.  A typical analysis would involve runnning crlmmWrapper() followed
 by update() to obtain copy number.
45dab54b
 
e19041ae
 
 <<SNR>>=
 hist(crlmmOut$SNR) ##approx. 5-fold higher than what we see in Affy!
 @ 
 
2ae7850e
 \end{document}
e19041ae