/usr/lib/R/site-library/savR/doc/savR.Rnw is in r-bioc-savr 1.16.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | \documentclass[letterpaper,11pt,oneside,final,onecolumn,article]{memoir}
\usepackage{microtype}
\usepackage{helvet}
\usepackage{pxfonts}
\usepackage{eulervm}
\usepackage{nicefrac}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage[numbers,square,comma,sort&compress]{natbib}
\usepackage{soul, color, ulem} % underline, overstrike, highlight
\usepackage{amssymb}
\usepackage{hyperref} % URL's
\usepackage{memhfixc} % should have loaded already, memoir bugs
\setlrmarginsandblock{.75in}{.75in}{1}
\setulmarginsandblock{.75in}{.75in}{1}
\checkandfixthelayout
\pagestyle{empty}
\renewcommand{\abstractname}{} % no ``abstract''
\renewcommand{\bibname}{} % no ``bibliography''
\setsecheadstyle{\Large\sffamily\raggedright}
\setsubsecheadstyle{\large\sffamily\raggedright}
\setsubsubsecheadstyle{\normalsize\sffamily\raggedright}
%\VignetteIndexEntry{Using savR}
\begin{document}
\fvset{listparameters={\setlength{\topsep}{0pt}}}
\renewenvironment{Schunk}{\vspace{\topsep}}{\vspace{\topsep}}
\renewenvironment{Schunk}{\vspace{5pt}}{\vspace{5pt}}
\title{Using savR}
\author{R. Brent Calder}
\maketitle
<<prepare>>=
library(savR)
@
<<intro,cache=T>>=
fc <- savR(system.file("extdata", "MiSeq", package="savR"))
@
<<show>>=
fc
@
<<doPfPlot,eval=F>>=
pfBoxplot(fc)
@
<<pfPlot,echo=F>>=
png(filename="pf.png", width=400, height=300, res=72)
pfBoxplot(fc)
invisible(dev.off())
@
\begin{figure}[htb]
\begin{center}
\includegraphics[width=3in]{pf.png}
\end{center}
\caption{Boxplot of total vs. PF clusters}
\label{fig:fp}
\end{figure}
\section*{Introduction}
The Illumina Sequence Analysis Viewer (SAV) is a Windows application provided by Illumina that
presents graphs made in real time from data collected over the course of basecalling. This data was
previously also made available in HTML format for inspection after the run; however, it is now
preserved in binary format and not simply parsed by users who wish to perform automated quality
assessment. Here is presented \textit{savR}, an R package to parse the binary output, generate
QC assessment plots and make the data available to users of Illumina sequencing instruments.
For more information about Illumina SAV, please consult the Illumina iCom website and the
Sequencing Analysis Viewer User's Guide, available
\href{https://duckduckgo.com/?q=sequencing%20analysis%20viewer%20user%27s%20guide}{\textit{online}}.
\section*{Description}
The \texttt{savR} function is passed a path to an Illumina HiSeq or MiSeq run, and returns a
\texttt{savProject} object, containing the parsed data. Accessor methods are available for
information in the \texttt{RunInfo.xml} file as well as the parsed SAV Metrics files. These include
corrected intensities, quality metrics, tile metrics, and extraction metrics. The \textit{savR}
package comes with an example MiSeq data set which can be loaded thusly:
<<intro2,eval=F>>=
fc <- savR(system.file("extdata", "MiSeq", package="savR"))
@
\subsection*{RunInfo.xml}
The \texttt{RunInfo.xml} file is parsed and stored in the slots of the \texttt{savProject} object.
There are accessor methods for the project's \texttt{location}, \texttt{reads}, number of ``ends''
or \texttt{directions}, the \texttt{run} ID, the number of \texttt{cycles}, and a description of
the \texttt{flowcellLayout}.
<<ri>>=
directions(fc)
reads(fc)
cycles(fc)
flowcellLayout(fc)
@
\subsection*{Corrected intensitites}
Corrected intensity metrics (obtained from \texttt{CorrectedIntMetricsOut.bin}) can be inspected
by the \texttt{correctedIntestites} accessor method:
<<ciex>>=
head(correctedIntensities(fc), n=1)
@
This is a \texttt{data.frame} of intensity metrics; one line for each set of lane, tile and cycle
measurements. Reported statistics include average intensity, corrected intensity (for cross-talk between
bases and phasing/pre-phasing), called corrected intensities, number of called bases and signal to
noise ratio. There are methods which act upon \texttt{savProject} objects to produce QC plots, for example
plotIntensity to assess signal intensity for each channel as in figure \ref{fig:ci}.
<<doCiPlot,eval=F>>=
plotIntensity(fc)
@
<<ciPlot,echo=F>>=
png(filename="ci.png", width=250, height=400, res=72)
plotIntensity(fc)
invisible(dev.off())
@
\begin{figure}[htb]
\begin{center}
\includegraphics[width=2.25in]{ci.png}
\end{center}
\caption{Corrected intensity plot: cycle 1, base ``A''.}
\label{fig:ci}
\end{figure}
\subsection*{Quality Metrics}
The quality metrics (\texttt{QMetricsOut.bin}) file contains per-lane/tile/cycle metrics for the number
of clusters with quality at each PHRED value from 1-50.
<<qmex>>=
head(qualityMetrics(fc), n=1)
@
<<doQhPlot,eval=F>>=
qualityHeatmap(fc,1,1)
@
<<qhPlot,echo=F>>=
png(filename="qh.png", width=400, height=300, res=72)
qualityHeatmap(fc,1,1)
invisible(dev.off())
@
\begin{figure}[h]
\begin{center}
\includegraphics[width=3.5in]{qh.png}
\end{center}
\caption{Quality heatmap: lane 1, read 1.}
\label{fig:qh}
\end{figure}
\subsection*{Tile Metrics}
The tile metrics (\texttt{TileMetricsOut.bin}) file contains coded information about per-lane/cycle/tile cluster density,
pass-filter clusters, phasing and pre-phasing data. Consult the \texttt{tileMetrics} help page for more information.
<<tmex>>=
head(tileMetrics(fc), n=4)
@
\subsection*{Extraction Metrics}
The extraction metrics (\texttt{ExtractionMetricsOut.bin}) file contains per-lane/cycle/tile information about per-base FWHM
(full width pixel size of clusters at half maximum) and 90th \%-ile intensity of signal intensity.
<<example2>>=
head(extractionMetrics(fc), n=1)
@
\section*{Coda}
There is a convenience function (\texttt{buildReports}), which partially reconstructs the Illumina reports folder
that was previously generated by the Illumina instrument software and which was superseded by SAV and InterOp files.
\end{document}
|