\HeaderA{readPgf}{Parsing a PGF file using Affymetrix Fusion SDK}{readPgf}
\keyword{file}{readPgf}
\keyword{IO}{readPgf}
\begin{Description}\relax
This function parses a PGF file using the Affymetrix Fusion SDK. PGF
(probe group) files describe probes present within probe sets, including the
type (e.g., pm, mm) of the probe and probeset.
\end{Description}
\begin{Usage}
\begin{verbatim}
readPgf(file, indices = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{file}] \code{character(1)} providing a path to the PGF file to be
input.
\item[\code{indices}] \code{integer(n)} a vector of indices of the probesets to
be read.
\end{ldescription}
\end{Arguments}
\begin{Value}
An list. The \code{header} element is always present; the
remainder are present when \code{readBody=TRUE}.

The elements present when \code{readBody=TRUE} describe probe sets,
atoms, and probes. Elements within probe sets, for instance, are
coordinated such that the \code{i}th index of one vector (e.g.,
\code{probesetId}) corresponds to the \code{i}th index of a second
vector (e.g., \code{probesetType}). The atoms contained within 
probeset \code{i} are in positions
\code{probesetStartAtom[i]:(probesetStartAtom[i+1]-1)} of the atom
vectors. A similar map applies to probes within atoms, using
\code{atomStartProbe} as the index.

The PGF file format includes optional elements; these elements are
always present in the list, but with appropriate default values.

\begin{ldescription}
\item[\code{header}] A list with information about the PGF file. The list
contains elements described in the PGF file format document
referenced below.
\item[\code{probesetId}] integer vector of probeset identifiers.
\item[\code{probesetType}] character vector of probeset types. Types are
described in the PGF file format document.
\item[\code{probesetName}] character vector of probeset names.
\item[\code{probesetStartAtom}] integer vector of the start index
(e.g., in the element \code{atomId} of atoms belonging to this probeset).
\item[\code{atomId}] integer vector of atom identifiers.
\item[\code{atomExonPosition}] integer vector of probe interrogation position
relative to the target sequence.
\item[\code{atomStartProbe}] integer vector of the start index (e.g., in the
element \code{probeId} of probes belonging to this atom).
\item[\code{probeId}] integer vector of probe identifiers.
\item[\code{probeType}] character vector of probe types. Types are described
in the PGF file format document.
\item[\code{probeGcCount}] integer vector of probe GC content.
\item[\code{probeLength}] integer vector of probe lengths.
\item[\code{probeInterrogationPosition}] integer vector of the position,
within the probe, at which interrogation occurs.
\item[\code{probeSequence}] character vector of the probe sequence.
\end{ldescription}
\end{Value}
\begin{Author}\relax
Martin Morgan \url{mtmorgan@fhcrc.org}
\end{Author}
\begin{SeeAlso}\relax
\url{https://www.affymetrix.com/support/developer/fusion/File_Format_PGF_aptv161.pdf}
describes PGF file content.

The internal function \code{.pgfProbeIndexFromProbesetIndex} provides
a map between
the indicies of probe set entries and the indicies of the probes
contained in the probe set.
\end{SeeAlso}

